Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[其他] Something went wrong Connection errored out. #161

Closed
jiang54 opened this issue Mar 15, 2023 · 9 comments
Closed

[其他] Something went wrong Connection errored out. #161

jiang54 opened this issue Mar 15, 2023 · 9 comments
Labels
duplicate This issue or pull request already exists question Further information is requested

Comments

@jiang54
Copy link

jiang54 commented Mar 15, 2023

非常高兴可以进入《川虎ChatGPT 🚀》了,但是我在提出询问时遇到了 Something went wrong的问题
image
然后我重新申请了一个新的apikey还是遇到了这个问题

错误描述

Something went wrong
Connection errored out.

复现操作

你之前干了什么,然后出现了错误呢?例如:

  1. 正常完成本地部署
  2. 在对话框中输入 “你好”,“地球”
  3. 显示ERROR,Something went wrong
    Connection errored out.

错误截图

image

运行环境

腾讯云

服务器操作系统:CentOS 7.6 64bit

  • OS: [e.g. Windows11 22H2]
  • Browser: [e.g. Chrome, safari]
  • Gradio version:
  • Python (或Python3) version:

其他

补充说明

@jiang54 jiang54 added the question Further information is requested label Mar 15, 2023
@jiang54
Copy link
Author

jiang54 commented Mar 15, 2023

#89 我看了,没太看懂,好像是说打开92和93端口?我不太理解,希望大佬解释一下。

@Keldos-Li
Copy link
Collaborator

或许可以看看README的这一部分

@jiang54
Copy link
Author

jiang54 commented Mar 15, 2023

或许可以看看README的这一部分

“””网页提示错误 Something went wrong
Something went wrong
Expecting value: 1ine 1 column 1 (char o)
出现这个错误的原因是127.0.0.1被代理了,导致网页无法和后端通信。请设置代理软件,将127.0.0.1加入直连。
“””
你好,请问你说的是这个吗,这个好像是给本地提的意见,我用的是服务器的,是我理解出错了吗?

@Keldos-Li
Copy link
Collaborator

或许可以看看README的这一部分

抱歉,才发现summary中的链接会有问题。请看看 远程部署 中的 配置 Nginx 反向代理 部分。

@jiang54
Copy link
Author

jiang54 commented Mar 15, 2023

或许可以看看README的这一部分

抱歉,才发现summary中的链接会有问题。请看看 远程部署 中的 配置 Nginx 反向代理 部分。

"""注意:配置反向代理不是必须的。如果需要使用域名,则需要配置 Nginx 反向代理。
"""
你好,我没有使用域名,需要在服务器terminal里面运行下面的步骤吗?
image

@lilyblessing
Copy link

配置域名,配置SSL。

@Keldos-Li Keldos-Li added the duplicate This issue or pull request already exists label Mar 16, 2023
@zrlhk
Copy link

zrlhk commented Mar 17, 2023

或许可以看看README的这一部分

抱歉,才发现summary中的链接会有问题。请看看 远程部署 中的 配置 Nginx 反向代理 部分。

里面的反向代理配置少了两行,我完整的worked的配置如下:

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

upstream websocket {
server localhost:7860;
}

server {
listen 80;
server_name gpt.domain.com www.gpt.domain.com;
root /var/www/gpt.domain.com;
index index.html index.php index.htm;
location / {
proxy_pass http://websocket;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

}
}

上面最后两行解决了上述问题

@MZhao-ouo
Copy link
Collaborator

closed

@LCorleone
Copy link

mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants