...
 
Commits (5)
    https://gitcode.net/iotsharp/IoTSharp/-/commit/7ed9c09714b409130aaddeadb7c9bbb18124ffc3 fixed failed when create table 2023-07-31T18:14:28+08:00 KunYi Chen kunyi.chen@gmail.com we met the below message when database initialization, the message show create database is okay then create table failed. ----------------------------------------------------------------------- iotsharp-taos-1 | 58:41.522179 00000096 MND ERROR user:root, failed to login from 172.22.0.3 while use db:IoTSharp since Invalid database name, gtid:0xd03023f4dd720064:0x65931aaf4dd0007d iotsharp-taos-1 | 07/31 15:58:41.522189 00000096 MND ERROR msg:0x7fc62841c868, failed to process since Invalid database name, app:0x7fa9dc004df0 type:connect, gtid:0xd03023f4dd720064:0x65931aaf4dd0007d iotsharp-taos-1 | 07/31 15:58:41.523719 00000035 taos_ADAPTER info "| 200 | 75.661233ms | 172.22.0.5 | GET | %2Frest%2Fws " model=web iotsharp-taos-1 | 07/31 15:58:41.527097 00000035 taos_ADAPTER info "| 200 | 7.591404ms | 172.22.0.5 | GET | %2Frest%2Fstmt " model=web iotsharp-taos-1 | 07/31 15:58:41.528410 00000096 MND ERROR user:root, failed to login from 172.22.0.3 while use db:IoTSharp since Invalid database name, gtid:0xd03023f4dd780066:0x65931aaf4dd0007f iotsharp-taos-1 | 07/31 15:58:41.528419 00000096 MND ERROR msg:0x7fc62641a9e8, failed to process since Invalid database name, app:0x7fa9c0020920 type:connect, gtid:0xd03023f4dd780066:0x65931aaf4dd0007f iotsharp-taos-1 | failed to connect to server, reason: Invalid database name iotsharp-taos-1 | iotsharp-taos-1 | 07/31 15:58:41.529946 00000096 MND ERROR user:root, failed to login from 172.22.0.3 while use db:IoTSharp since Invalid database name, gtid:0xd03023f4dd790068:0x65931aaf4dd00081 iotsharp-taos-1 | 07/31 15:58:41.529957 00000096 MND ERROR msg:0x7fc625c1c7a8, failed to process since Invalid database name, app:0x7fa9b40066f0 type:connect, gtid:0xd03023f4dd790068:0x65931aaf4dd00081 iotsharp-taos-1 | failed to connect to server, reason: Invalid database name iotsharp-taos-1 | iotsharp-taos-1 | 07/31 15:58:41.535142 00000097 MND db:1.iotsharp, start to create, vgroups:2 iotsharp-taos-1 | 07/31 15:58:41.535151 00000097 MND db:1.iotsharp, already exist, ignore exist is set iotsharp-taos-1 | 07/31 15:58:41.544216 00000035 taos_ADAPTER info "| 200 | 14.617762ms | 172.22.0.5 | GET | %2Frest%2Fstmt " model=web iotsharp-taos-1 | 07/31 15:58:41.544217 00000035 taos_ADAPTER info "| 200 | 16.313725ms | 172.22.0.5 | GET | %2Frest%2Fws " model=web iotsharp-taos-1 | 07/31 15:58:41.545403 00000096 MND ERROR user:root, failed to login from 172.22.0.3 while use db:IoTSharp since Invalid database name, gtid:0xd03023f4dd89006a:0x65931aaf4dd00086 iotsharp-taos-1 | 07/31 15:58:41.545411 00000096 MND ERROR msg:0x7fc6260177a8, failed to process since Invalid database name, app:0x7fa9d0004c70 type:connect, gtid:0xd03023f4dd89006a:0x65931aaf4dd00086 iotsharp-taos-1 | failed to connect to server, reason: Invalid database name iotsharp-taos-1 | iotsharp-taos-1 | 07/31 15:58:41.547169 00000096 MND ERROR user:root, failed to login from 172.22.0.3 while use db:IoTSharp since Invalid database name, gtid:0xd03023f4dd8b006c:0x65931aaf4dd00088 iotsharp-taos-1 | 07/31 15:58:41.547176 00000096 MND ERROR msg:0x7fc625817868, failed to process since Invalid database name, app:0x7fa9b40066f0 type:connect, gtid:0xd03023f4dd8b006c:0x65931aaf4dd00088 iotsharp-taos-1 | failed to connect to server, reason: Invalid database name iotsharp-taos-1 | iotsharp-iotsharp-1 | crit: Microsoft.AspNetCore.Hosting.Diagnostics[6] iotsharp-iotsharp-1 | Application startup exception iotsharp-iotsharp-1 | IoTSharp.Data.Taos.TaosException (0x00002616): Database not specified iotsharp-iotsharp-1 | at IoTSharp.Data.Taos.TaosException.ThrowExceptionForRC(TaosErrorResult taosError) iotsharp-iotsharp-1 | at IoTSharp.Data.Taos.Protocols.TDWebSocket.TaosWebSocket.Execute(String _commandText) iotsharp-iotsharp-1 | at IoTSharp.Data.Taos.Protocols.TDWebSocket.TaosWebSocket.ExecuteReader(CommandBehavior behavior, TaosCommand command) iotsharp-iotsharp-1 | at IoTSharp.Data.Taos.TaosCommand.ExecuteNonQuery() iotsharp-iotsharp-1 | at IoTSharp.Storage.TaosStorage.CheckTelemetryStorage() in /src/IoTSharp.Data.TimeSeries/TaosStorage.cs:line 36 iotsharp-iotsharp-1 | at IoTSharp.IoTSharpExtension.UseTelemetryStorage(IApplicationBuilder app) in /src/IoTSharp/Extensions/IoTSharpExtension.cs:line 365 iotsharp-iotsharp-1 | at IoTSharp.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in /src/IoTSharp/Startup.cs:line 349 https://gitcode.net/iotsharp/IoTSharp/-/commit/cf5d8869b58af2ca0135896c553947a13528a29d Merge pull request #1071 from KunYi/master 2023-07-31T18:40:52+08:00 MysticBoy mysticboy@live.com fixed failed when create table of tdengine https://gitcode.net/iotsharp/IoTSharp/-/commit/c0ab2d5c37940ae6ca212e80b2c914a224dadcb7 优化遥测数据发布器描述 2023-08-03T08:18:40+08:00 liumanduo liumanduo@163.com https://gitcode.net/iotsharp/IoTSharp/-/commit/4a988ea2db202669bc63e3ee1f358b78411752b8 Merge branch 'IoTSharp:master' into master 2023-08-03T08:20:53+08:00 liumanduo liumanduo@163.com https://gitcode.net/iotsharp/IoTSharp/-/commit/1a844c916facbb1304781ce24a93984394400a2b Merge pull request #1077 from liumanduo/master 2023-08-05T01:49:52+08:00 MysticBoy mysticboy@live.com 优化遥测数据发布器描述
