livekit icon indicating copy to clipboard operation
livekit copied to clipboard

could not validate external IP","ip":"xx.xx.xx.xx","error":"context canceled

Open leejiliang opened this issue 1 year ago • 8 comments

Describe the bug It will print the warn log could not validate external IP","ip":"47.98.xxx.xx","error":"context canceled every time i start the livekit server. The IP read is correct. Server

  • Version: [1.8.0]
  • Environment: [docker compose]
  • any other information about your deployment setup

Expected behavior clean the warnning log Screenshots image

leejiliang avatar Nov 05 '24 03:11 leejiliang

how do you reproduce this?

davidzhao avatar Nov 05 '24 05:11 davidzhao

docker compose content

services:
  livekit:
    image: livekit/livekit-server:v1.8.0
    command: --config /etc/livekit.yaml
    restart: unless-stopped
    network_mode: "host"
    volumes:
      - /etc/localtime:/etc/localtime
      - ./livekit-dev.yaml:/etc/livekit.yaml

config file content

port: 7880
bind_addresses:
    - "0.0.0.0"
logging:
  level: warn
  json: true
  pion_level: error
rtc:
  tcp_port: 7881
  udp_port: 7882
  use_external_ip: true
  enable_loopback_candidate: false
redis:
  address: 172.22.1.113:6379
  db: 11
turn:
  enabled: false
  tls_port: 5349
  udp_port: 3478
  external_tls: true
keys:
  xxxxxxxxx: ddddddddddddddddd
webhook:
  api_key: 'dddddddd'
  urls:
    - 'http://172.22.1.113:8880/v1/api/webhookEndpoint'
    - 'http://172.22.1.113:8891/v1/api/webhookEndpoint'
room:
  empty_timeout: 60
  departure_timeout: 1
prometheus:
  port: 6789

run command docker compose up livekit -d

leejiliang avatar Nov 07 '24 05:11 leejiliang

In China, cloud VPS can't fetch docker images ... How to do?

zoujiaqing avatar Nov 26 '24 10:11 zoujiaqing

In China, cloud VPS can't fetch docker images ... How to do? vpn

leejiliang avatar Nov 27 '24 01:11 leejiliang

I have the same Issue. Did you manage to solve this @leejiliang?

daniels-byp avatar Mar 11 '25 15:03 daniels-byp

I'm also seeing this error, let me know if you need any more info to reproduce/diagnose.

fishikles avatar Mar 18 '25 21:03 fishikles

=> use_external_ip: false (if that suits your needs)

alexander-potemkin avatar Apr 27 '25 13:04 alexander-potemkin

I had similar error, I didn't unerstood @alexander-potemkin reply, so to had more context : I first worked with a server with public IP, it was working fine with use_external_ip: true Switching to a new server with only private IP, it failed with

livekit-sip  | 2025-09-26T13:56:19.156Z WARN    sip     sip/config.go:80        could not resolve external IP   {"nodeID": "NE_mFrrryGmhHBA", "error": "context deadline exceeded"}

I don't know what the code try to do (I guess something to get back the public IP used by NAT).

So to resume if you intend to use livekit-sip only for internal stuff with private IP : use_external_ip: false

Didn't see documentation about this parameter

hdep avatar Sep 26 '25 14:09 hdep