TDengine
TDengine copied to clipboard
E! [agent] Error writing to outputs.http: when writing to [http://tdengine-server:6041/influxdb/v1/write?db=telegraf] received status code: 500. body: {"code":"internal error","message":",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"}
E! [agent] Error writing to outputs.http: when writing to [http://tdengine-server:6041/influxdb/v1/write?db=telegraf] received status code: 500. body: {"code":"internal error","message":",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"}
install version. docker exec -it tdengine taos --version version: 3.0.0.1
taosadapter --version taosadapter v0.1.0-unknown
firewall stop.
telegraf --version Telegraf 1.21.3 (git: HEAD 8610b5e7)
tdengine start script:
docker run -d \
--name tdengine \
--hostname="tdengine-server" \
-v ${PWD}/log:/var/log/taos \
-v ${PWD}/data:/var/lib/taos \
--restart=always \
--net="host" \
tdengine/tdengine:3.0.0.1
telegraf setting:
[global_tags]
[agent]
interval = "30s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 100
collection_jitter = "0s"
flush_interval = "30s"
flush_jitter = "0s"
precision = ""
hostname = "TDengine-113"
omit_hostname = false
debug = false
[[outputs.http]]
#url = "http://teengine-server:6041/influxdb/v1/write?db=tdengine"
url = "http://tdengine-server:6041/influxdb/v1/write?db=telegraf"
method = "POST"
timeout = "5s"
username = "root"
password = "taosdata"
data_format = "influx"
influx_max_line_bytes = 250
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = true
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.processes]]
[[inputs.system]]
fielddrop = ["uptime_format"]
[[inputs.net]]
ignore_protocol_stats = true
cat /etc/taos/taosadapter.toml
debug = false
taosConfigDir = ""
port = 6041
logLevel = "info"
[cors]
allowAllOrigins = true
[pool]
maxConnect = 4000
maxIdle = 4000
idleTimeout = "1h"
[ssl]
enable = false
certFile = ""
keyFile = ""
[log]
#path = "/var/log/taos"
rotationCount = 30
rotationTime = "24h"
rotationSize = "1GB"
enableRecordHttpSql = false
sqlRotationCount = 2
sqlRotationTime = "24h"
sqlRotationSize = "1GB"
[monitor]
collectDuration = "3s"
incgroup = false
pauseQueryMemoryThreshold = 70
pauseAllMemoryThreshold = 80
identity = ""
writeToTD = false
user = "root"
password = "taosdata"
writeInterval = "30s"
[opentsdb]
enable = true
[influxdb]
enable = true
[statsd]
enable = true
port = 6044
db = "statsd"
user = "root"
password = "taosdata"
worker = 10
gatherInterval = "5s"
protocol = "udp"
maxTCPConnections = 250
tcpKeepAlive = false
allowPendingMessages = 50000
deleteCounters = true
deleteGauges = true
deleteSets = true
deleteTimings = true
[collectd]
enable = false
port = 6045
db = "collectd"
user = "root"
password = "taosdata"
worker = 10
[opentsdb_telnet]
enable = false
maxTCPConnections = 250
tcpKeepAlive = false
dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
ports = [6046, 6047, 6048, 6049]
user = "root"
password = "taosdata"
batchSize = 1
flushInterval = "0s"
[node_exporter]
enable = false
db = "node_exporter"
user = "root"
password = "taosdata"
urls = ["http://localhost:9100"]
responseTimeout = "5s"
httpUsername = ""
httpPassword = ""
httpBearerTokenString = ""
caCertFile = ""
certFile = ""
keyFile = ""
insecureSkipVerify = true
gatherDuration = "5s"
[prometheus]
enable = true
Please tell me how to solve this problem?
thanks. (^▽^)
test API input data.
curl --request POST "http://tdengine-server:6041/influxdb/v1/write?db=telegraf" \
-u root:taosdata \
--data-binary "measurement,host=host1 field1=2i,field2=2.0 1577836800000000000"
taos> show tables;
table_name |
=================================
t_1e2f01eda79dc691cf0e7e3f3... |
Query OK, 1 rows in database (0.005963s)
taos> show stables;
stable_name |
=================================
measurement |
Query OK, 1 rows in database (0.003281s)
taos> select * from measurement;
_ts | field1 | field2 | host |
===============================================================================================================
2020-01-01 00:00:00.000 | 2 | 2.000000000 | host1 |
Query OK, 1 rows in database (0.005164s)
08/31 02:03:48.943832 00000034 TAOS_ADAPTER error "insert line inner error success: 97 fail: 13 errors: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," sessionID=55 result=&{97 13 [ ]} model=influxdb
08/31 02:03:48.944140 00000034 TAOS_ADAPTER info "| 500 | 18.784862ms | 172.16.80.111 | POST | /influxdb/v1/write?db=telegraf " model=web sessionID=55
08/31 02:04:18.948550 00000034 TAOS_ADAPTER error "insert line inner error success: 97 fail: 13 errors: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,," sessionID=56 model=influxdb result=&{97 13 [ ]}
08/31 02:04:18.949052 00000034 TAOS_ADAPTER info "| 500 | 22.771464ms | 172.16.80.111 | POST | /influxdb/v1/write?db=telegraf " model=web sessionID=56
@harvey945 please check if the time precision of the db is nanoseconds
@huskar-t
taos> CREATE DATABASE tt PRECISION "ns";
Query OK, 0 of 0 rows affected (0.052787s)
taos> show variables;
name | value |
==================================================================
statusInterval | 1 |
timezone | Asia/Shanghai (CST, +0800) |
locale | zh_CN.UTF-8 |
charset | UTF-8 |
Query OK, 4 rows in database (0.001007s)
telegraf setting change:
...
url = "http://172.16.80.113:6041/influxdb/v1/write?db=tt"
...
precision = "10ns"
...
The problem remains:
2022-08-31T06:29:49Z E! [agent] Error writing to outputs.http: when writing to [http://172.16.80.113:6041/influxdb/v1/write?db=tt] received status code: 500. body: {"code":"internal error","message":",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"}
2022-08-31T06:29:49Z I! [agent] Stopping running outputs
This problem has troubled me for a long time. If there is a solution, I will try it.
There are a lot of data that fail to be inserted. It will not be executed after more than 1000 rows.
3.0早期版本的bug 都已经都修复了,但是3.0.2.5 之前可能与现在的最新版(3.3.0.0)并不兼容,所以无法直接升级。因此建议重新部署一下最新的 3.3.0.0 ,后续升级都很方便,直接安装最新版软件即可。
开源版支持操作系统范围:https://docs.taosdata.com/reference/support-platform/