Closed snio89 closed 3 years ago
Hi @snio89, sorry to hear you're having trouble. I was just able to create a server with an openssl self signed certificate and got it to connect and work. Like you mentioned the 'python.dataScience.allowUnauthorizedRemoteConnection' setting must be on.
I had a couple of questions:
@DavidKutu After testing firewall settings and various versions of openssl, I've found the source of this problem.
Here's the link that are related to this problem. https://github.com/cypress-io/cypress/issues/5446#issuecomment-546427333 https://github.com/cypress-io/cypress/issues/5446#issuecomment-571178433
It seems to be the certification created by openssl has a compatibility issue with the boringssl library in TLS connection (not sure because I don't have much knowledge about networks).
I've changed the jupyter notebook setting as below to force TLS v1.2 connection instead of TLS v1.0.
https://github.com/jupyter/notebook/issues/3790 c.NotebookApp.ssl_options = {'ssl_version': 5}
Everything works fine now but I cannot sure this is a bug of vscode-python or jupyter notebook.
I'm glad you got it to work. I'll keep this open as a reminder to dive deeper later.
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
Actual behavior
Following error message is printed:
Error: Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. https://(server_ip):(server_port)/ r: request to https://(server_ip):(server_port)/login? failed, reason: write EPROTO 41308680:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:568: at c:\Users\(remote_user)\.vscode\extensions\ms-python.python-2020.2.64397\src\client\datascience\jupyter\jupyterExecution.ts:206:39
Expected behavior
"abc" is printed.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
More Descriptions
I've set my Jupyter server environment as the one described in the official jupyter notebook page. https://jupyter-notebook.readthedocs.io/en/stable/public_server.html#securing-a-notebook-server
What I did:
The resulting jupyter server does not have any problem except the warning about the unreliable certificate when I access through the web browser as https://(server_ip):(server_port). However, when I attempt to access it through the VS Code, it produces a connection error as above.
It seems like the bug with an openssl certificate. When I remove the openssl certificate from the server and access http://(server_ip):(server_port) from the VS Code, no error happens and the code works as expected.
I've tried other options such as below but nothing helped.
*: suggested as a solution for https://github.com/microsoft/vscode-python/issues/4987
Developer Tools Console Output
notificationsAlerts.ts:40 Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. https://(server_ip):(server_port)/ r: request to https://(server_ip):(server_port)/login? failed, reason: write EPROTO 41308680:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:568: onDidNotificationChange @ notificationsAlerts.ts:40
console.ts:137 [Extension Host] Error Python Extension: 2020-03-01 15:48:13: DataScience Error Error: Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. https://(server_ip):(server_port)/ r: request to https://(server_ip):(server_port)/login? failed, reason: write EPROTO 41308680:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:../../third_party/boringssl/src/ssl/handshake_client.cc:568: at c:\Users\(remote_user)\.vscode\extensions\ms-python.python-2020.2.64397\src\client\datascience\jupyter\jupyterExecution.ts:206:39 t.log @ console.ts:137
2console.ts:137 [Extension Host] (node:14648) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. t.log @ console.ts:137
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer