Page 1 of 1

Can't start domoticz service. Error domoticz.sh

Posted: Thursday 13 September 2018 4:32
by denman091
Hello,

My system:
Rsp3 strech
Latest stable version domoticz
Rfxcom
Yeelight bulbs
Kaku
Milight gateway & led controller

Everything works fine for a coupe of week now. Yesterday i made an image of the sd card on my Macbook for backup. Place the sd card back in de rsp and start the raspberry.
Ow it says Domoticz is offline. When i connect with ssh and send:
"Sudo service domoticz start" i get the following error.

pi@Domoticz:~ $ sudo service domoticz status
● domoticz.service
   Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-09-13 04:13:01 CEST; 5min a
     Docs: man:systemd-sysv-generator(8)
  Process: 1488 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=203

Sep 13 04:13:01 Domoticz systemd[1]: Starting domoticz.service...
Sep 13 04:13:01 Domoticz systemd[1]: domoticz.service: Control process exited, c
Sep 13 04:13:01 Domoticz systemd[1]: Failed to start domoticz.service.
Sep 13 04:13:01 Domoticz systemd[1]: domoticz.service: Unit entered failed state
Sep 13 04:13:01 Domoticz systemd[1]: domoticz.service: Failed with result 'exit-
lines 1-11/11 (END)


So it look like there is something with the domoticz.sh file in /etc/init.d

I hope someone can explain this error and can help me to fix this.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Thursday 13 September 2018 8:26
by ben53252642
Run a check on the file system, sounds like the SD Card may be corrupt after you imaged it.

That's the first thing that needs to be ruled out.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Thursday 13 September 2018 10:46
by denman091
ben53252642 wrote:Run a check on the file system
What is the best way to do that?

Edit:
Should the Domoticz.sh file in /etc/init.d/ be the same as the domticz.sh file in the /domoticz directory?
Cause i copied both to my macbook and i see some strange texts in the domoticz.sh file from /etc/init.d/ who are not in the other domoticz.sh file.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 14 September 2018 16:56
by denman091
Does anyone know if the Domoticz.sh file in /etc/init.d/ has to be the same as the domticz.sh file in the /domoticz directory?
Cause i copied both to my macbook and i see some strange texts in the domoticz.sh file from /etc/init.d/ who are not in the other domoticz.sh file.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 14 September 2018 17:45
by nschoot
Depends what you mean by "strange text"... They don't have to be the same, but it does not make sense if one of them does not make sense :)

Strange text could indicate sd card corruption. My SD card just died without warning the other day and I heard it is definitely not uncommon... So I would consider myself lucky to get this warning, backup as much as you can and try whether you can repair your card.

E.g: https://www.raspberrypi.org/forums/viewtopic.php?t=8451

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 14 September 2018 18:23
by ben53252642
denman091, considering the number of plugins you are using, I'd suggest to consider running Domoticz on an i3 Intel NUC.

If you search the forum, you will find many threads talking about corrupt SD cards, it's a common issue since they can have very limited write endurance compared to an SSD (eg 2.5 inch or M2).

Not saying that's definitely the cause of this particular problem, it may not be but it sounds like you have a considerable size system. Investing in a NUC might be a good idea.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 14 September 2018 22:12
by denman091
i copied the domoticz.sh file from the domoticz directory to /etc/init.d/ this seems to work.
now i have one error when start the service.
I run "Sudo service domoticz start" and then "sudo service domoticz status" then i get the following error:

domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
Active: active (exited) since Fri 2018-09-14 22:05:41 CEST; 1min 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 761 ExecStop=/etc/init.d/domoticz.sh stop (code=exited, status=0/SUCCESS)
Process: 771 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)

Sep 14 22:05:41 Domoticz systemd[1]: Starting LSB: Home Automation System...
Sep 14 22:05:41 Domoticz domoticz.sh[771]: Segmentation fault
Sep 14 22:05:41 Domoticz systemd[1]: Started LSB: Home Automation System.

So it says "segmentation fault", what can i do to fix this?

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 14 September 2018 22:24
by ben53252642
Search Google, read through forum threads and see if you can find a solution for the error..

https://www.google.com/search?q=domotic ... tion+fault

Have you done what multiple people have said and checked the file system for errors?

It is sounding like your installation might be corrupt.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Thursday 15 August 2019 0:45
by HenriZ
this is a file right issue. If you use root to start the service, it will work. So don't sudo, but actually become root and then start the service.

Re: Can't start domoticz service. Error domoticz.sh

Posted: Friday 16 August 2019 11:12
by niketsurve
Thanks for the sharing