我的WebRTC服务器停止工作了。Chrome突出显示了这个错误:
VM238:164 WebSocket connection to 'wss://*******.com/rtc/' failed: Error during
WebSocket handshake: Unexpected response code: 502
服务器重新启动后(我认为)发生了错误。服务器信息 - Ubuntu,nginx + uwsgi,webrtc部分 - Python。
nginx错误日志:
2018/03/15 15:05:17 [error] 597#0: *1058 connect() failed (111: Connection refused)
while connecting to upstream, client: ***.***.***.***, server: ********.com, request:
"GET /rtc/ HTTP/1.1", upstream: "http://127.0.0.1:3333/rtc/", host: "********.com"
nginx.conf文件:
user ****;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
很不幸,我对WebRTS并不了解。这部分项目在我之前完成了。如果您需要更多信息,我可以提供它。
locate package.json
或grep -r "/rtc" <dir>
来搜索该项目。一旦您启动了服务器,错误就应该消失了。 - Tarun Lalwanihistory
命令来查找之前用于运行服务器的命令。 - Tarun Lalwani