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
httpx.ConnectError with --openai_server=True --ssl-verify=False #1589
Comments
Edit: left out some relevant parameters and had formatting errors. Corrected now. |
Hi,
i.e. these:
shouldn't matter for the OpenAI proxy.
You can try editing this line and remove the ssl stuff, just to be sure. h2ogpt/openai_server/server.py Line 374 in 88b62f1
Maybe you have something else on that port that is secure? Or maybe the port isn't allowed to be used?
|
Hi! Thanks for your detailed answer.
|
I changed and the port from 1001 to 10001, but have the same error... |
Maybe there is some ENV that is affecting uvicorn and causing it to trigger SSL. Not sure. |
It's on Ubuntu 22.04, and there is no proxy explicitly set up, nor is the internet connection filtered. But there is a proxy server available which browsers get via the http://gateway/wpad.dat when they're configured to automatically determine the proxy server. I don't know if this plays a role. |
I spent a few hours now trying to get this to work:
but I still get: Please help, @pseudotensor ! Gradio UI does work with the certificates, just the openai api doesn't. |
"localhost" sounds wrong, it should be maybe a real IP address. In latest h2oGPT what I see in end is:
i.e. 0.0.0.0 that for linux means open public version of local IP AFAIK. Maybe you have 'localhost' either using older h2oGPT or are on windows/mac. But you say you are on Ubuntu PC? When I go to chrome to that IP/Port, it works (the message is valid): Unfortunately I'm not expert in SSL stuff. I would recommend trying to setup a fastAPI server, since that is what h2oGPT is doing to get OpenAI proxy server. So do it in very basic form and see what one can do. E.g. from chatgpt:
This runs, do you have problems with this? We should be able to bisect the issue if no problem here and still problems with h2oGPT. |
Gradio UI works flawlessly but when trying to connect to the OpenAI-endpoint with HTTP, I get
httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
on the server, which is strange because it shouldn't be handled as HTTPS in the first place, but when trying to reach it via HTTPS, I get
Invalid HTTP request received.
When trying to contact an openai-compatible tabbyAPI-server directly on the same host (the one powering H2oGPT), it just works, but I need RAG.
Did I misconfigure something?
Here are the relevant parameters:
(...)
Here are the relevant parts of the log;
The text was updated successfully, but these errors were encountered: