0

当我使用 RESTful API 将数据插入到我的 TDengine 服务器时,有时它会报告“未指定或不可用的数据库”错误。似乎它的行为并不一致,所以我很困惑为什么会这样。我一个人吗?

如果有人可以提供帮助,TIA。


NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-99] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-99] INFO o.a.http.impl.execchain.RetryExec - I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://xxxxxxxxxx:6041: The target server failed to respond
15:32:55 [async-service-99] INFO o.a.http.impl.execchain.RetryExec - Retrying request to {}->http://xxxxxxxxxx:6041
15:32:55 [async-service-467] DEBUG c.y.r.m.t.S.createpressureTesttable - <== Updates: 0
15:32:55 [async-service-99] DEBUG c.y.r.m.t.S.createpressureTesttable - <== Updates: 0
15:32:55 [async-service-99] DEBUG c.y.r.m.t.S.insertDatapressureTest - ==> Preparing: INSERT INTO db.F44 USING db.data TAGS ("test") VALUES(now,17.7,31.1,160.75,44.4,0,1,44.98,73.22,49.43,76.47);
15:32:55 [async-service-99] DEBUG c.y.r.m.t.S.insertDatapressureTest - ==> Parameters:
15:32:55 [async-service-99] DEBUG c.y.r.m.t.S.insertDatapressureTest - <== Updates: 1
15:32:55 [async-service-163] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-388] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-44] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-262] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-163] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-44] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-262] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-388] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:

15:32:55 [async-service-395] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-395] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-117] WARN com.zaxxer.hikari.pool.PoolBase - TDengineDruidCP - Failed to validate connection com.taosdata.jdbc.rs.RestfulConnection@1cc2f562 (TDengine ERROR (380): Database not specified or available)
15:32:55 [async-service-90] WARN com.zaxxer.hikari.pool.PoolBase - TDengineDruidCP - Failed to validate connection com.taosdata.jdbc.rs.RestfulConnection@3b30ef23 (TDengine ERROR (380): Database not specified or available)
15:32:55 [async-service-500] WARN com.zaxxer.hikari.pool.PoolBase - TDengineDruidCP - Failed to validate connection com.taosdata.jdbc.rs.RestfulConnection@70962f55 (TDengine ERROR (380): Database not specified or available)
15:32:55 [async-service-163] DEBUG c.y.r.m.t.S.createpressureTesttable - <== Updates: 0
15:32:55 [async-service-44] DEBUG c.y.r.m.t.S.createpressureTesttable - <== Updates: 0
15:32:55 [async-service-404] WARN com.zaxxer.hikari.pool.PoolBase - TDengineDruidCP - Failed to validate connection com.taosdata.jdbc.rs.RestfulConnection@2909596c (TDengine ERROR (380): Database not specified or available)
15:32:55 [async-service-404] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-404] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-110] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
15:32:55 [async-service-110] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Parameters:
15:32:55 [async-service-453] WARN com.zaxxer.hikari.pool.PoolBase - TDengineDruidCP - Failed to validate connection com.taosdata.jdbc.rs.RestfulConnection@177182af (TDengine ERROR (380): Database not specified or available)
15:32:55 [async-service-230] DEBUG c.y.r.m.t.S.createpressureTesttable - <== Updates: 0
15:32:55 [async-service-471] DEBUG c.y.r.m.t.S.createpressureTesttable - ==> Preparing: CREATE STABLE IF NOT EXISTS db.data (ts TIMESTAMP, CO NCHAR(6) , NO2 NCHAR(6) , PM10 NCHAR(6) , SO2 NCHAR(6) , area NCHAR(6) , class NCHAR(6) , humidity NCHAR(6) , pm25 NCHAR(6) , temperature NCHAR(6) , volume NCHAR(6) ) TAGS (Device NCHAR(20));
4

1 回答 1

0

您可以使用 'select xxx from dbname.tbname' 或 'insert into dbname.tbname values(xxx)' 来避免此类错误。

于 2021-08-03T05:46:13.953 回答