Updating made leader doesn't work

hmm this is whats happening

Sorry to be more clear: check the contents of the file with cat:

cat /etc/lighttpd/conf-available/50-pioreactorui.conf

OR you can just run the following to check:

sudo lighttpd -tt -f lighttpd.conf

Any errors there? is curl localhost/unit_api/jobs/running still failing?

this is what comes up:

pioreactor@pioreactor3:~ $ cat /etc/lighttpd/conf-available/50-pioreactorui.conf

url.rewrite-once = (
“^(/unit_api/.)$" => “/main.fcgi$1”,
"^(/static($|/.
))$” => “$1”,
“^(/api/.*)$” => “/main.fcgi$1”
)
alias.url += (
“/static/” => “/var/www/pioreactorui/static/”
)
server.error-handler-404 = “/index.html”

fastcgi.server += (“.fcgi” =>
((
“socket” => “/tmp/main-fcgi.sock”,
“bin-path” => “/var/www/pioreactorui/main.fcgi”,
“check-local” => “disable”,
“max-procs” => 1,
))
)
pioreactor@pioreactor3:~ $ curl localhost/unit_api/jobs/running
[{“id”:1,“unit”:“pioreactor3”,“experiment”:“$experiment”,“name”:“monitor”,“job_source”:“user”,“started_at”:“2024-10-15T08:27:57.863000Z”,“is_running”:1,“leader”:“pioreactor2”,“pid”:750,“ended_at”:null}]pioreactor@pioreactor3:~ $ sudo lighttpd -tt -f lighttpd.conf sudo lighttpd -tt -f lighttpd.conf
2024-10-29 19:49:28: (configfile.c.2211) opening configfile lighttpd.conf failed: No such file or directory
pioreactor@pioreactor3:~ $

looks like this command works, so you should be good to go. Are you still experiencing issues with starting worker activities from the UI?

I am so confused:D So, i have 5 pioreactors in my cluster and one is my leader/worker. That leader/worker has been working the whole time with no problems but like i said, all the workers didnt. So now I can start jobs from the UI for Pio 2 (leader), Pio 4 and Pio 5 but not for Pio 3 and Pio 1. I can start it for these last two from the shh though. So then i thought i would go back to your earlier message, just doing it again (50-pioreactorui.conf file). this is what happens now on pioreactor 3:

pioreactor@pioreactor3:~ $ sudo lighttpd -tt -f lighttpd.conf
2024-10-30 11:37:15: (configfile.c.2211) opening configfile lighttpd.conf failed: No such file or directory
pioreactor@pioreactor3:~ $ sudo sed -i ‘/^url.rewrite-once = (/a\ “^(/unit_api/.*)$” => “/main.fcgi$1”,’ /etc/lighttpd/conf-available/50-pioreactorui.conf
pioreactor@pioreactor3:~ $ sudo systemctl restart lighttpd.service
Job for lighttpd.service failed because the control process exited with error code.
See “systemctl status lighttpd.service” and “journalctl -xeu lighttpd.service” for details.
pioreactor@pioreactor3:~ $ systemctl status lighttpd.service
× lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-10-30 11:38:08 CET; 3min 10s ago
Duration: 9h 25min 10.043s
Process: 10626 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
CPU: 1.493s
pioreactor@pioreactor3:~ $ curl localhost/unit_api/jobs/running
curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn’t connect to server
pioreactor@pioreactor3:~ $ sudo systemctl status lighttpd.service
× lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-10-30 11:38:08 CET; 6min ago
Duration: 9h 25min 10.043s
Process: 10626 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
CPU: 1.493s

Oct 30 11:38:08 pioreactor3 systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Oct 30 11:38:08 pioreactor3 systemd[1]: Stopped lighttpd.service - Lighttpd Daemon.
Oct 30 11:38:08 pioreactor3 systemd[1]: lighttpd.service: Consumed 1.493s CPU time.
Oct 30 11:38:08 pioreactor3 systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 30 11:38:08 pioreactor3 systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Oct 30 11:38:08 pioreactor3 systemd[1]: Failed to start lighttpd.service - Lighttpd Daemon.

and this on pioreactor 1:
pioreactor@pioreactor1:~ $ sudo sed -i ‘/^url.rewrite-once = (/a\ “^(/unit_api/.*)$” => “/main.fcgi$1”,’ /etc/lighttpd/conf-available/50-pioreactorui.conf
pioreactor@pioreactor1:~ $ sudo systemctl restart lighttpd.service
Job for lighttpd.service failed because the control process exited with error code.
See “systemctl status lighttpd.service” and “journalctl -xeu lighttpd.service” for details.
pioreactor@pioreactor1:~ $ systemctl status lighttpd.service
× lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-10-30 11:39:42 CET; 22s ago
Duration: 38.214s
Process: 15642 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/>
CPU: 842ms
ESCOC

e; enabled; preset: enabled)
0-30 11:39:42 CET; 22s ago

f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
pioreactor@pioreactor1:~ $ curl localhost/unit_api/jobs/running
curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn’t connect to server
pioreactor@pioreactor1:~ $ sudo systemctl status lighttpd.service
× lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2024-10-30 11:39:42 CET; 4min 6s ago
Duration: 38.214s
Process: 15642 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
CPU: 842ms

Oct 30 11:39:42 pioreactor1 systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Oct 30 11:39:42 pioreactor1 systemd[1]: Stopped lighttpd.service - Lighttpd Daemon.
Oct 30 11:39:42 pioreactor1 systemd[1]: lighttpd.service: Start request repeated too quickly.
Oct 30 11:39:42 pioreactor1 systemd[1]: lighttpd.service: Failed with result ‘exit-code’.
Oct 30 11:39:42 pioreactor1 systemd[1]: Failed to start lighttpd.service - Lighttpd Daemon.

Thank you very much for replying!!

You should only run the sudo sed command once. Check that the 50-pioreactorui.conf looks as expected.

Also, I provided the wrong command, use:

sudo lighttpd -tt -f /etc/lighttpd/lighttpd.conf

that can tell you if your 50-pioreactorui.conf looks correct, too.


We see that sudo systemctl restart lighttpd.service fails, but what does

sudo systemctl status lighttpd.service

say?


I can start it for these last two from the shh though.

This is consistent. The UI uses the web server, and if the web server isn’t working, jobs won’t start from the UI. However, you can use ssh to start jobs since it doesn’t use the webserver.