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

docker部署失败 #11

Closed
ZzxDDDDDD opened this issue Mar 17, 2023 · 15 comments
Closed

docker部署失败 #11

ZzxDDDDDD opened this issue Mar 17, 2023 · 15 comments

Comments

@ZzxDDDDDD
Copy link

chatgpt-web-share | {"level":"info","ts":1679063063.939427,"msg":"using provided configuration","config_file":"/app/Caddyfile","config_adapter":"caddyfile"}
chatgpt-web-share | {"level":"info","ts":1679063063.9410443,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
chatgpt-web-share | {"level":"warn","ts":1679063063.941443,"logger":"http","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
chatgpt-web-share | {"level":"info","ts":1679063063.9425936,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
chatgpt-web-share | {"level":"info","ts":1679063063.9428377,"msg":"autosaved config (load with --resume flag)","file":"/root/.config/caddy/autosave.json"}
chatgpt-web-share | {"level":"info","ts":1679063063.9429247,"msg":"serving initial configuration"}
chatgpt-web-share | {"level":"info","ts":1679063063.9431133,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/root/.local/share/caddy"}
chatgpt-web-share | {"level":"info","ts":1679063063.943222,"logger":"tls","msg":"finished cleaning storage units"}
chatgpt-web-share | {"level":"info","ts":1679063063.943413,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000463340"}
chatgpt-web-share | Successfully started Caddy (pid=13) - Caddy is running in the background
chatgpt-web-share | INFO: Started server process [20]
chatgpt-web-share | INFO: Waiting for application startup.
chatgpt-web-share | database not exists, creating database...
chatgpt-web-share | database created
chatgpt-web-share | INFO [alembic.runtime.migration] Context impl SQLiteImpl.
chatgpt-web-share | INFO [alembic.runtime.migration] Will assume non-transactional DDL.
chatgpt-web-share | ERROR: Traceback (most recent call last):
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
chatgpt-web-share | async with self.lifespan_context(app) as maybe_state:
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
chatgpt-web-share | await self._router.startup()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
chatgpt-web-share | await handler()
chatgpt-web-share | File "/app/backend/main.py", line 148, in on_startup
chatgpt-web-share | raise e
chatgpt-web-share | File "/app/backend/main.py", line 104, in on_startup
chatgpt-web-share | result = await g.chatgpt_manager.get_conversations()
chatgpt-web-share | File "/app/backend/api/chatgpt.py", line 21, in get_conversations
chatgpt-web-share | conversations = await self.chatbot.get_conversations()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 869, in get_conversations
chatgpt-web-share | self.__check_response(response)
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 939, in __check_response
chatgpt-web-share | response.raise_for_status()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 749, in raise_for_status
chatgpt-web-share | raise HTTPStatusError(message, request=request, response=self)
chatgpt-web-share | httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://bypass.duti.tech/api/conversations?offset=0&limit=20'
chatgpt-web-share | For more information check: https://httpstatuses.com/401
chatgpt-web-share |
chatgpt-web-share | ERROR: Application startup failed. Exiting.
chatgpt-web-share | stamped database to head
chatgpt-web-share | database initialized
chatgpt-web-share | User 1 has registered.
chatgpt-web-share | User created: <api.models.User object at 0x7f8d7327b4c0>
chatgpt-web-share | User 2 has registered.
chatgpt-web-share | User created: <api.models.User object at 0x7f8d7312d030>
chatgpt-web-share | Client error '401 Unauthorized' for url 'https://bypass.duti.tech/api/conversations?offset=0&limit=20'
chatgpt-web-share | For more information check: https://httpstatuses.com/401
chatgpt-web-share | INFO: Started server process [21]
chatgpt-web-share | INFO: Waiting for application startup.
chatgpt-web-share | INFO [alembic.runtime.migration] Context impl SQLiteImpl.
chatgpt-web-share | INFO [alembic.runtime.migration] Will assume non-transactional DDL.
chatgpt-web-share | ERROR: Traceback (most recent call last):
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
chatgpt-web-share | async with self.lifespan_context(app) as maybe_state:
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
chatgpt-web-share | await self._router.startup()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
chatgpt-web-share | await handler()
chatgpt-web-share | File "/app/backend/main.py", line 148, in on_startup
chatgpt-web-share | raise e
chatgpt-web-share | File "/app/backend/main.py", line 104, in on_startup
chatgpt-web-share | result = await g.chatgpt_manager.get_conversations()
chatgpt-web-share | File "/app/backend/api/chatgpt.py", line 21, in get_conversations
chatgpt-web-share | conversations = await self.chatbot.get_conversations()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 869, in get_conversations
chatgpt-web-share | self.__check_response(response)
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/revChatGPT/V1.py", line 939, in __check_response
chatgpt-web-share | response.raise_for_status()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 749, in raise_for_status
chatgpt-web-share | raise HTTPStatusError(message, request=request, response=self)
chatgpt-web-share | httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://bypass.duti.tech/api/conversations?offset=0&limit=20'
chatgpt-web-share | For more information check: https://httpstatuses.com/401
chatgpt-web-share |
chatgpt-web-share | ERROR: Application startup failed. Exiting.
chatgpt-web-share | database initialized
chatgpt-web-share | Create User deezy0045 Error: 用户名已存在
chatgpt-web-share | Create User zhd125 Error: 用户名已存在
chatgpt-web-share | Client error '401 Unauthorized' for url 'https://bypass.duti.tech/api/conversations?offset=0&limit=20'
chatgpt-web-share | For more information check: https://httpstatuses.com/401
chatgpt-web-share exited with code 3

@ZzxDDDDDD
Copy link
Author

网页可以打开,但是登录的话会错误

@moeakwak
Copy link
Collaborator

这是 access_token 认证失败了。检查你是否配置了正确的 access_token,或者有没有失效。建议网页上重新登录一下 OpenAI 账户,用新的 access_token

@ZzxDDDDDD
Copy link
Author

进去了,在对话过程中提示1006错误

@moeakwak
Copy link
Collaborator

1006错误是websocket协议不正确造成的。可以参考 #10 #2

@moeakwak
Copy link
Collaborator

最简单的方式就是:检查你是不是在没有配置好SSL证书的情况下,使用了https协议。如果是,请用http。

如果还有问题,请提交前端F12控制台中的日志记录。

@ZzxDDDDDD
Copy link
Author

谢谢您,我已经改好了

@moeakwak
Copy link
Collaborator

好的。好用的话,欢迎star项目

@ZzxDDDDDD
Copy link
Author

您好,我在使用的过程中发现有不定期复现的模型选择BUG
某些对话中我明明选择了GPT4模型,刷新页面后又恢复为DEFAULT模型,后台看也是DEFAULT模型
有些却没有这种问题。
我个人感觉和对话命名相关,比如说我给某段对话设置名称为4,模型选择GPT4则不会出现问题
如果对话名称为4翻译官,模型选择GPT4就会出现刷新后变回DEFAULT的问题

@ZzxDDDDDD
Copy link
Author

btw已star,感谢作者为开源社区的无私付出

@moeakwak
Copy link
Collaborator

您好,我在使用的过程中发现有不定期复现的模型选择BUG 某些对话中我明明选择了GPT4模型,刷新页面后又恢复为DEFAULT模型

你好,谢谢反馈和star,0.2.10版本应该已经修复了这个问题,可以试试更新

@ZzxDDDDDD
Copy link
Author

我看docker的版本还在0.2.0,而我目前足够我操作容器进行升级的知识基础,请问您能在方便的时候指点一二吗?如果不方便的话也没事,我先凑合用3.5TURBO模型,再次感谢您设计这么好的一个程序

@moeakwak
Copy link
Collaborator

moeakwak commented Mar 19, 2023 via email

@ZzxDDDDDD
Copy link
Author

ZzxDDDDDD commented Mar 19, 2023

按照docker-compose pull, docker-compose up进行升级操作后,登录提示request error

代码如下
chatgpt-web-share | 2023/03/19 03:51:32.157 INFO: [uvicorn.error] Started server process [19]
chatgpt-web-share | 2023/03/19 03:51:32.158 INFO: [uvicorn.error] Waiting for application startup.
chatgpt-web-share | 2023/03/19 03:51:32.161 INFO: [alembic.runtime.migration] Context impl SQLiteImpl.
chatgpt-web-share | 2023/03/19 03:51:32.162 INFO: [alembic.runtime.migration] Will assume non-transactional DDL.
chatgpt-web-share | 2023/03/19 03:51:32.166 INFO: [cws.main] database initialized
chatgpt-web-share | 2023/03/19 03:51:32.177 INFO: [cws.utils.create_user] Create User deezy001 Error: 用户名已存在
chatgpt-web-share | 2023/03/19 03:51:32.180 INFO: [cws.utils.create_user] Create User zhd Error: 用户名已存在
chatgpt-web-share | 2023/03/19 03:51:32.184 ERROR: [cws.main] 'CHATGPT_BASE_URL'
chatgpt-web-share | 2023/03/19 03:51:32.185 ERROR: [uvicorn.error] Traceback (most recent call last):
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
chatgpt-web-share | async with self.lifespan_context(app) as maybe_state:
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
chatgpt-web-share | await self._router.startup()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
chatgpt-web-share | await handler()
chatgpt-web-share | File "/app/backend/main.py", line 163, in on_startup
chatgpt-web-share | raise e
chatgpt-web-share | File "/app/backend/main.py", line 117, in on_startup
chatgpt-web-share | logger.debug(f"Using {os.environ['CHATGPT_BASE_URL']} as ChatGPT base url")
chatgpt-web-share | File "/usr/local/lib/python3.10/os.py", line 680, in getitem
chatgpt-web-share | raise KeyError(key) from None
chatgpt-web-share | KeyError: 'CHATGPT_BASE_URL'
chatgpt-web-share |
chatgpt-web-share | 2023/03/19 03:51:32.185 ERROR: [uvicorn.error] Application startup failed. Exiting.
chatgpt-web-share exited with code 3
chatgpt-web-share | 2023/03/19 03:51:35.509 INFO: [uvicorn.error] Started server process [20]
chatgpt-web-share | 2023/03/19 03:51:35.510 INFO: [uvicorn.error] Waiting for application startup.
chatgpt-web-share | 2023/03/19 03:51:35.514 INFO: [alembic.runtime.migration] Context impl SQLiteImpl.
chatgpt-web-share | 2023/03/19 03:51:35.514 INFO: [alembic.runtime.migration] Will assume non-transactional DDL.
chatgpt-web-share | 2023/03/19 03:51:35.518 INFO: [cws.main] database initialized
chatgpt-web-share | 2023/03/19 03:51:35.531 INFO: [cws.utils.create_user] Create User deezy Error: 用户名已存在
chatgpt-web-share | 2023/03/19 03:51:35.533 INFO: [cws.utils.create_user] Create User 123 Error: 用户名已存在
chatgpt-web-share | 2023/03/19 03:51:35.539 ERROR: [cws.main] 'CHATGPT_BASE_URL'
chatgpt-web-share | 2023/03/19 03:51:35.541 ERROR: [uvicorn.error] Traceback (most recent call last):
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
chatgpt-web-share | async with self.lifespan_context(app) as maybe_state:
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 566, in aenter
chatgpt-web-share | await self._router.startup()
chatgpt-web-share | File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
chatgpt-web-share | await handler()
chatgpt-web-share | File "/app/backend/main.py", line 163, in on_startup
chatgpt-web-share | raise e
chatgpt-web-share | File "/app/backend/main.py", line 117, in on_startup
chatgpt-web-share | logger.debug(f"Using {os.environ['CHATGPT_BASE_URL']} as ChatGPT base url")
chatgpt-web-share | File "/usr/local/lib/python3.10/os.py", line 680, in getitem
chatgpt-web-share | raise KeyError(key) from None
chatgpt-web-share | KeyError: 'CHATGPT_BASE_URL'
chatgpt-web-share |
chatgpt-web-share | 2023/03/19 03:51:35.541 ERROR: [uvicorn.error] Application startup failed. Exiting.
chatgpt-web-share exited with code 3

@ZzxDDDDDD
Copy link
Author

我有尝试按照readme中所说的自己在config.yaml中输入反向代理的配置
chatgpt_base_url: http://127.0.0.1:6062/api/
run_reverse_proxy: true
reverse_proxy_port: 6062
reverse_proxy_binary_path: /app/backend/ChatGPT-Proxy-V4
reverse_proxy_puid: "user-XXXXXXXXXXXXXXXXXXX="
设置后好了,打扰您了,不好意思

@moeakwak
Copy link
Collaborator

moeakwak commented Mar 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants