Page 2 of 3

Re: pimodbus-master.service failed

Posted: 15 Jul 2020, 10:59
by Amar
Hi Robert,
Thank you for the post.The config file does not have MODBUS configuration.However if you are able to produce the same phenomenon once again then you can write back on the forum and we can make further investigation.
Regards,
Amar

Re: pimodbus-master.service failed

Posted: 15 Jul 2020, 11:22
by RMeissnerCC
Dear Amar,
I apologize for the rather st**id mistake of mine. I attached another config, it is formatted as a json, but it is just the config.rsc nicely formatted. It contains our modbus configuration (I looked into the file this time). Can you derive more from this file?
Best, Robert

Re: pimodbus-master.service failed

Posted: 05 Aug 2020, 11:51
by dirk
Hi Robert,
the error cannot be reproduced from your config.rsc. The error does not reflect a bug in piModbusMaster which uses the config.rsc generated from pictory to read the modbus actions.
However the probability of parsing error with a modified config.rsc from an external script is beyond the scope of piModbusMaster.

Re: pimodbus-master.service failed

Posted: 05 Aug 2020, 12:37
by RMeissnerCC
Dear Dirk,
thank you for your reply. I guess, I will have to assess how the device fares under further usage.
Best, Robert

Re: pimodbus-master.service failed

Posted: 10 Aug 2020, 21:05
by zzzNTG
Hello All,

I am having a very similar issue on my Rev Pi Connect. However, I am unable to recover via power cycling or resetting the driver.

Some background on my issue, I connected an environmental sensor to my revpi connect over MODBUS RTU a few months ago on my development setup and was having no issues. I recently have to restore the revpi connect to its factory image (downloaded from the shop) and now I am unable to re-establish connection to my MODBUS slave devices after setting up the virtual RTU master in piCtory.

Here are the errors being logged in the journal.

Code: Select all

Aug 10 11:43:53 RevPi35497 piModbusMaster[2491]: piModbusMaster started
Aug 10 11:43:53 RevPi35497 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=11/SEGV
Aug 10 11:43:53 RevPi35497 systemd[1]: pimodbus-master.service: Unit entered failed state.
Aug 10 11:43:53 RevPi35497 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Aug 10 11:43:54 RevPi35497 systemd[1]: pimodbus-master.service: Service hold-off time over, scheduling restart.
Aug 10 11:43:54 RevPi35497 systemd[1]: Stopped Revolution Pi Modbus master.

Modbus Master , Action Status and Input Word All remaining at 0:

Code: Select all

pi@RevPi35497:~ $ piTest -r Modbus_Action_Status_1
1 Byte-Value of Modbus_Action_Status_1: 0 dez (=00 hex)
pi@RevPi35497:~ $ piTest -r Modbus_Action_Status_1
1 Byte-Value of Modbus_Action_Status_1: 0 dez (=00 hex)
pi@RevPi35497:~ $ piTest -r Input_Word_1
2 Byte-Value of Input_Word_1: 0 dez (=0000 hex)

Any help would be greatly appreciated.
Thanks in advance!
- Nate

Re: pimodbus-master.service failed

Posted: 11 Aug 2020, 10:37
by Amar
Hi Nate,
Which Image are you using?
The current stretch image 'Stretch 06/2020' with Kernel 4.19 has newer libmodbus v3.1.6 library.

Download link:
https://revolution.kunbus.de/shop/en/stretch

I would first recommend you to use this image and adapt your project settings for this image.Then send me your config.rsc as well as following logs when the error occurs:
1) tail -f /var/log/daemon.log
2) kernel log

Regards,
Amar

Re: pimodbus-master.service failed

Posted: 30 Dec 2020, 03:09
by zzzNTG
Hi Amar,

I was able to use your suggestion a few months ago to get my development setup running. I then deployed software to our production equipment that interfaces with the same modbus RTU slave devices. This worked great for about a month and we have recently ran into issues. At first, the action status code was all 110, device connection timeout. I check all of our connections and nothing seemed to be out of the ordinary. I reset the driver and updated the relevant packages and am now getting the following errors in my daemon logs:

Code: Select all

Dec 29 17:57:12 RevPi17550 piModbusMaster[1610]: piModbusMaster started
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=11/SEGV
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Unit entered failed state.
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Service hold-off time over, scheduling restart.
Dec 29 17:57:12 RevPi17550 systemd[1]: Stopped Revolution Pi Modbus master.
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Start request repeated too quickly.
Dec 29 17:57:12 RevPi17550 systemd[1]: Failed to start Revolution Pi Modbus master.
Dec 29 17:57:12 RevPi17550 dhcpcd[1483]: eth0: carrier acquired
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Unit entered failed state.
Dec 29 17:57:12 RevPi17550 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Any help would be appreciated.

Thanks,
Nate

Re: pimodbus-master.service failed

Posted: 30 Dec 2020, 03:50
by zzzNTG
Hi Amar,

I just realized that this revpi still has the old modbus library "libmodbus5/oldstable,now 3.0.6-2 armhf"
I'm assuming this could be the root cause of my issue. Is there any way to update this library remotely without re-imaging the controller?

Thanks again for your help on this.

Best regards,
Nate

Re: pimodbus-master.service failed

Posted: 31 Dec 2020, 04:22
by zzzNTG
I am now running into the following issue:

Code: Select all

Dec 30 19:14:26 RevPi35497 piModbusMaster[1195]: Modbus connection failed: No such file or directory
Dec 30 19:17:01 RevPi35497 systemd[1]: Reloading The Apache HTTP Server.
Dec 30 19:17:02 RevPi35497 piModbusMaster[1195]: Modbus connection failed: No such file or directory
Dec 30 19:17:02 RevPi35497 apachectl[1347]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Dec 30 19:17:02 RevPi35497 systemd[1]: Reloaded The Apache HTTP Server.
Dec 30 19:18:11 RevPi35497 piModbusMaster[1195]: Modbus connection failed: No such file or directory
There seems to just be issue after issue with this modbus master library or maybe the pictory configuration interface is causing the issue. I'm not sure where the problem occurs. Pitory doesn't seem to be the most stable interface. Sometimes it loads, sometimes it partially loads and then corrupts my configuration file. Any help would be much appreciated.

Best regards,
Nate

Re: pimodbus-master.service failed

Posted: 05 Jan 2021, 11:57
by Amar
Hi Nate,
First verify if MODBUS USB module actually exists (not damaged) and the device_path in piCtory is valid.eg: /dev/ttyUSB0

Update RevPi
sudo apt-get update && sudo apt-get upgrade && sudo reboot

This shall update to libmodbus v3.1.6 and pictory to version 1.4.7
pi@RevPi6284:~ $ uname -a
Linux RevPi6284 4.19.95-rt38-v7+ #1 SMP PREEMPT RT Tue, 16 Jun 2020 13:25:43 +0200 armv7l GNU/Linux

Remove following file from pictory .tmpLastProjectDevices.json and other files under path
/var/www/pictory/projects/ except your project file _config.rsc
check piCtory version piCtory - 1.4.7.This is current version when you update and upgrade RevPi.

In _config.rsc check if "version": "1.4.7" string is there. If not manually edit the version number.
This shall solve the corruption issue of configuration file. Other solution would be recreating the pictory config file.
You can then clear browser cache and see if piCtory functions well and then check piModbusMaster working.

Best Regards,
Amar