g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 274 forks source link

systemd service not working #417

Open iw5ejm opened 6 years ago

iw5ejm commented 6 years ago

Running on armbian, followed the readme in linux folder. User mmdvm ok and in dialout group. From bash with sudo MMDVMHost works without problems-

`mmdvmhost.service - MMDVMHost Radio Servce
   Loaded: loaded (/lib/systemd/system/mmdvmhost.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-05-04 09:46:32 UTC; 3s ago
  Process: 2113 ExecStop=/usr/local/sbin/mmdvmhost_service stop (code=exited, status=1/FAILURE)
  Process: 2088 ExecStart=/usr/local/sbin/mmdvmhost_service start (code=exited, status=0/SUCCESS)

May 04 09:46:32 orangepizero systemd[1]: Starting MMDVMHost Radio Servce...
**May 04 09:46:32 orangepizero mmdvmhost_service[2088]: MMDVMHost: SerialController.cpp:230: CSerialController::CSerialController(const string&, SERIAL_SPEED, bool): Assertion `!device.empty()' failed.**
May 04 09:46:32 orangepizero mmdvmhost_service[2088]: Aborted
May 04 09:46:32 orangepizero mmdvmhost_service[2088]: MMDVMHost started as PID
May 04 09:46:32 orangepizero mmdvmhost_service[2113]: MMDVMHost is not running
May 04 09:46:32 orangepizero systemd[1]: mmdvmhost.service: Control process exited, code=exited status=1
May 04 09:46:32 orangepizero systemd[1]: Failed to start MMDVMHost Radio Servce.
May 04 09:46:32 orangepizero systemd[1]: mmdvmhost.service: Unit entered failed state.
May 04 09:46:32 orangepizero systemd[1]: mmdvmhost.service: Failed with result 'exit-code'.`
phl0 commented 6 years ago

Which user is the MMDVMHost process running under and does the user have write permissions to the serial device? Is the correct serial device entered in MMDVM.ini?

iw5ejm commented 6 years ago

Tnx for reply!

Which user is the MMDVMHost process running under and does the user have write permissions to the serial device? Yes.. I tried with root and with user mmdvm which is in dialout group

Is the correct serial device entered in MMDVM.ini? yes..the same used in starting from bash.

2018-05-04 13:41 GMT+02:00 Florian (DF2ET) notifications@github.com:

Which user is the MMDVMHost process running under and does the user have write permissions to the serial device? Is the correct serial device entered in MMDVM.ini?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g4klx/MMDVMHost/issues/417#issuecomment-386575863, or mute the thread https://github.com/notifications/unsubscribe-auth/AdRjYIVmr0y7feX4eI-BOQ5ZHVpJ8eUFks5tvD5ugaJpZM4TyYiv .

ckoval7 commented 5 years ago

I'm experiencing the exact same problem. MMDVMHost works perfectly when starting from Bash. When I try to start it from systemd using the provided scripts, it fails.

pi@hotspot:~ $ sudo systemctl status mmdvmhost.service
● mmdvmhost.service - MMDVMHost Radio Servce
   Loaded: loaded (/lib/systemd/system/mmdvmhost.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-02-03 04:42:54 GMT; 1min 2s ago
  Process: 530 ExecStop=/usr/local/sbin/mmdvmhost_service stop (code=exited, status=1/FAILURE)
  Process: 513 ExecStart=/usr/local/sbin/mmdvmhost_service start (code=exited, status=0/SUCCESS)

Feb 03 04:42:53 hotspot systemd[1]: Starting MMDVMHost Radio Servce...
Feb 03 04:42:54 hotspot mmdvmhost_service[513]: runuser: warning: cannot change directory to /home/mmdvm: No such file o
Feb 03 04:42:54 hotspot mmdvmhost_service[513]: runuser: failed to execute /sbin/nologin: No such file or directory
Feb 03 04:42:54 hotspot mmdvmhost_service[513]: MMDVMHost started as PID
Feb 03 04:42:54 hotspot mmdvmhost_service[530]: MMDVMHost is not running
Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Control process exited, code=exited status=1
Feb 03 04:42:54 hotspot systemd[1]: Failed to start MMDVMHost Radio Servce.
Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Unit entered failed state.
Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Failed with result 'exit-code'.

What's really peculiar is "warning: cannot change directory to /home/mmdvm". None of my files call that up, and I can't find where that's coming from. I configured it to look for /home/pi/MMDVMHost/

iw5ejm commented 5 years ago

I think you lake mmdvm user in system.

Addio It with right permissions ti access USB devices adding It ti dialout user group

Il giorno dom 3 feb 2019, 05:55 Corey Koval notifications@github.com ha scritto:

I'm experiencing the exact same problem. MMDVMHost works perfectly when starting from Bash. When I try to start it from systemd using the provided scripts, it fails.

`pi@hotspot:~ $ sudo systemctl status mmdvmhost.service ● mmdvmhost.service - MMDVMHost Radio Servce Loaded: loaded (/lib/systemd/system/mmdvmhost.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2019-02-03 04:42:54 GMT; 1min 2s ago Process: 530 ExecStop=/usr/local/sbin/mmdvmhost_service stop (code=exited, status=1/FAILURE) Process: 513 ExecStart=/usr/local/sbin/mmdvmhost_service start (code=exited, status=0/SUCCESS)

Feb 03 04:42:53 hotspot systemd[1]: Starting MMDVMHost Radio Servce... Feb 03 04:42:54 hotspot mmdvmhost_service[513]: runuser: warning: cannot change directory to /home/mmdvm: No such file o Feb 03 04:42:54 hotspot mmdvmhost_service[513]: runuser: failed to execute /sbin/nologin: No such file or directory Feb 03 04:42:54 hotspot mmdvmhost_service[513]: MMDVMHost started as PID Feb 03 04:42:54 hotspot mmdvmhost_service[530]: MMDVMHost is not running Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Control process exited, code=exited status=1 Feb 03 04:42:54 hotspot systemd[1]: Failed to start MMDVMHost Radio Servce. Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Unit entered failed state. Feb 03 04:42:54 hotspot systemd[1]: mmdvmhost.service: Failed with result 'exit-code'.`

What's really peculiar is "warning: cannot change directory to /home/mmdvm". None of my files call that up, and I can't find where that's coming from. I configured it to look for /home/pi/MMDVMHost/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g4klx/MMDVMHost/issues/417#issuecomment-460023201, or mute the thread https://github.com/notifications/unsubscribe-auth/AdRjYIozx6cUPoDDoygL5rxxqObYGmeJks5vJmvNgaJpZM4TyYiv .

iddq commented 4 years ago

https://github.com/g4klx/MMDVMHost/issues/600