Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notebooks on EMR (AWS): Failed to start kernel

I am creating a notebook with the built-in option from "Amazon EMR" following the steps in the official documentation

  • Everything as default
  • EMR-Cluster created with the notebook-Wizzard

After starting successfully the notebook in Jupyter, an error appears by loading the kernel. Different kernels (Python3, PySpark) produce the same result. By clicking in "Kernel Error" on the toolbar in Jupyter, following message is shown:

Failed to start kernel

"Error attempting to connect to Gateway server url 'http://localhost:17777'. Ensure gateway url is valid and the Gateway instance is running."

Any clue what am I missing?

Thanks!

like image 388
miguel.rodelas Avatar asked May 22 '20 09:05

miguel.rodelas


People also ask

Where are EMR notebooks saved?

Each EMR notebook is saved to Amazon S3 as a file named NotebookName . ipynb . As long as a notebook file is compatible with the same version of Jupyter Notebook that EMR Notebooks is based on, you can open the notebook as an EMR notebook.

Can we run PySpark on EMR?

You can use AWS Step Functions to run PySpark applications as EMR Steps on an existing EMR cluster. Using Step Functions, we can also create the cluster, run multiple EMR Steps sequentially or in parallel, and finally, auto-terminate the cluster.


3 Answers

For aws emr 6, same issue persists. Kernel error in 6.2.0, but using 6.1.0 would work.Also agree with the answer above in IAM user, I switched from root user to IAM then 6.2.0 worked fine.

So basically you either choose to create and log in with IAM user for 6.2.0, or stay with root user but use 6.1.0.

like image 168
caden Hong Avatar answered Oct 09 '22 23:10

caden Hong


I am getting this error when signing in as root user.

I signed in as IAM user (see here https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html) and everything works fine.

like image 8
Andrey Avatar answered Oct 09 '22 22:10

Andrey


I encountered the same issue a while back. Check your emr release version when you launch the cluster. There seems to be an issue with 5.30.0. I was able to connect using 5.29.0. Otherwise, you can host your own notebook.

like image 5
casualprogrammer Avatar answered Oct 09 '22 22:10

casualprogrammer