tuyagateway icon indicating copy to clipboard operation
tuyagateway copied to clipboard

Service fails to start on ubuntu 18.4

Open realjax opened this issue 5 years ago • 3 comments

Used

make install #installs tuyagateway as a service

to create the service, but the service failed with error:

Working directory path '' is not absolute

After editing the .service file and entering a full working path, this error dissapeared but it still fails to start with this output:

tuyagateway.service - Tuya MQTT
   Loaded: loaded (/etc/systemd/system/tuyagateway.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2020-09-14 08:41:44 CEST; 117ms ago
  Process: 14079 ExecStart=/usr/bin/python3 -u main.py (code=exited, status=1/FAILURE)
 Main PID: 14079 (code=exited, status=1/FAILURE)

sep 14 08:41:44 server systemd[1]: tuyagateway.service: Service hold-off time over, scheduling restart.
sep 14 08:41:44 server systemd[1]: tuyagateway.service: Scheduled restart job, restart counter is at 5.
sep 14 08:41:44 server systemd[1]: Stopped Tuya MQTT.
sep 14 08:41:44 server systemd[1]: tuyagateway.service: Start request repeated too quickly.
sep 14 08:41:44 server systemd[1]: tuyagateway.service: Failed with result 'exit-code'.
sep 14 08:41:44 server systemd[1]: Failed to start Tuya MQTT.

realjax avatar Sep 14 '20 06:09 realjax

Note: when running

python3 main.py

nothing happens.. is that normal?

realjax avatar Sep 14 '20 07:09 realjax

It could be normal. Check the log levels https://github.com/tradeface/tuyagateway/wiki//Commandline-options

TradeFace avatar Sep 14 '20 08:09 TradeFace

How do I use those command line options with

python3 main.py

? or is that similar? In which case according to the docs it should be set to INFO by default right?

realjax avatar Sep 14 '20 14:09 realjax