Luup reload required after server reboot
-
@irobot Thanks for the sugestion, I already have those lines in the systemd.
This is how it looks today:
[Unit] Description=openLuup and AltUI Server for Vera 3 Wants=network.target After=network.target [Service] Type=forking WorkingDirectory=/home/USER/cmh-ludl ExecStart=/bin/bash run_openLuup.sh ExecStop=/bin/curl http://localhost:3480/data_request?id=exit [Install] WantedBy=multi-user.target
Any ideas on adding a delay before the launch of OpenLuup or similar?
@archers said in Luup reload required after server reboot:
Any ideas on adding a delay before the launch of OpenLuup or similar?
Yes, this should be as easy as adding a delay at the beginning of the Startup Lua.
I am shocked to suggest this, since I always recommend that you should not use this LuaSocket primitive during the running system, but it seems the simplest way, and even appropriate in this case...
local socket = require "socket" socket.sleep (20)
..or even just:
require "socket" .sleep (20)
-
@archers said in Luup reload required after server reboot:
Any ideas on adding a delay before the launch of OpenLuup or similar?
Yes, this should be as easy as adding a delay at the beginning of the Startup Lua.
I am shocked to suggest this, since I always recommend that you should not use this LuaSocket primitive during the running system, but it seems the simplest way, and even appropriate in this case...
local socket = require "socket" socket.sleep (20)
..or even just:
require "socket" .sleep (20)
-
One way to do this is by adding a delay in your service file under [service]
ExecStartPre=/bin/sleep 15
This makes it wait 15sec
-
One way to do this is by adding a delay in your service file under [service]
ExecStartPre=/bin/sleep 15
This makes it wait 15sec
-
Hi akbooer,
what is the command/script running when I click from openluup console "Utilities -> Reload Luup Engine" ?
I notice that sometimes DY stop sending data to remote system (may be for connection lost) and the data transfer restart after the action "Utilities -> Reload Luup Engine" .
The server reboot is not the solution of the problem.
I have the delay in the openluup service file.
tnks
-
Upon receiving a reload command, the openLuup engine exits its scheduler loop and then exits the program with a success code that causes the surrounding
openLuup_reload
script to loop and re-run the engine.DataYour uses UDP to send data between its various components, so has absolutely no way of knowing whether a message is received or not.
Sounds like it's a network problem, and perhaps the LuaSocket library isn't coping well with that.
-
Hi Ak,
I did a test on a PI as after a reboot would still require a loop reload. I found this article https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ and put network-online.target in the openluup.service file:
[Unit]
Description=openLuup and AltUI Server for PI
Wants=network-online.target
After=network-online.targetI can see openLuup gets started later and it seems more reliable in my situation.
Cheers Rene