FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
01-12-2023 11:09 AM
Hello,
I'am using the IIoT library for the use of the mqtt client and the AWS mqtt client. All of a sudden since a few days (it worked before) I get an EXCEPTION [Watchdog] error in PLC engineering when the mqtt client OR the AWS mqtt client tries to connect with the broker. The weird part is that it worked this morning and after stopping and starting the PLC program I get the error again. When I disconnect the core from the outside the error is not showing up. But when the mqtt FB's are able to connect to the broker (outside of the network) the EXCEPTION [Watchdog] occurs. I'm 100% certain that the AWS and the 'normal' mqtt broker are up and running.
I have tried a Ping and a NTP server FB, which connects to the outside aswell, and they work both without a problem.
In the attachment there is a screenshot of the error inside codesys and the logbook of the ctrlX CORE. Other things i could try to find the solution to this problem?
Kind regards
Solved! Go to Solution.
01-12-2023 05:50 PM
Hi,
could we get the information which version exactly is used in your application,
if it is MQTT version 1.2.0.0 could you please give the 1.3.0.0 a try?
And please do a click on the line in the plc logger to get more information for this exception.
01-13-2023 09:21 AM
I'm using MQTT 1.3.0.0 for both the mqtt libraries. There is no more information I can get. double click and right mouse click do nothing on the error line
01-13-2023 09:32 AM
Hello CDSAddOns,
today we had a session with the customer.
This is the program sequence, when the error occurs:
We saw the issue happening after setting the MQTTClient FB input xEnable To TRUE. It never returns and program stops working, when the watchdog occured. There's no Call stack available :-(.
Here you can see the instance data in case of the watchdog
When the cable to the broker is unplugged everything works fine.
How we can go on, to get more details regarding the root cause?
kind regards
01-18-2023 07:25 AM
Hi,
without having the project- to review - hard to help.
Possible to get the projectarchive?
01-19-2023 09:59 AM
Hi,
Im sorry but For confidential reasons, I cannot share this project with just anyone. However, you are welcome to join me in an online meet to watch or something similar.
Kind regards
02-02-2023 02:08 PM
we think the basic problem is probably that the name resolution from your device does not work.
Endpoint 'xxxxxxxxxx.eu-west-1.amazoneaws.com' ist not reachable from the ctrlx.
02-02-2023 02:20 PM
That endpoint has worked without trouble before. As i compare the endpoint in the PLC program and from the AWS, they are identical:
To connect with the AWS broker the right set of certificates is needed.
02-14-2023 04:37 PM
Hello,
the problem described above occurs when we want to go outside via with the CORE via our 4G router. With a 4G connection, the Router automatically configures a DNS address. (This could be a problem?)
If we connect the CORE to our corporate network we do not get a 'watchdog EXCEPTION' error. The mqtt client does come up with a "TCP_INT_ERROR". What could be the nature of this error? We have checked our settings.
Kind regards
02-24-2023 11:45 AM
A TCP_INIT_ERROR occurs when no connections can be made to the server (SysSock2Connect) or when no socket can be created (SysSock2Create).
Possible causes:
Client certificate not installed/expired correctly (see product datasheet for installation instructions).
Firewall blocks port 8883
Server IP or host not reachable
03-22-2023 08:56 AM
Hello,
i wanted to give an update.
The 'Program loaded - EXCEPTION' watchdog error was triggered by using a 4G router. it seems that the DNS from the AWS broker is not accepted by the DNS server. Choosing an alternative DNS server is not possible for a 4G router. So we continued on our own company network. After this, the watchdog error was resolved.
With the help of CodeSyS we found the problem for the 'TCP_INIT_ERROR'. The 'TCP_INIT_ERROR' occurred because we removed and reinstalled the signed certificate from AWS on the core. We did this because it was installed twice.
When the CSR file is generated, then a key pair (Private/Public) is generated on the PLC. From the CSR file a signed certificate is generated by AWS. If the certificate is deleted, then the key pair on the PLC is also deleted and no connection can be established even when the certificate is imported again. In this case a new CSR file has to be created and the signed certificate has to be imported again.