gpt_academic icon indicating copy to clipboard operation
gpt_academic copied to clipboard

总是显示端口被占用

Open 781087595 opened this issue 2 years ago • 3 comments

Traceback (most recent call last): File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/gradio/networking.py", line 119, in start_server s.bind((LOCALHOST_NAME, server_port)) OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/mycode/chatgpt_academic/main.py", line 174, in demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION) File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/gradio/blocks.py", line 1596, in launch server_name, server_port, local_url, app, server = networking.start_server( File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/gradio/networking.py", line 122, in start_server raise OSError( OSError: Port 40325 is in use. If a gradio.Blocks is running on the port, you can close() it or gradio.close_all().

781087595 avatar Apr 26 '23 16:04 781087595

用的国外云服务器部署的

781087595 avatar Apr 26 '23 16:04 781087595

WEB_PORT=-1 (随机选取端口) 或者 使用7860端口 或者 每次关闭之后,等待2分钟,然后再重启

binary-husky avatar Apr 27 '23 02:04 binary-husky

(py39) root@seruwkuxmn6xgcj:~/chatgpt_academic# netstat -tpln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 477/sshd
tcp6 0 0 :::22 :::* LISTEN 477/sshd 没有端口占用,刚启动就直接OSError: Port 33985 is in use. If a gradio.Blocks is running on the port, you can close() it or gradio.close_all(). WEB_PORT=-1 (随机选取端口) 或者 使用7860端口 或者 每次关闭之后,等待2分钟,然后再重启 都试过了没有解决 不过还是谢谢啦

781087595 avatar Apr 27 '23 06:04 781087595