boundless-author-7811
12/12/2025, 11:49 AM{"nodeID": "NE_covsMANvq7zS", "clusterID": "", "egressID": "EG_KUNk68CGLVWk"}
2025-12-12T08:44:25.864Z DEBUG egress.psrpc.IOInfo.UpdateEgress rpc/logging.go:68 client response {"nodeID": "NE_covsMANvq7zS", "clusterID": "", "topic": [], "request": {"egressId": "EG_KUNk68CGLVWk", "roomId": "RM_iB7nwopspUDs", "roomName": "call-1765529046", "sourceType": "EGRESS_SOURCE_TYPE_WEB", "status": "EGRESS_ABORTED", "startedAt": 1765529050386979932, "endedAt": 1765529065858947790, "updatedAt": 1765529065858947790, "details": "End reason: Source closed", "error": "Start signal not received", "errorCode": 412, "roomComposite": {"roomName": "call-1765529046", "audioOnly": true, "audioMixing": "DEFAULT_MIXING", "preset": "H264_720P_30", "fileOutputs": [{"fileType": "OGG", "filepath": "/2025-12-12/call-1765529046", "s3": {"accessKey": "<redacted>", "secret": "<redacted>", "sessionToken": "<redacted>", "assumeRoleArn": "<redacted>", "region": "us-east-1", "bucket": "livekit_bucket", "forcePathStyle": true}}]}, "file": {"filename": "/2025-12-12/call-1765529046.ogg", "startedAt": 1765529065814486336, "endedAt": 1765529065814486336}, "fileResults": [{"filename": "/2025-12-12/call-1765529046.ogg", "startedAt": 1765529065814486336, "endedAt": 1765529065814486336}]}, "response": {}, "duration": "2.673872ms"}
my egress is running on ec2, whereas the dispatch call is taking places via a service on eks.
i am using the below approach for recording the conversation:
req = api.RoomCompositeEgressRequest(
room_name=room_name,
audio_only=True,
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.OGG,
filepath=file_path,
s3=api.S3Upload(
bucket=self.s3_bucket,
region=self.s3_region,
force_path_style=True
)
)
]
)
# Start recording
await ctx.api.egress.start_room_composite_egress(req)tall-airline-16756
12/12/2025, 11:49 AMtall-airline-16756
12/12/2025, 11:49 AMSTART_RECORDING, so the compositor page never completed its handshake and recording never started.
To narrow this down I need a few quick details from you:
1. How is the egress worker deployed on EC2? (Docker image, systemd binary, or something else)
2. Can the EC2 instance reach your LiveKit server’s WebSocket/HTTPS endpoint? Can you run:
◦ curl -v https://<your-livekit-host> and
◦ google-chrome --headless --no-sandbox --dump-dom https://example.com (or equivalent inside the container)?
1. Which LiveKit API key/secret does the egress use, and does that key have the roomRecord grant enabled?
2. Are you using any custom templates or a custom_base_url for compositing?
3. Is the room active (has participants) when you call start_room_composite_egress?
While you gather that, try these quick checks (likely fixes):
• Ensure EC2 can reach the LiveKit host (outbound port 443/WS allowed, DNS resolves).
• Verify the egress process can launch Chrome (use official livekit/egress Docker image and run with --cap-add=SYS_ADMIN).
• Confirm the API key used by egress includes roomRecord.
• Start egress after the room exists and at least one participant is or will be present.
Send the answers to 1–5 and any logs from the egress worker showing Chrome startup or template fetch failures — I’ll suggest the next targeted steps.
Sources: Custom recording templates | LiveKit docs | Egress API | LiveKit docs | Universal Egress | Self-hosting the Egress Service | LiveKit docsboundless-author-7811
12/12/2025, 11:52 AMtall-airline-16756
12/12/2025, 11:52 AMroomRecord grant.
1. Chrome sandbox or resource problems causing early exit
• Ensure you run with --cap-add=SYS_ADMIN (or proper flags) if using Docker, and that Chrome starts cleanly in that environment.
• Check container/system resource usage (CPU/memory) at start.
1. Custom template or custom_base_url issues
• If you use custom templates, ensure the base URL is reachable from the egress host. An unreachable template often causes the page to close. If not using custom templates, ensure the egress service can serve its default templates on localhost (port 7980).
1. Timing: room not active when compositor attempts join
• Start egress after the room exists and has at least one participant, or confirm your flow allows the compositor to wait long enough for participants to join.
Next diagnostic steps I recommend you run and share results for targeted help:
• Paste the egress worker’s browser console logs around the chrome init (look for JS errors, fetch 4xx/5xx, or explicit console messages).
• Confirm whether the egress host can connect to the LiveKit WS endpoint (curl/wscat) and whether the API key has roomRecord.
• Tell me how the egress is deployed (Docker or binary) and if you use custom templates.
Give those outputs and I’ll propose exact fixes (Chrome flags, network rules, or template fixes) you can apply.boundless-author-7811
12/12/2025, 11:53 AMapi_key: key
api_secret: secret
ws_url: ws://localhost:7880
redis:
address: localhost:6379
username: "" # Use password field below
password: ""
db: 0
enable_chrome: false
enable_chrome_sandbox: false
logging:
level: error
# Storage - local file output
file_output_path: /etc/livekit/recordings
# Optional: template settings
template_port: 7980
this is my egress configtall-airline-16756
12/12/2025, 11:54 AMenable_chrome: false
RoomComposite/Web egress requires a headless Chrome instance to load the compositor page and emit START_RECORDING. With Chrome disabled the compositor never runs, so the source closes and recording aborts.
What to change (minimum steps):
1. Enable Chrome in the egress config:
◦ set enable_chrome: true
1. If running in Docker, run the container with Chrome sandbox support:
◦ add --cap-add=SYS_ADMIN to docker run, or enable sandboxing per your environment.
◦ alternatively, if you must disable sandbox, ensure Chrome is launched with --no-sandbox (not recommended for production).
1. Ensure the egress host can launch Chrome:
◦ use the official livekit/egress image (bundles Chrome) or install Chrome on the host.
◦ allocate sufficient CPU/memory (4 CPU / 4GB recommended).
1. Keep template_port: 7980 reachable locally (egress serves default templates on that port).
After changing, restart the egress worker and re-run the recording. If you still see early END_RECORDING, paste the browser console logs from the egress worker (the logs around chrome init and any JS/network errors) and I’ll help debug further.boundless-author-7811
12/12/2025, 11:55 AMtall-airline-16756
12/12/2025, 11:55 AMenable_chrome: false — RoomComposite/Web egress requires a headless Chrome to load the compositor and emit START_RECORDING. On your old all-EC2 setup Chrome was likely enabled or available; with it disabled now the compositor never runs and the source closes.
2) Localhost WS URL may be unreachable from the egress host
• ws_url: ws://localhost:7880 works only if the egress worker and LiveKit server are on the same host/network. When part of your system moved to EKS, the dispatch/service on EKS may be resolving differently and the EC2 egress cannot reach the LiveKit WS at localhost.
What to do next (minimal changes to test quickly)
1. Enable Chrome in the egress config:
◦ set enable_chrome: true and restart the egress worker.
1. Ensure Chrome can run in your environment:
◦ if using Docker, run the container with --cap-add=SYS_ADMIN or use the official image that bundles Chrome.
1. Update ws_url so the egress can reach LiveKit:
◦ use the actual LiveKit domain/IP reachable from EC2 (eg. wss://your-livekit-host:7880 or the cluster’s external endpoint), not localhost.
1. Restart egress and retry recording.
If it still fails, please provide:
• The egress deployment on EC2 (Docker or binary) and the exact ws_url you switch to.
• Any new egress logs around chrome init and browser console output after enabling Chrome.
I’ll help with the next steps once you share those.