Page 1 of 1

At startup not using specified port

Posted: Friday 20 October 2023 11:09
by altaphista
Since my Raspberry reboot my Domoticz is refusing to startup after reboot, especially refusing to start from my specified port.
Until now I had it running on port 8888 where it was working fine next to deCONZ (using 80 thus 8080).

My /home/user/domoticz/domoticz.sh file and /etc/init.d/domoticz.sh file both have "DAEMON_ARGS="$DAEMON_ARGS -www 8888"".
When I start domoticz via $ sudo ./domoticz it gives this as feedback:

Code: Select all

2023-10-20 10:57:18.770  Active notification Subsystems: pushover (1/13)
2023-10-20 10:57:18.773  Status: WebServer(HTTP) started on address: :: with port 8080
2023-10-20 10:57:18.783  Status: WebServer(SSL) started on address: :: with port 443
2023-10-20 10:57:18.786  Starting shared server on: :::6144
no idea what i'm doing wrong. Updated my Pi and domoticz both but no luck...

Re: At startup not using specified port

Posted: Friday 20 October 2023 12:02
by waltervl
The /etc/init.d/domoticz.sh should be used when domoticz starts automatically after reboot.
You can try to set logging to a file in /etc/init.d/domoticz.sh to see why domoticz fails to start.
See wiki for instructions: https://www.domoticz.com/wiki/Troubleshooting

Re: At startup not using specified port

Posted: Friday 20 October 2023 14:09
by altaphista
thnx for your reply, but the whole problem is that I can't discover if /etc/init.d/domoticz.sh is running on startup. Well, domoticz isn't running on 8080 or (my defined) 8888 ports.... :?

When I manually start domoticz by running 'sudo ./domoticz', it isn't even looking at the port in the .sh file.... only when i start it with 'sudo ./domoticz -www 8888' it wil use that port. What is going on?

Re: At startup not using specified port

Posted: Friday 20 October 2023 16:20
by waltervl
what is the output of

Code: Select all

sudo service domoticz status
That should show if domoticz is running as a service and started.

Re: At startup not using specified port

Posted: Friday 20 October 2023 17:08
by altaphista
this is the output after a reboot, with an unreachable domoticz web interface.
Really no idea why the config in /etc/init.d/domoticz.sh is not loaded... beats me. :roll:

Code: Select all

altaphista@raspberrypi:~ $ sudo service domoticz status
● domoticz.service - LSB: Home Automation System
     Loaded: loaded (/etc/init.d/domoticz.sh; generated)
     Active: active (exited) since Fri 2023-10-20 17:03:13 CEST; 22s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 645 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)
        CPU: 9ms

Oct 20 17:03:13 raspberrypi systemd[1]: Starting LSB: Home Automation System...
Oct 20 17:03:13 raspberrypi systemd[1]: Started LSB: Home Automation System.
and this is the output after manual start on port 8888:

Code: Select all

altaphista@raspberrypi:~ $ sudo service domoticz status
● domoticz.service - LSB: Home Automation System
     Loaded: loaded (/etc/init.d/domoticz.sh; generated)
     Active: active (exited) since Fri 2023-10-20 17:03:13 CEST; 2min 32s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 645 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SU>
        CPU: 9ms

Oct 20 17:03:13 raspberrypi systemd[1]: Starting LSB: Home Automation System...
Oct 20 17:03:13 raspberrypi systemd[1]: Started LSB: Home Automation System.
lines 1-9/9 (END)

Re: At startup not using specified port

Posted: Friday 20 October 2023 17:24
by waltervl
That domoticz does not start after reboot is a known issue. Mostly due to network or time not available yet. See the same wiki and look at the cold boot section.
Please enable logging to a file to be sure so you can read why the webserver does not start correctly.

Re: At startup not using specified port

Posted: Monday 23 October 2023 22:41
by altaphista
waltervl wrote: Friday 20 October 2023 17:24 That domoticz does not start after reboot is a known issue. Mostly due to network or time not available yet. See the same wiki and look at the cold boot section.
Please enable logging to a file to be sure so you can read why the webserver does not start correctly.
It's not the issue that it won't start, but the issue is that the port is not loaded. Another service (DeCONZ) is blocking port 8080, so I specified port 8888 for use in the domoticz.sh file, and the logfile says it is using '/etc/init.d/domoticz.sh' but is doesn't use the port that is specified in that file!!! How is that possible.
To make it even stranger, until this previous boot it all worked fine, I didn't change anything. And now it's broken :lol:

Re: At startup not using specified port

Posted: Tuesday 24 October 2023 0:25
by waltervl
From the status output it shows that it is using init-d/domoticz.sh setup. Sou again please also enable logging to the OS the see why it is not using port 8888