databaseresthttptime-seriestdengine

insert data error to TDengine when using RESTful


When I use RESTful API to insert data to my TDengine server, sometimes it reported 'Database not specified or available' error. Seems its behavior is not consistent so I'm confused why it happened. Am I alone?

TIA if someone can help out.


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));

Solution

  • You can use 'select xxx from dbname.tbname' or 'insert into dbname.tbname values(xxx)' to avoid such error.