pactl command fails with connection refused

Bug #832401 reported by ill
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When running the pactl command to set the audio, I get
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Tags: precise zesty
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 832401] [NEW] pactl command fails with connection refused
Revision history for this message
ill (illumilore) wrote :
Download full text (173.3 KiB)

I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: core-rtclock.c: Timer slack is set to 50 us.
I: core-util.c: Failed to acquire high-priority scheduling: Permission denied
I: main.c: This is PulseAudio 0.9.22-24-g67d18
D: main.c: Compilation host: x86_64-pc-linux-gnu
D: main.c: Compilation CFLAGS: -g -O2 -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: main.c: Running on host: Linux x86_64 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011
D: main.c: Found 2 CPUs.
I: main.c: Page size is 4096 bytes
D: main.c: Compiled with Valgrind support: no
D: main.c: Running in valgrind mode: no
D: main.c: Running in VM: no
D: main.c: Optimized build: yes
D: main.c: All asserts enabled.
I: main.c: Machine ID is b7b145080ba423570c88d6f44be34f9c.
I: main.c: Session ID is b7b145080ba423570c88d6f44be34f9c-1314137233.417880-24476715.
I: main.c: Using runtime directory /home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-runtime.
I: main.c: Using state directory /home/illumilore/.pulse.
I: main.c: Using modules directory /usr/lib/pulse-0.9.22/modules.
I: main.c: Running in system mode: no
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 MMXEXT 3DNOW 3DNOWEXT
I: svolume_mmx.c: Initialising MMX optimized functions.
I: remap_mmx.c: Initialising MMX optimized remappers.
I: svolume_sse.c: Initialising SSE2 optimized functions.
I: remap_sse.c: Initialising SSE2 optimized remappers.
I: sconv_sse.c: Initialising SSE2 optimized conversions.
D: memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: database-tdb.c: Opened TDB database '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-device-volumes.tdb'
I: module-device-restore.c: Successfully opened database file '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-device-volumes'.
I: module.c: Loaded "module-device-restore" (index: #0; argument: "").
D: database-tdb.c: Opened TDB database '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-stream-volumes.tdb'
I: module-stream-restore.c: Successfully opened database file '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-stream-volumes'.
I: module.c: Loaded "module-stream-restore" (index: #1; argument: "").
D: database-tdb.c: Opened TDB database '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-card-database.tdb'
I: module-card-restore.c: Successfully opened database file '/home/illumilore/.pulse/b7b145080ba423570c88d6f44be34f9c-card-database'.
I:...

Revision history for this message
Lu Guanqun (guanqun-lu) wrote :

Hi ill,

From the log, it shows:

I: main.c: Got signal SIGINT.
I: main.c: Exiting.

could you please run
    pidof pulseaudio
and then
    strace pactl list sinks
?

These two commands might help to find out which signal pactl is sending to pulseaudio.

Revision history for this message
ill (illumilore) wrote :
Download full text (36.8 KiB)

illumilore@home:~$ pidof pulseaudio
1774
illumilore@home:~$ strace pactl list sinks
execve("/usr/bin/pactl", ["pactl", "list", "sinks"], [/* 20 vars */]) = 0
brk(0) = 0xb14000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4da5153000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=132999, ...}) = 0
mmap(NULL, 132999, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4da5132000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulse.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\240\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=266816, ...}) = 0
mmap(NULL, 2361064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4da4cf4000
mprotect(0x7f4da4d34000, 2093056, PROT_NONE) = 0
mmap(0x7f4da4f33000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3f000) = 0x7f4da4f33000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulsecommon-0.9.22.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\313\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=311344, ...}) = 0
mmap(NULL, 2407160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4da4aa8000
mprotect(0x7f4da4af3000, 2093056, PROT_NONE) = 0
mmap(0x7f4da4cf2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4a000) = 0x7f4da4cf2000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libsndfile.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@_\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=409528, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4da5131000
mmap(NULL, 2522448, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4da4840000
mprotect(0x7f4da48a1000, 2097152, PROT_NONE) = 0
mmap(0x7f4da4aa1000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x61000) = 0x7f4da4aa1000
mmap(0x7f4da4aa4000, 15696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4da4aa4000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2129000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4da4638000
mprotect(0x7f4da463f000, 2093056, PROT_NONE) = 0
mmap(0x7f4da483e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f4da483e000
close(3) = 0
access("/etc/ld.so...

ill (illumilore)
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
cangaru (johns-erc) wrote :

i have ubuntu studio 12.04 and the same bug, except that terminal emulators work in the x11 window, but other terminals do not. This affects me since i want to have crontab begin playing music.

Revision history for this message
cangaru (johns-erc) wrote :

sorry, I should have said, pactl list for example works in a terminal emulator i open from the xfce4 desktop, but gives me the connection refused message if I do the same from a terminal outside that (same user).

Revision history for this message
Maarten Jacobs (maarten256) wrote :

Same issue here... Running XUbuntu 12.10. pactl list works successfully when executed from the local machine.

Connection refused when executing pactl through an ssh session to the same machine (same user).

Revision history for this message
Maarten Jacobs (maarten256) wrote :

Funnily enough there is a workaround for me...

ssh user@server "pactl list"

works fine and does not return an error.

Wondering if the case I'm looking at has nothing to do with pactl. Trying to figure out other cases that might result in the same failure.

papukaija (papukaija)
tags: added: precise
Revision history for this message
richard (woccz) wrote :

Hello everybody. Try to check whether you are using pactl from the same user that launched pulseaudio. Regards,

Revision history for this message
Michał Jurczuk (michal-jurczuk) wrote :

Make sure pulseaudio is running, try to run:
 /usr/bin/pulseaudio --start

Revision history for this message
ill (illumilore) wrote :

$ /usr/bin/pulseaudio --start
N: [pulseaudio] main.c: User-configured server at {64bdb0d35d814699b433e438527a615a}unix:/run/user/1000/pulse/native, refusing to start/autospawn.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 832401

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
Revision history for this message
b8e5n (b8e5n) wrote :

I have the same bug for many releases already, I just could never find the rightful solution till few days ago. I am running 17.04 and the problem is still there... Maybe it will be gone once I update to 17.10, I will report back.
It is frustrating and occurs a lot to me as I never reboot my machine, and often connect and disconnect my headset. At least now I don't need to reboot if I want to use my headset.

tags: added: zesty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.