Getting twirp error and egress failed on self host...
# ask-ai
g
Getting twirp error and egress failed on self hosted ec2 instance. Logs: 2025-11-26T115059.789Z INFO egress server/server.go:201 draining io client {"nodeID": "NE_32qSHSjUVYiM", "clusterID": ""} 2025-11-26T115059.790Z INFO egress server/server.go:159 service stopped {"nodeID": "NE_32qSHSjUVYiM", "clusterID": ""} ubuntu@ip-172-31-46-4:~$ docker logs -f livekit-egress-1 -n 10 github.com/livekit/egress/pkg/ipc._EgressService_HandlerUpdate_Handler /workspace/pkg/ipc/ipc_grpc.pb.go:147 google.golang.org/grpc.(*Server).processUnaryRPC /root/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1431 google.golang.org/grpc.(*Server).handleStream /root/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1842 google.golang.org/grpc.(*Server).serveStreams.func2.1 /root/go/pkg/mod/google.golang.org/grpc@v1.76.0/server.go:1061 2025-11-26T115240.877Z INFO egress server/server.go:157 draining {"nodeID": "NE_ud4eiZbhbVMA", "clusterID": ""} 2025-11-26T115240.879Z INFO egress info/io.go:269 egress_failed {"nodeID": "NE_ud4eiZbhbVMA", "clusterID": "", "egressID": "EG_tsdWin3YJtML", "requestType": "room_composite", "outputType": "file", "error": "failed to launch pulse: exit status 1", "code": 500, "details": "End reason: Failure"}
t
Thanks for reaching out, Harsh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m looking at the logs you pasted (egress failing with "failed to launch pulse: exit status 1" and Twirp/grpc stack traces). That indicates the egress process can’t start PulseAudio, which Chrome needs for headless audio capture. Let’s troubleshoot this quickly. Can you tell me: 1. LiveKit Egress version you’re running? 2. Your docker-compose or
docker run
command for the egress container (or relevant service section). 3. Whether
enable_chrome_sandbox
is true in your egress config. 4. Whether PulseAudio is installed and running on the EC2 host, and how you’re exposing it to the container (socket bind or TCP)? 5. Output of these commands run on the host: ◦
pulseaudio --check -v
◦
ps aux | grep pulseaudio
◦
docker inspect livekit-egress-1 | grep -i pulse -n || true
While you gather that, try these checks (safe to run now): • Restart/start PulseAudio on the host:
Copy code
sudo apt-get update
  sudo apt-get install -y pulseaudio
  pulseaudio --start --load="module-native-protocol-tcp auth-anonymous=1" --exit-idle-time=-1
(Using TCP with
auth-anonymous=1
is convenient for EC2; we’ll lock it down after confirming it works.) • Ensure the container has access to PulseAudio: ◦ If using host socket: mount
/run/user/1000/pulse
(adjust UID) and appropriate
~/.config/pulse
into the container. ◦ If using TCP: confirm container can reach host port 4713 (host IP or
host.docker.internal
). • If
enable_chrome_sandbox: true
, run the container with
--cap-add=SYS_ADMIN
and the Chrome seccomp profile; or temporarily set
enable_chrome_sandbox: false
to see if sandboxing is the blocker. Send the requested info and command outputs and I’ll give the next exact commands and config edits to fix it. Sources: Self-hosting the Egress Service | LiveKit docs