Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service file? #196

Open
Mazvy opened this issue Feb 6, 2023 · 1 comment
Open

Service file? #196

Mazvy opened this issue Feb 6, 2023 · 1 comment

Comments

@Mazvy
Copy link

Mazvy commented Feb 6, 2023

I followed the #155 issue and the service file is not working at all.

Has there been any changes to scream that broke it? Does anyone have a working service file?

Thanks!

* scream.service - Scream Receiver
   Loaded: loaded (/etc/systemd/system/scream.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2023-02-06 19:30:27 EET; 742ms ago
  Process: 22969 ExecStart=/usr/bin/scream (code=exited, status=1/FAILURE)
 Main PID: 22969 (code=exited, status=1/FAILURE)

Feb 06 19:30:27 trinity systemd[1]: scream.service: Service RestartSec=1s expired, scheduling restart.
Feb 06 19:30:27 trinity systemd[1]: scream.service: Scheduled restart job, restart counter is at 5.
Feb 06 19:30:27 trinity systemd[1]: Stopped Scream Receiver.
Feb 06 19:30:27 trinity systemd[1]: scream.service: Start request repeated too quickly.
Feb 06 19:30:27 trinity systemd[1]: scream.service: Failed with result 'exit-code'.
Feb 06 19:30:27 trinity systemd[1]: Failed to start Scream Receiver.
@ProfessionalismIsMyMiddleName

I was having issues too. Using journalctl to look at the logs of the scream service, I saw that pulseaudio (or more accurately libpulse-dev) was throwing a "connection refused" error.
In my case, this was because pulseaudio was starting with a different user than scream when scream was run through systemd I think.
The solution I found is to create a pulseaudio service (as is implied by the "Wants" line in the scream service file), that starts pulseaudio with the same user as the scream service.
I also kept the delay at 30 seconds instead of 3, but that's because pulse takes ~20s to start on my raspi 3, so it had time to try and fail to start 5 times (the max before it stops trying) when pulse was not yet done starting. You can play with the sleep time and RestartSec value to find a conf that works for you.

In any case, if you have an issue, you can start by looking at the scream service logs by doing journalctl -u scream.service -f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants