JiriSko / amixer-webui

Web application for control ALSA volume
MIT License
53 stars 21 forks source link

can no longer 'see' amixer-gui #10

Closed gearhead closed 6 years ago

gearhead commented 6 years ago

I am using this on a raspberry pi. I had it working and have changed something and now it will not display. The RPi is running Arch Linux. If I launch it from the command line it all works. If I launch it as a systemd service, I get nothing. All that is dipslayed is:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I know this is not a problem with the application, but am at a loss as to what to do to diagnose this... The service file I am using is:

[Unit]
Description=Amixer-WebUI Service
After=audio.target

[Service]
ExecStart=/usr/bin/python2 /usr/share/amixer-webui/alsamixer_webui.py -p8080
ExecReload=/usr/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target
JiriSko commented 6 years ago

Hi, thanks for submitting this issue.

I guess this might be an issue with the application. I have one candidate what could be wrong in this situation.

Can you please try that other endpoints are working? E.g. in command line:

curl http://localhost:8080/hostname/
curl http://localhost:8080/cards/
gearhead commented 6 years ago

JiriSko,

I fixed it. Apparently sytemd has become more strict and requires calling out the working directory if a script is launched, I had to add this line to the service file right above the ExecStart directive. WorkingDirectory=/usr/share/amixer-webui and it works, again.