# Error with Telegraf Agent (?)

**URL:** <https://community.influxdata.com/t/error-with-telegraf-agent/39149>\
**Category:** Telegraf\
**Created:** [November 5, 2024, 1:49pm UTC](https://community.influxdata.com/t/error-with-telegraf-agent/39149 "2024-11-05T13:49:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucariello](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/lucariello/32/16102_2.png) [@lucariello](https://community.influxdata.com/u/lucariello)\
**Post date:** [November 5, 2024, 1:49pm UTC](https://community.influxdata.com/t/error-with-telegraf-agent/39149/1 "2024-11-05T13:49:19Z")

</div>

Hi all, I think I have a problem with “telegraf agent”. When I start it, it gets stuck on these inputs and doesn’t go any further.

```auto
I! [inputs.modbus] Got 1 request(s) touching 6 holding registers for 3 fields (slave 1)
I! [inputs.modbus] Got 0 request(s) touching 0 inputs registers for 0 fields (slave 1)
I! [inputs.modbus] Got 0 request(s) touching 0 discrete registers for 0 fields (slave 1)
I! [inputs.modbus] Got 0 request(s) touching 0 coil registers for 0 fields (slave 1)

```

I am using the modbus TCP inputs plugin and the input configuration file is as follows:

```auto
[[inputs.modbus]]
name = "Analyzer 1"
timeout = "2s"
controller = "tcp://192.168.0.17:502"
transmission_mode = "TCP"
debug_connection = true
configuration_type = "request"

[[inputs.modbus.request]]
    slave_id = 1
    byte_order = "ABCD"
    register = "holding"
    fields = [
         { address = 2562, name = "V1",type = "FLOAT32"},
         { address = 2564, name = "V2",type = "FLOAT32"},
         { address = 2566, name = "V3", type = "FLOAT32"}
]

    [inputs.modbus.request.tags]
      slave_id = "1"
      location = "AN. 1"

     [inputs.modbus.workarounds]
           close_connection_after_gather = true

```

The Telegraf global config:

```auto
# Telegraf Configuration
# Configuration for telegraf agent
[agent]
   interval = "30s"
   round_interval = true
   metric_batch_size = 1000
   metric_buffer_limit = 10000
   collection_jitter = "5s"
   flush_interval = "10s"
   flush_jitter = "0s"
   precision = "0s"
   hostname = ""
   omit_hostname = false

```

I tried with MBPoll and I can read the analyzer data.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [November 18, 2024, 3:01pm UTC](https://community.influxdata.com/t/error-with-telegraf-agent/39149/2 "2024-11-18T15:01:27Z")

</div>

MBPoll might use 1-based addressing and Telegraf might use 0-based addressing. Check if the address values in your config are off by 1?  
i.e, if MBPoll works with address `2563`, try using `address = 2561` in Telegraf.

Can you start with one field and then see the rest?

Also set:  
[agent]  
debug = true

For detailed logs.

@srebhan do you have any idea? Thank you

---

<div class="post-metadata">

**Author:** ![lucariello](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/lucariello/32/16102_2.png) [@lucariello](https://community.influxdata.com/u/lucariello)\
**Post date:** [November 19, 2024, 9:07am UTC](https://community.influxdata.com/t/error-with-telegraf-agent/39149/3 "2024-11-19T09:07:57Z")

</div>

Hi Aniasdg, thanks for the reply.  
I tried but nothing, today I noticed that Telegraf gives me this message

```auto
level=warning msg="DBUS_SESSION_BUS_ADDRESS envvar looks to be not set, this can lead to runaway dbus-daemon processes. To avoid this, set envvar DBUS_SESSION_BUS_ADDRESS=$XDG_RUNTIME_DIR/bus (if it exists) or DBUS_SESSION_BUS_ADDRESS=/dev/null." func="gosnowflake.(*defaultLogger).Warn" file="log.go:244"

```

I tried with

```auto
export DBUS_SESSION_BUS_ADDRESS=/dev/null

```

but the message is shown again.

---

<div class="post-metadata">

**Author:** ![lucariello](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/lucariello/32/16102_2.png) [@lucariello](https://community.influxdata.com/u/lucariello)\
**Post date:** [November 19, 2024, 1:44pm UTC](https://community.influxdata.com/t/error-with-telegraf-agent/39149/4 "2024-11-19T13:44:55Z")

</div>

From what I see, no errors are generated and everything seems to be working for the system.  
Today I noticed that once started with

```auto
service telegraf start

```

The data in InfluxDB is written to me with about 2 hours of delay. What could be the cause?
