# Error : Communication between iot-data-mqtt-questdb-grafana

**URL:** <https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304>\
**Category:** Community\
**Tags:** question\
**Created:** [December 22, 2024, 8:20am UTC](https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304 "2024-12-22T08:20:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shailavij](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/shailavij/32/185_2.png) [@shailavij](https://community.questdb.com/u/shailavij)\
**Post date:** [December 22, 2024, 8:20am UTC](https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304/1 "2024-12-22T08:20:53Z")

</div>

Hi All,  
I have tried to work on this blog : [Visualizing IoT Data with MQTT, QuestDB, and Grafana | QuestDB](https://questdb.io/blog/visualizing-iot-data-mqtt-questdb-grafana/) . I have followed all steps given in the blog till starting telegraf docker given in this blog , once I have established all connection my mock sensor data is not transferred to QuestDB interface ([http://localhost:9000](http://localhost:9000)).

Log Error in QuestDB docker : i.q.g.e.QueryProgress err [id=-1, sql=`SELECT * FROM sensor`, principal=admin, cache=false, jit=false, time=202792, msg=table does not exist [table=sensor], errno=0, pos=14],

http-server disconnected [ip=192.168.65.1, fd=549755814167, src=queue]

I am not sure how to fix this issue. Could anyone please advice me how to fix this issue & get sensor data in QuestDB interface ?

Thanks

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [December 24, 2024, 10:04am UTC](https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304/2 "2024-12-24T10:04:09Z")

</div>

Hi @shailavij ,

It sounds like the data may not be getting through. Do you see any error logs i.e `E` or `C`when you try to send the data?

The log message you posted is indicative of the table not being created yet, but not of a prior failure to write.

---

<div class="post-metadata">

**Author:** ![shailavij](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/shailavij/32/185_2.png) [@shailavij](https://community.questdb.com/u/shailavij)\
**Post date:** [December 24, 2024, 11:52am UTC](https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304/3 "2024-12-24T11:52:24Z")

</div>

Hi @nwoolmer ,  
Please find log files of Dockers :

Quest DB docker : 2024-12-24 11:46:21 2024-12-24T11:46:21.191268Z I i.q.g.e.QueryProgress exe [id=83, sql=`with tel as ( SELECT cast(created as long), event, origin FROM telemetry WHERE created > '2024-12-24T11:45:23.925Z' LIMIT -10000 ) SELECT cast(created as long), cast(1000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(ceil(sum(rowCount) / 1000.0) as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(2000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(count() as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(3000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(max(latency) / 1000.0 as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT * FROM tel`, principal=admin, cache=false, jit=false]

2024-12-24 11:46:21 2024-12-24T11:46:21.192017Z I i.q.g.e.QueryProgress fin [id=83, sql=`with tel as ( SELECT cast(created as long), event, origin FROM telemetry WHERE created > '2024-12-24T11:45:23.925Z' LIMIT -10000 ) SELECT cast(created as long), cast(1000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(ceil(sum(rowCount) / 1000.0) as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(2000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(count() as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(3000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(max(latency) / 1000.0 as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT * FROM tel`, principal=admin, cache=false, jit=false, time=769833]

2024-12-24 11:46:21 2024-12-24T11:46:21.192040Z I i.q.c.h.p.JsonQueryProcessorState [120259084558] timings [compiler: 4044041, count: 0, execute: 4977958, q=`with tel as ( SELECT cast(created as long), event, origin FROM telemetry WHERE created > '2024-12-24T11:45:23.925Z' LIMIT -10000 ) SELECT cast(created as long), cast(1000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(ceil(sum(rowCount) / 1000.0) as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(2000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(count() as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT cast(created as long), cast(3000 as short), cast(case when sm >= 0 then sm else 32767 end as short) FROM ( SELECT created, cast(max(latency) / 1000.0 as short) sm FROM sys.telemetry_wal WHERE created > '2024-12-24T11:45:23.925Z' and rowCount > 0 SAMPLE BY 1h align to calendar ) UNION ALL SELECT * FROM tel`]

2024-12-24 11:46:21 2024-12-24T11:46:21.202725Z I i.q.c.h.p.StaticContentProcessor [120259084558] incoming [url=/assets/vs/base/worker/workerMain.js]

2024-12-24 11:46:21 2024-12-24T11:46:21.223193Z I http-server disconnected [ip=192.168.65.1, fd=485331304722, src=queue]

2024-12-24 11:46:21 2024-12-24T11:46:21.223340Z I http-server disconnected [ip=192.168.65.1, fd=476741370128, src=queue]

Telegraf log:  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loading config: /etc/telegraf/telegraf.conf  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Starting Telegraf 1.33.0 brought to you by InfluxData the makers of InfluxDB  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Available plugins: 236 inputs, 9 aggregators, 33 processors, 26 parsers, 63 outputs, 6 secret-stores  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loaded inputs: mqtt\_consumer  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loaded aggregators:  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loaded processors:  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loaded secretstores:  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Loaded outputs: socket\_writer  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! Tags enabled: host=d01dc01f483b  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! [agent] Config: Interval:1s, Quiet:false, Hostname:“d01dc01f483b”, Flush Interval:10s  
2024-12-24 11:37:59 2024-12-24T11:37:59Z I! [inputs.mqtt\_consumer] Connected [tcp://mosquitto:1883]

Mosquitto Log:

2024-12-24 11:35:29 1735040129: mosquitto version 2.0.20 starting  
2024-12-24 11:35:29 1735040129: Config loaded from /mosquitto/config/mosquitto.conf.  
2024-12-24 11:35:29 1735040129: Opening ipv4 listen socket on port 1883.  
2024-12-24 11:35:29 1735040129: mosquitto version 2.0.20 running  
2024-12-24 11:37:59 1735040279: New connection from 172.23.0.4:52548 on port 1883.  
2024-12-24 11:37:59 1735040279: New client connected from 172.23.0.4:52548 as telegraf (p2, c1, k60).

Backend Data ‘main.go’ file running to publish the mock sensor data in VS code. Kindly review my log files and suggest me how can I fix this issue to get data in QuestDB.

Thanks

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [December 24, 2024, 2:34pm UTC](https://community.questdb.com/t/error-communication-between-iot-data-mqtt-questdb-grafana/304/4 "2024-12-24T14:34:31Z")

</div>

Hi @shailavij ,

Those error logs from QuestDB are not related to ingestion.

Try updating your Telegraf config to match the main docs: [Telegraf | QuestDB](https://questdb.com/docs/third-party-tools/telegraf/)

Generally, it is preferred to send ILP via HTTP rather than TCP transport.
