No MQTT messages although ifm IO-Link-Master is connected

This provides a step-by-step troubleshooting guide for ifm IO-link masters connected via sensorconnect.

Problem

There are no MQTT messages in MQTT Explorer, although the MQTT Explorer configuration is correct (see also

Setting up the MQTT broker to see MQTT-messages

Solution

As a first step we take a look whether sensorconnect is running.

  1. Connect to the stack using Lens (https://docs.umh.app/docs/getting-started/setup-development/#step-3-connect-via-ssh or the Youtube Video)

How to configure the UMH stack with Lens and Kubernetes

  1. Open the logs of the sensorconnect Pod and see whether there are any error messages

    Untitled

Error message: Neither MQTT not Kafka output enabled

2022-05-18_15h22_57.png

This is fixable by opening the Values of the UMH release in lens and looking for the sensorconnect indentations. Either mqtt-enable or kafka-enable needs to be true. Do note that mqtt is currently not fully supported anymore on the newest versions and sensorconnect might still fail afterwards if you set mqtt-enable to true .

There are no error messages, but it can also not find any devices

{'log.level':'info','@timestamp':'2022-05-17T14:40:07.979Z','log.origin':{'file.name':'sensorconnect/main.go','file.line':71},'message':'This is sensorconnect build date: 2022-05-06 14:20:26','ecs.version':'1.6.0'}
{'log.level':'info','@timestamp':'2022-05-17T14:40:07.982Z','log.origin':{'file.name':'sensorconnect/main.go','file.line':94},'message':'Starting with Kafka','ecs.version':'1.6.0'}
%4|1652798408.189|CONFWARN|rdkafka#producer-1| [thrd:app]: Configuration property group.id is a consumer property and will be ignored by this producer instance
%4|1652798408.586|CONFWARN|rdkafka#producer-2| [thrd:app]: Configuration property group.id is a consumer property and will be ignored by this producer instance
{'log.level':'info','@timestamp':'2022-05-17T14:40:08.677Z','log.origin':{'file.name':'sensorconnect/main.go','file.line':203},'message':'Scanning IP range: 172.16.38.1/24','ecs.version':'1.6.0'

We see the above logs. As you can see there are no error messages, but it also did not find any devices. The IP-range is correct.

MicrosoftTeams-image.png

We check the IO-Link master and see that there is a physical network connection. Therefore, it must mean that the sensorconnect microservice is not able to access the IO-Link master. It could be in a different network or there could be a firewall blocking the access. To troubleshoot you can try finding it in the network (port 80 will be open) using this guide:

Finding IP of VM

Or in general

Troubleshooting networking issues

… is the IO-Link master in the right port in the factory cube?

At first it wasn’t:

Untitled

So we connected the IO-Link master to the factory cube through another port. Then suddenly it is in the network and has the IP address 172.16.38.144:

Untitled

in Lens we see the sensorconnect Pod is now finding the device. (This might take a while.)

Untitled

But still the sensor data can’t be found by the MQTT-in in Node-RED. What to do now?