Failing to connect to remote SageMaker server
See original GitHub issueBug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
- Created a SageMaker notebook instance
- Ran
aws --region <region> sagemaker create-presigned-notebook-instance-url --notebook-instance-name <instance name>
to generate an authorized Url of the formhttps://<notebook name>.notebook.<region>.sagemaker.aws?authToken=<long auth token>
Cmd+Shift+P
->Python: Specify a local or remote Jupyter server for connections
and copied in the auth token.- Created a new .ipynb file in vscode and wrote
print('Hello World!')
- Ran the cell and received a popup
Enter your notebook password
- Got stuck since my notebook didn’t have a password. Decided to go to my SageMaker instance and try to create a password, so opened a terminal in my SM hosted instance and typed
jupyter notebook password
, then created a password. - Restarted the jupyter server with
sudo initctl restart jupyter-server --no-wait
- Refreshed my page, got a box asking for password, entered it in.
- Tried running the print statement again in vscode, entered in my new password.
- Got the same error as with no password:
Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified.
https://<notebook name>.notebook.<region>.sagemaker.aws/
Error: Failed to connect to password protected server. Check that password is correct.
Actual behavior
Received the above error.
Expected behavior
Connect to remote SageMaker server.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
- Jupyter server running: Local | Remote | N/A
- Extension version: 20YY.MM.#####-xxx
- VS Code version: #.##
- Setting python.jediEnabled: true | false
- Python and/or Anaconda version: #.#.#
- OS: Windows | Mac | Linux (distro):
- Virtual environment: conda | venv | virtualenv | N/A | …
Developer Tools Console Output
[Extension Host] Info Python Extension: 2020-03-22 20:56:39: Executing cell 5be2420a-8318-4c69-88ad-71134207026c
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:39: Waiting for jupyter server and web panel ...
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:39: Cached data exists getEnvironmentVariables, Untitled-1.ipynb
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:39: Getting jupyter server options ...
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:39: Connecting to jupyter server ...
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:39: Connecting to history server
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:41: Killing server because of error Error: Failed to connect to password protected server. Check that password is correct.
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:41: Shutting down notebooks for 4cea6e5c-f565-4d34-8996-788b645d8b2b
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:41: Shut down session manager
console.ts:137 [Extension Host] Info Python Extension: 2020-03-22 20:56:41: Finished executing cell 5be2420a-8318-4c69-88ad-71134207026c
notificationsAlerts.ts:40 Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. https://sagemaker-gluon.notebook.us-east-2.sagemaker.aws/ Error: Failed to connect to password protected server. Check that password is correct.
onDidChangeNotification @ notificationsAlerts.ts:40
console.ts:137 [Extension Host] Error Python Extension: 2020-03-22 20:56:41: DataScience Error Error: Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified.
https://sagemaker-gluon.notebook.us-east-2.sagemaker.aws/
Error: Failed to connect to password protected server. Check that password is correct. at /Users/austinmw/.vscode/extensions/ms-python.python-2020.3.69010/src/client/datascience/jupyter/jupyterExecution.ts:210:39
t.log @ console.ts:137
webviewElement.ts:241 [Embedded Page] Posting message get_variables_request to extension.
2console.ts:137 [Extension Host] (node:94559) [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
log.ts:197 ERR No application in the Launch Services database matches the input criteria.: Error: No application in the Launch Services database matches the input criteria.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Troubleshoot issues with associating Git repositories ... - AWS
I'm trying to add a Git repository to an Amazon SageMaker ... "fatal: unable to access <Git repository URL> : failed to connect...
Read more >How to connect SageMaker notebook from VS Code?
VS Code gives me this error: Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid...
Read more >Sagemaker Train Job can't connect to ec2 instance
I had this same issue, Sagemaker plus MLflow Server on another ec2. The first instinct is to assign the estimator the same VPC...
Read more >Resolving "Connection refused" or "Connection timed out ...
Resolving " Connection refused " or " Connection timed out" errors connecting to my EC2 Instance. Watch later. Share. Copy link.
Read more >Connect to compute instance in Visual Studio Code (preview)
This option allows you to set a compute instance as a remote Jupyter Notebook server. Configure a remote compute instance. To configure a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think that this issue is a duplicate of microsoft/vscode-python#10320 - 405 Method not allowed is not happening here.
Duplicate of microsoft/vscode-python#10320