Service 8080 does not start

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
peterbos
Posts: 93
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Service 8080 does not start

Post by peterbos »

Hi,

When I restart my Raspberry Pi it doesn't restart Domoticz. Apparently the web server (:8080) doesn't start as I found out at the internet. When I start the webserver manually by SSH with the command "sudo systemctl restart domoticz.service" it seems to be stable until I restart the Pi again... Why does the web server not run at startup and how can I repair this so it starts automatically?

Peter
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: Service 8080 does not start

Post by AllesVanZelf »

See this post: link.

This is to be done on commandline:

Code: Select all

sudo crontab -e 
and add:

Code: Select all

reboot sleep 60 ; sudo /etc/init.d/domoticz.sh restart
ctrl-X om op te slaan en verlaten.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Service 8080 does not start

Post by EddyG »

A beter way is to use the domoticz internal delay.
When domoticz is installed in /home/pi/domoticz just do

Code: Select all

/home/pi/domoticz/domoticz --help
You will see all the command line options, one of them is " -startupdelay seconds (default=0) "
if you put in " /etc/init.d/domoticz.sh "at the end of the option lines with nano, or other editor.

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS  -startupdelay 30"
30 seconds should be more then enough and do after that

Code: Select all

sudo systemctl daemon-reload
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Service 8080 does not start

Post by waltervl »

Just for the record, these command line parameters are also available on the wiki page https://www.domoticz.com/wiki/Command_line_parameters
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Service 8080 does not start

Post by EddyG »

For the record, those are just a copy/paste of the cmdline output. A Wiki should explain those parameters a little bit more.
If you want to be flexible, go for the " -f config_file (for example /etc/domoticz.conf)(Unix Only) " parameter.
And change your the rest of the parameters in the "config_file", its handy for those debug parameters.
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: Service 8080 does not start

Post by AllesVanZelf »

EddyG, and others,
I like the idea of this config file. I've never found that before.
I start domoticz as a systemd service with all the parameters in the ExecStart commandline.
If I understand this well, I could replace these parameters by: -f config_file /home/pi/domoticz/domoticz.conf ?
And what about the format of this conf file? Is it used like:

Code: Select all

DAEMON_ARGS="-daemon"
DAEMON_ARGS= etc. 
?
That would be nice.

Edit:
I tried:

Code: Select all

/home/pi/domoticz/domoticz -f config_file /home/pi/domoticz/domoticz.conf
With different content in the conf file. But then I get this:

Code: Select all

2021-06-25 11:29:44.856  Error: Please specify the configuration file.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Service 8080 does not start

Post by EddyG »

If you installed Domoticz the "normal" way there should be a file domoticz.conf, otherwise you can fetch it here: https://raw.githubusercontent.com/domot ... oticz.conf
This should be in the scripts dir. The text "config_file" is a placeholder, should have been written as <config_file>
To start domoticz, it should be

Code: Select all

/home/pi/domoticz/domoticz -f /home/pi/domoticz/scripts/domoticz.conf
or debian default

Code: Select all

/home/pi/domoticz/domoticz -f /etc/domoticz.conf
AllesVanZelf
Posts: 265
Joined: Monday 05 February 2018 8:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 12467
Location: Netherlands, near Haarlem
Contact:

Re: Service 8080 does not start

Post by AllesVanZelf »

Yes Top. Thank you EddyG. This is working. Never seen this conf file before.
Domoticz 2020.1 (12230) on Raspberry Pi 3B with Raspian Buster. Besides Domoticz, Rpi is running Pi-Hole.
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Service 8080 does not start

Post by waltervl »

Please feel free to modify that wiki page, it is also your page :-) . I also never heard of that config file and was wondering what it could do.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
peterbos
Posts: 93
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Service 8080 does not start

Post by peterbos »

Hi all,

I can write programs in Pascal, in dzVents, in Arduino C/C++ and even Scratch :D but Linux commands are like abracadabra to me. Can anyone give me a "How to (re)boot Domotiz 30 seconds after startup" for Dummies explanation please?

Thanks,
Peter
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Service 8080 does not start

Post by Toulon7559 »

Would this 'feature' not be a candidate to include nested in a next update of Domoticz?
Argument: probably most users when restarting the computer have the aim to get Domoticz operational asap.
Proposed place for inclusion: make it part of 'Restart computer' in submenu 'Other options' of 'Setup'

[Unfortunately not myself capable to make such adaptation, because :( not knowing enough about the 'internals' of Domoticz]]
Last edited by Toulon7559 on Sunday 18 July 2021 14:59, edited 1 time in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
User avatar
waltervl
Posts: 5908
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Service 8080 does not start

Post by waltervl »

How difficult it is to do (as mentioned before by EddyG):

if you put in " /etc/init.d/domoticz.sh "at the end of the option lines with nano, or other editor.

Code: Select all

DAEMON_ARGS="$DAEMON_ARGS  -startupdelay 30"
Edit: text editor nano instructions https://www.raspberrypi-spy.co.uk/2013/ ... pberry-pi/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Toulon7559
Posts: 859
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Service 8080 does not start

Post by Toulon7559 »

Sure the change to domoticz.sh is not difficult, but my suggestion was referring to EddyG's 'better' advice in viewtopic.php?p=276688#p276688
In that message he offers 2 versions dependent on configuration:
;-) then I am starting to be cautious .....
Also aspect to be considered that the adaptation should preferably remain resident when a next upgrade of Domoticz is implemented.

[To make it clearer, now the url included for reference in my previous message]
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest