influx 写入命令抛出错误:“不支持的协议方案”

问题描述 投票:0回答:1

我已经使用以下命令从 InfluxDB 存储桶中导出了我的数据:

> influxd inspect export-lp --bucket-id d5f80730ede82d67 --engine-path ~\.influxdbv2\engine --output-path ~\Desktop\my-data.lp.gz --start 2022-11-01T00:00:00Z --end 2022-12-31T00:00:00Z --compress

我正在按照这个 influxdb 文档的步骤进行操作。

导出文件的大小约为 8MB。

我使用以下命令将导出的文件写回我的新存储桶:

> influx write --bucket my-new-bucket --file ~\Desktop\my-data.lp.gz

我正在关注这个 InfluxDB 文档 来写我的数据。

现在当我尝试将其写回数据库时,出现错误:

错误:写入数据失败:发布“/api/v2/write?bucket=my-new-bucket&org=00ef2f123c4706fd&precision=ns”:不支持的协议方案“”

我什至尝试在不压缩和使用 .txt 格式的情况下导出和导入我的线路协议。对于我所有的尝试,我仍然面临同样的错误。

我什至尝试通过 Telegraf > Sources > Line Protocol 上传相同的导出文件。但这也因错误而失败:

无法写入数据

写入数据失败 - 提交的线路协议无效。

我不知道为什么从InfluxDB的“export-lp”命令导出的文件在我尝试写回时失败。

export influxdb migrate telegraf influx-line-protocol
1个回答
0
投票

If it can help ,你我有这个错误。因为我没有系统变量: INFLUX_HOST: InfluxDB host URL.-->export INFLUX_HOST=http://localhost:8086

[root@Monitor influxdb]# export INFLUX_HOST="" [root@MonitorF influxdb]# influx write --bucket buck01 --precision s "home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067400" 错误:写入数据失败:发布“/api/v2/write?bucket=buck01&org=FGV&precision=s”:不支持的协议方案“” [root@MonitorFGV influxdb]#

influx write --bucket buck01 -host "http://localhost:8086" --precision s "home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067400" 好的没有错误

© www.soinside.com 2019 - 2024. All rights reserved.