......@@ -33,6 +33,7 @@ namespace IoTSharp.Storage
if (_taos.State != System.Data.ConnectionState.Open) _taos.Open();
_taos.CreateCommand($"CREATE DATABASE IF NOT EXISTS {_taosBuilder.DataBase}").ExecuteNonQuery();
_taos.ChangeDatabase(_taosBuilder.DataBase);
_taos.CreateCommand($"USE {_taosBuilder.DataBase}").ExecuteNonQuery();
_taos.CreateCommand($"CREATE TABLE IF NOT EXISTS telemetrydata (ts timestamp,value_type tinyint, value_boolean bool, value_string binary(10240), value_long bigint,value_datetime timestamp,value_double double) TAGS (deviceid binary(32),keyname binary(64));")
.ExecuteNonQuery();
return Task.FromResult(true);
......@@ -235,4 +236,4 @@ namespace IoTSharp.Storage
return (result, telemetries);
}
}
}
\ No newline at end of file
}
......@@ -14,7 +14,7 @@ using System.Threading.Tasks;
namespace IoTSharp.TaskActions
{
[DisplayName("遥测数据发布器")]
[Description("遥测数据发布器")]
[Description("发布遥测数据至队列")]
public class PublishTelemetryDataTask : TaskAction
{
private readonly IPublisher _queue;
......