Hey community.
I am trying hivemq edge and trying to cestablish a communication with siemens S7-1200 PLC, and I am experiencing intermittent connectivity problems with the PLC, where it continuously connects and disconnects. Additionally, The messages are not being published on the HiveMQ web client even though a good connection is established between the HiveMQ Edge and the HiveMQ cloud broker.
Thanks for your help.
Hello @ESA
Welcome to the HiveMQ Community! Although I’m not familiar with the Siemens S7-1200 PLC device, I’d be happy to assist you in troubleshooting the issue.
- Are you using the latest version 2024.7 of HiveMQ Edge?
- Any error message on the Event Log page?
- How HiveMQ Edge is deployed in your environment (VM, Docker Container)?
Kind regards,
Diego from HiveMQ Team
Hello @Diego,
I am using HiveMQ Edge version 2024.6 deployed in Docker.
Payload of the Error shown in the Event Log page is: com.hivemq.client.mqtt.exceptions.ConnectionFailedException: java.net.UnknownHostException: 01729f58cb6141b59547247dd297de1b.s1.eu.hivemq.cloud: Name or service not known
Caused by: java.net.UnknownHostException: 01729f58cb6141b59547247dd297de1b.s1.eu.hivemq.cloud: Name or service not known
at java.base/java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(Unknown Source)
at java.base/java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.base/java.net.InetAddress$NameServiceAddresses.get(Unknown Source)
at java.base/java.net.InetAddress.getAllByName0(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at java.base/java.net.InetAddress.getAllByName(Unknown Source)
at java.base/java.net.InetAddress.getByName(Unknown Source)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:156)
at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:153)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153)
at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61)
at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:53)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:55)
at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:31)
at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:106)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:220)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:171)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:157)
at com.hivemq.client.internal.mqtt.handler.connect.MqttConnAckSingle.connect(MqttConnAckSingle.java:91)
at com.hivemq.client.internal.mqtt.handler.connect.MqttConnAckSingle.lambda$null$2(MqttConnAckSingle.java:161)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.whenComplete(Unknown Source)
at com.hivemq.client.internal.mqtt.handler.connect.MqttConnAckSingle.lambda$reconnect$3(MqttConnAckSingle.java:156)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:153)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
It seems like there might be a DNS issue while resolving the HiveMQ Cloud cluster URL, as indicated by the UnknownHostException error. Could you please open the terminal for your HiveMQ Edge Docker container, run the following command, and share the output?
curl -v telnet://01729f58cb6141b59547247dd297de1b.s1.eu.hivemq.cloud:8883
Kind regards,
Diego from HiveMQ Team
here is the output:
- Host 01729f58cb6141b59547247dd297de1b.s1.eu.hivemq.cloud:8883 was resolved.
- IPv6: (none)
- IPv4: 46.137.47.218, 54.73.92.158, 52.31.149.80
- Trying 46.137.47.218:8883…
- Connected to 01729f58cb6141b59547247dd297de1b.s1.eu.hivemq.cloud (46.137.47.218) port 8883
Weird, can you share the MQTT bridge configuration you are using?
Can you perform a test by creating a MQTT bridge using our Public HiveMQ MQTT broker?
Host: broker.hivemq.com
Port: 1883
Kind regards,
Diego from HiveMQ Team