Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Failed to start #56

Closed
thelamnguyen72 opened this issue Apr 12, 2020 · 8 comments
Closed

Service Failed to start #56

thelamnguyen72 opened this issue Apr 12, 2020 · 8 comments
Labels

Comments

@thelamnguyen72
Copy link

Hi Victor
I'm trying to use mbusd on my raspberry Pi as a Modbus TCP 2 serial server and every time I reboot the pi it always displayed a message : "Failed to start Modbus TCP to Modbus (RS-232/485) gateway.
Here is output form systemctl

root@raspberrypi:/home/pi# systemctl status mbusd@ttyUSB0.service
● mbusd@ttyUSB0.service - Modbus TCP to Modbus RTU (RS-232/485) gateway.
   Loaded: loaded (/lib/systemd/system/mbusd@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-04-12 20:40:31 BST; 3min 7s ago
  Process: 317 ExecStart=/usr/local/bin/mbusd -d -v2 -L - -c /usr/local/etc/mbusd/mbusd-ttyUSB0.conf -p /dev/ttyUSB0 (code=exited, status=255/EXCEPTION)
 Main PID: 317 (code=exited, status=255/EXCEPTION)

Apr 12 20:40:31 raspberrypi systemd[1]: mbusd@ttyUSB0.service: Service RestartSec=1s expired, scheduling restart.
Apr 12 20:40:31 raspberrypi systemd[1]: mbusd@ttyUSB0.service: Scheduled restart job, restart counter is at 5.
Apr 12 20:40:31 raspberrypi systemd[1]: Stopped Modbus TCP to Modbus RTU (RS-232/485) gateway..
Apr 12 20:40:31 raspberrypi systemd[1]: mbusd@ttyUSB0.service: Start request repeated too quickly.
Apr 12 20:40:31 raspberrypi systemd[1]: mbusd@ttyUSB0.service: Failed with result 'exit-code'.
Apr 12 20:40:31 raspberrypi systemd[1]: Failed to start Modbus TCP to Modbus RTU (RS-232/485) gateway..

I've noticed the messages saying that:
"Start request repeated too quickly"
"Failed with result 'exit-code'

Please advice on this matter. Thanks

@3cky
Copy link
Owner

3cky commented Apr 14, 2020

Did it work when started manually from the command line? If not, please start it with -v9 -L/tmp/mbusd.log options and post generated mbusd.log file here.

@thelamnguyen72
Copy link
Author

thelamnguyen72 commented Apr 14, 2020 via email

@thelamnguyen72
Copy link
Author

thelamnguyen72 commented Apr 14, 2020 via email

@3cky
Copy link
Owner

3cky commented Apr 15, 2020

sudo mbusd -L/tmp/mbusd.log /dev/ttyUSB0 -s 38400 -P 502 -d -v9

Looks like you forgot to add -p option before device name /dev/ttyUSB0, so mbusd is trying to open wrong serial port.

@thelamnguyen72
Copy link
Author

thelamnguyen72 commented Apr 15, 2020 via email

@3cky
Copy link
Owner

3cky commented Apr 17, 2020

Well, the log output looks normal. Did you try to connect to mbusd with a TCP client? If mbusd works when started by hand, I would suspect some problem in your systemd instance config file, like wrong bind address.

@thelamnguyen72
Copy link
Author

thelamnguyen72 commented Apr 17, 2020 via email

@stale
Copy link

stale bot commented Aug 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 15, 2020
@stale stale bot closed this as completed Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants