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

Issue with Gradio and SSL #3846

Closed
1 task done
bharadwaj509 opened this issue Apr 13, 2023 · 4 comments
Closed
1 task done

Issue with Gradio and SSL #3846

bharadwaj509 opened this issue Apr 13, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bharadwaj509
Copy link

bharadwaj509 commented Apr 13, 2023

Describe the bug

Hello,

I have a issue with the ssl. I got my cert and key files using openssl in remote ubuntu machine. I have to use the microphone and the http is not sufficient as I understand and that is the reason I am going for https. I got my self-signed certificate. And as I run it, the following is the error.

I also followed the #563 and #2551 to change the blocks.py but neither change did not work for me.

I see that you are working on some change on the latest gradio, please let me know if that CR is already publsihed.

Also, I have only 443 available as an open port at my company. Will the certificates work on that port?

If not, kindly help me on this.

Is there an existing issue for this?

  • I have searched the existing issues

Reproduction

'
demo.launch(server_port=443,server_name="0.0.0.0", ssl_keyfile="key.pem", ssl_certfile="cert.pem")-
'

Screenshot

No response

Logs

`requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: /startup-events (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:997)')))
`

System Info

Gradio 3.10, Ubuntu machine accessing remotely.

Severity

annoying

@bharadwaj509 bharadwaj509 added the bug Something isn't working label Apr 13, 2023
@bharadwaj509
Copy link
Author

Hey @abidlabs and @Escovilla , Could you please help me on this one when you get time?

@abidlabs
Copy link
Member

abidlabs commented May 6, 2023

Should be fixed now via #3873!

@abidlabs abidlabs closed this as completed May 6, 2023
@Nancis1130
Copy link

Have you solved this issue?

@shanky100
Copy link

demo.launch(share=False, server_name="0.0.0.0",server_port=7000,ssl_verify=False, ssl_certfile="cert.pem", ssl_keyfile="key.pem")

I am using this command, and my version are
gradio 3.39.0
gradio_client 0.3.0

I have used openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes
to generate the files.

But I get this error again and again
requests.exceptions.SSLError: HTTPSConnectionPool(host='localhost', port=7000): Max retries exceeded with url: /startup-events (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)')))

Any help or solutions would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants