You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

AppRTC与WebRTC Server无法远程访问问题求助

Troubleshooting AppRTC Remote Access Issues on Ubuntu 16.04

Hey there, I’ve tackled similar AppRTC setup headaches before—let’s walk through the most common fixes for your remote access problem:

1. Verify Your AppRTC Services Are Actually Running

First, make sure all required AppRTC components are up and listening on the right ports. Log into your Ubuntu server and run these commands:

  • Check if the app server and collider processes are active:
    ps aux | grep -E 'dev_appserver|collidermain'
    
  • Confirm the ports 8000, 8080, 8089 are being listened on (not just localhost):
    netstat -tulpn | grep -E '8000|8080|8089'
    

If you don’t see entries for these ports, restart your services with the right flags:

  • For the app server (make sure you’re in the AppRTC root directory):
    dev_appserver.py --host=0.0.0.0 app.yaml
    
    The --host=0.0.0.0 flag is critical—it tells the server to listen on all network interfaces, not just the local loopback.
  • For the collider service:
    ./collidermain -port=8089 -tls=false
    

2. Check Ubuntu Firewall (UFW) Settings

Ubuntu 16.04 uses UFW by default, and it might be blocking incoming traffic to those ports.

  • First, check current firewall rules:
    sudo ufw status
    
  • If you don’t see 8000/tcp, 8080/tcp, or 8089/tcp listed as allowed, add them:
    sudo ufw allow 8000/tcp
    sudo ufw allow 8080/tcp
    sudo ufw allow 8089/tcp
    sudo ufw reload
    

3. Validate AppRTC Configuration Files

Misconfigured constants can prevent remote connections. Open the constants.py file in your AppRTC repo:

nano apprtc/src/app_engine/constants.py

Check these key values:

  • WSS_INSTANCE_HOST_KEY: Should be set to your server’s LAN IP (192.168.0.110) or 0.0.0.0—not localhost.
  • ICE_SERVER_BASE_URL: Ensure this points to your server’s IP instead of localhost.
    After making changes, restart the app server to apply them.

4. Test Access Locally on the Server First

Before troubleshooting remote access, confirm the server can reach its own AppRTC services:

curl http://192.168.0.110:8000
curl http://192.168.0.110:8080
curl http://localhost:8089

If these commands fail, the issue is with the AppRTC setup itself, not remote connectivity.

5. Check Browser Developer Tools for Clues

On your Windows machine, open the browser’s developer tools (F12), then try accessing the URLs again. Look at:

  • Console tab: Error messages like CORS issues, failed WebSocket connections, or 404 errors will point you to specific problems.
  • Network tab: Check the status codes for failed requests—503 means the service is down, Connection Refused means the port isn’t reachable.

内容的提问来源于stack exchange,提问作者learningtech

火山引擎 最新活动