PulseAudio fails to launch in system mode in CentOS 7
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Long story short, I'm trying to setup PulseAudio to act as a loopback interface for a local music stream. However, I'm hitting a breaking point in getting it setup.
As I understand it, you cannot start pulseaudio in "non-system mode" without having an X server running, but seeing as the server is is headless this is not an option. So I began writing a cobbled together systemd script to start the daemon as a system-wide instance. This however fails for some inexplicable reason.
If I run the command that in in the systemd script, the system-wide pulse starts up just fine! However, if I run it from within the start script (eg. with systemctl start pulseaudio), it fails with Failed to create '/var/run/pulse': Permission denied
. I can't for the life of me figure out how it would work for the same user in to different ways. I also tried replacing the start script with a ls /var/run/pulse
. When the script is setup to run as "pulse", it prints nothing in the journal. However, if I wrap the whole call in a sudo -u pulse
, it prints the contents of /var/run/pulse
. When I wrap the pulse startup command in a sudo -u root
, it just crashes with the same error.
I'm totally lost on this one. If anyone could point me in the right direction, it would be greatly appreciated.
[root@ian-primary ian]# ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
[root@ian-primary ian]# sudo -u pulse ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
Nov 06 13:56:02 ian-primary systemd[1]: Starting PulseAudio system server...
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Timer slack is set to 50 us.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: setpriority() worked.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Successfully gained nice level -11.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Found user 'pulse' (UID 171) and group 'pulse' (GID 171).
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: E: [pulseaudio] main.c: Daemon startup failed.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Failed to create '/var/run/pulse': Permission denied
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service: main process exited, code=exited, status=1/FAILURE
Nov 06 13:56:02 ian-primary systemd[1]: Failed to start PulseAudio system server.
Nov 06 13:56:02 ian-primary systemd[1]: Unit pulseaudio.service entered failed state.
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service failed.
[root@ian-primary ian]# /bin/pulseaudio -vvv --daemonize --system --realtime
W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
I: [pulseaudio] main.c: Daemon startup successful.
[root@ian-primary ian]# cat /etc/systemd/system/pulseaudio.service
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
Environment=PULSE_RUNTIME_PATH=/run/pulse
# ExecStart=/bin/printenv
# export PULSE_RUNTIME_PATH="/run/pulse"
ExecStart=/bin/pulseaudio -vvv --daemonize --system --realtime
[Install]
WantedBy=multi-user.target
systemd environment-variables pulseaudio headless
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
Long story short, I'm trying to setup PulseAudio to act as a loopback interface for a local music stream. However, I'm hitting a breaking point in getting it setup.
As I understand it, you cannot start pulseaudio in "non-system mode" without having an X server running, but seeing as the server is is headless this is not an option. So I began writing a cobbled together systemd script to start the daemon as a system-wide instance. This however fails for some inexplicable reason.
If I run the command that in in the systemd script, the system-wide pulse starts up just fine! However, if I run it from within the start script (eg. with systemctl start pulseaudio), it fails with Failed to create '/var/run/pulse': Permission denied
. I can't for the life of me figure out how it would work for the same user in to different ways. I also tried replacing the start script with a ls /var/run/pulse
. When the script is setup to run as "pulse", it prints nothing in the journal. However, if I wrap the whole call in a sudo -u pulse
, it prints the contents of /var/run/pulse
. When I wrap the pulse startup command in a sudo -u root
, it just crashes with the same error.
I'm totally lost on this one. If anyone could point me in the right direction, it would be greatly appreciated.
[root@ian-primary ian]# ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
[root@ian-primary ian]# sudo -u pulse ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
Nov 06 13:56:02 ian-primary systemd[1]: Starting PulseAudio system server...
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Timer slack is set to 50 us.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: setpriority() worked.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Successfully gained nice level -11.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Found user 'pulse' (UID 171) and group 'pulse' (GID 171).
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: E: [pulseaudio] main.c: Daemon startup failed.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Failed to create '/var/run/pulse': Permission denied
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service: main process exited, code=exited, status=1/FAILURE
Nov 06 13:56:02 ian-primary systemd[1]: Failed to start PulseAudio system server.
Nov 06 13:56:02 ian-primary systemd[1]: Unit pulseaudio.service entered failed state.
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service failed.
[root@ian-primary ian]# /bin/pulseaudio -vvv --daemonize --system --realtime
W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
I: [pulseaudio] main.c: Daemon startup successful.
[root@ian-primary ian]# cat /etc/systemd/system/pulseaudio.service
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
Environment=PULSE_RUNTIME_PATH=/run/pulse
# ExecStart=/bin/printenv
# export PULSE_RUNTIME_PATH="/run/pulse"
ExecStart=/bin/pulseaudio -vvv --daemonize --system --realtime
[Install]
WantedBy=multi-user.target
systemd environment-variables pulseaudio headless
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Long story short, I'm trying to setup PulseAudio to act as a loopback interface for a local music stream. However, I'm hitting a breaking point in getting it setup.
As I understand it, you cannot start pulseaudio in "non-system mode" without having an X server running, but seeing as the server is is headless this is not an option. So I began writing a cobbled together systemd script to start the daemon as a system-wide instance. This however fails for some inexplicable reason.
If I run the command that in in the systemd script, the system-wide pulse starts up just fine! However, if I run it from within the start script (eg. with systemctl start pulseaudio), it fails with Failed to create '/var/run/pulse': Permission denied
. I can't for the life of me figure out how it would work for the same user in to different ways. I also tried replacing the start script with a ls /var/run/pulse
. When the script is setup to run as "pulse", it prints nothing in the journal. However, if I wrap the whole call in a sudo -u pulse
, it prints the contents of /var/run/pulse
. When I wrap the pulse startup command in a sudo -u root
, it just crashes with the same error.
I'm totally lost on this one. If anyone could point me in the right direction, it would be greatly appreciated.
[root@ian-primary ian]# ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
[root@ian-primary ian]# sudo -u pulse ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
Nov 06 13:56:02 ian-primary systemd[1]: Starting PulseAudio system server...
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Timer slack is set to 50 us.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: setpriority() worked.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Successfully gained nice level -11.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Found user 'pulse' (UID 171) and group 'pulse' (GID 171).
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: E: [pulseaudio] main.c: Daemon startup failed.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Failed to create '/var/run/pulse': Permission denied
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service: main process exited, code=exited, status=1/FAILURE
Nov 06 13:56:02 ian-primary systemd[1]: Failed to start PulseAudio system server.
Nov 06 13:56:02 ian-primary systemd[1]: Unit pulseaudio.service entered failed state.
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service failed.
[root@ian-primary ian]# /bin/pulseaudio -vvv --daemonize --system --realtime
W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
I: [pulseaudio] main.c: Daemon startup successful.
[root@ian-primary ian]# cat /etc/systemd/system/pulseaudio.service
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
Environment=PULSE_RUNTIME_PATH=/run/pulse
# ExecStart=/bin/printenv
# export PULSE_RUNTIME_PATH="/run/pulse"
ExecStart=/bin/pulseaudio -vvv --daemonize --system --realtime
[Install]
WantedBy=multi-user.target
systemd environment-variables pulseaudio headless
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Long story short, I'm trying to setup PulseAudio to act as a loopback interface for a local music stream. However, I'm hitting a breaking point in getting it setup.
As I understand it, you cannot start pulseaudio in "non-system mode" without having an X server running, but seeing as the server is is headless this is not an option. So I began writing a cobbled together systemd script to start the daemon as a system-wide instance. This however fails for some inexplicable reason.
If I run the command that in in the systemd script, the system-wide pulse starts up just fine! However, if I run it from within the start script (eg. with systemctl start pulseaudio), it fails with Failed to create '/var/run/pulse': Permission denied
. I can't for the life of me figure out how it would work for the same user in to different ways. I also tried replacing the start script with a ls /var/run/pulse
. When the script is setup to run as "pulse", it prints nothing in the journal. However, if I wrap the whole call in a sudo -u pulse
, it prints the contents of /var/run/pulse
. When I wrap the pulse startup command in a sudo -u root
, it just crashes with the same error.
I'm totally lost on this one. If anyone could point me in the right direction, it would be greatly appreciated.
[root@ian-primary ian]# ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
[root@ian-primary ian]# sudo -u pulse ls -al /var/run/pulse
total 4
drwx------. 3 pulse pulse 80 Nov 5 23:10 .
drwxr-xr-x. 29 root root 840 Nov 5 23:03 ..
drwxr-xr-x. 3 pulse pulse 60 Nov 5 23:04 .config
-rw-------. 1 pulse pulse 16 Nov 5 23:04 .esd_auth
Nov 06 13:56:02 ian-primary systemd[1]: Starting PulseAudio system server...
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Timer slack is set to 50 us.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: setpriority() worked.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Successfully gained nice level -11.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Found user 'pulse' (UID 171) and group 'pulse' (GID 171).
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
Nov 06 13:56:02 ian-primary pulseaudio[23251]: E: [pulseaudio] main.c: Daemon startup failed.
Nov 06 13:56:02 ian-primary pulseaudio[23253]: Failed to create '/var/run/pulse': Permission denied
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service: main process exited, code=exited, status=1/FAILURE
Nov 06 13:56:02 ian-primary systemd[1]: Failed to start PulseAudio system server.
Nov 06 13:56:02 ian-primary systemd[1]: Unit pulseaudio.service entered failed state.
Nov 06 13:56:02 ian-primary systemd[1]: pulseaudio.service failed.
[root@ian-primary ian]# /bin/pulseaudio -vvv --daemonize --system --realtime
W: [pulseaudio] main.c: Running in system mode, but --disallow-exit not set.
W: [pulseaudio] main.c: Running in system mode, but --disallow-module-loading not set.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling SHM mode.
N: [pulseaudio] main.c: Running in system mode, forcibly disabling exit idle time.
I: [pulseaudio] main.c: Daemon startup successful.
[root@ian-primary ian]# cat /etc/systemd/system/pulseaudio.service
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
Environment=PULSE_RUNTIME_PATH=/run/pulse
# ExecStart=/bin/printenv
# export PULSE_RUNTIME_PATH="/run/pulse"
ExecStart=/bin/pulseaudio -vvv --daemonize --system --realtime
[Install]
WantedBy=multi-user.target
systemd environment-variables pulseaudio headless
systemd environment-variables pulseaudio headless
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 25 secs ago
duper51
101
101
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
duper51 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
duper51 is a new contributor. Be nice, and check out our Code of Conduct.
duper51 is a new contributor. Be nice, and check out our Code of Conduct.
duper51 is a new contributor. Be nice, and check out our Code of Conduct.
duper51 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480227%2fpulseaudio-fails-to-launch-in-system-mode-in-centos-7%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password