This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Billy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to the connection error where the agent shows repeated “Connect call failed ('127.0.0.1', 7880)” and stopped answering calls. I can help troubleshoot — a few quick questions to narrow the cause: 1. Is the LiveKit server running on the same host/process as the agent, or is the agent running in a separate container/VM? 2. Are you running LiveKit with Docker, the
livekit-server
binary, or another method? 3. What is your current LIVEKIT_URL (or agent config) value? If you prefer, paste the exact env var. 4. Can you run one quick check and share results: ◦ From the agent host/container, run:
curl -v http://localhost:7880/
(or
curl -v http://<host-ip>:7880/
if not localhost) and paste the output. 1. Are you using Redis and is it reachable (default
localhost:6379
)? What I’ll do next after you reply: • If the server is down, I’ll give the exact start command and bind advice. • If the agent is in a different network namespace, I’ll show the correct LIVEKIT_URL values to use for Docker/macOS/Linux. • If curl shows connection refused, I’ll walk through binding, firewall, and port checks. Reply with answers to 1–5 and the curl output and I’ll provide the precise next steps. Sources: Running LiveKit locally | LiveKit docs | Self-hosting the Egress Service | LiveKit docs | Ports and firewall | LiveKit docs | Deploying LiveKit | LiveKit docs
d
its cloud
im running lk agent logs and getting those errors
t
Thanks — since this is cloud, the agent is trying to wrong address (localhost:7880). To get it working, update the agent to use your LiveKit Cloud project URL and API credentials. Quick steps: 1. Set the server URL: ◦ LIVEKIT_URL =
wss://<your-project>.livekit.cloud
(replace
<your-project>
) 1. Set credentials: ◦ LIVEKIT_API_KEY = your API key ◦ LIVEKIT_API_SECRET = your API secret 1. Restart the agent so it picks up the env vars. 2. Verify from the agent host: ◦ Run:
curl -vk https://<your-project>.livekit.cloud
— you should get an HTTP/HTTPS response (not "connection refused"). If it still fails, please paste: • The value of
LIVEKIT_URL
you set, • Masked API key (e.g., pk_), • Latest agent log lines after restart. I’ll use that to give the exact next steps. Sources: Deploying to custom environments | LiveKit Docs | Deploying to production | LiveKit Docs | Troubleshooting Guide | livekit/livekit_composite | DeepWiki
Thanks — since you’re in the cloud, the error shows the agent is still trying to connect to
localhost:7880
. That won’t work for LiveKit Cloud. To get the agent answering calls again, do the following: 1. Set the LiveKit Cloud URL and credentials as environment variables (or via
lk agent update-secrets
): ◦ LIVEKIT_URL =
wss://<your-project>.livekit.cloud
◦ LIVEKIT_API_KEY = your API key ◦ LIVEKIT_API_SECRET = your API secret 1. Restart the agent: ◦
lk agent restart
(or restart the service/container so it picks up the new env vars) 1. Verify connectivity from the agent host: ◦
curl -vk https://<your-project>.livekit.cloud
— you should get an HTTPS response (not connection refused). ◦ Tail agent logs after restart:
lk agent logs
(or
lk agent logs --log-type=deploy
) If that doesn’t fix it, please paste: • The exact
LIVEKIT_URL
you set (you can mask the project name if preferred), • Masked API key like
pk_****
, • Latest 10–20 lines from
lk agent logs
after the restart. I’ll use those to pinpoint the next steps. Sources: Deploying to production | LiveKit Docs | Agent deployment CLI reference | LiveKit docs | Call forwarding | LiveKit docs | Log collection | LiveKit Docs | LiveKit CLI project management | LiveKit docs