Unable to acces tokenized link while running spark on jupyter

I am unable to access the link while launching spark2.0.2 in jupyter notebook.
I was getting a link as I was supposed to get but it was showing the address is not available.

Hi @Manoj_Nandam,

Can you please let us know the error which you are getting while launching spark2.0.2 notebook?

This is the terminal when I put pyspark command

I pasted the link with token in my chrome browser and it came up like this

I read one of your blog post and replace the localhost with 0.0.0.0

this is my “.bashrc”

Hi Manoj,

You need to replace the localhost with the hostname that you see in the url of the console.

Please note that localhost, 127.0.0.1 and 0.0.0.0 actually are loopback address pointing to your own computer.

The hostname would be either e.cloudxlab.com, f.cloudxlab.com or g.cloudxlab.com

Hi giri,

I tried hostname a.cloudxlab.com,b,c,d,e,f,g and I am facing the same issue

I have used f.cloudxlab.com also, in which my terminal was opened.

I think I got the problem. The ports that we had opened for spark were 4444 onwards.
I think we will might have to open these range of ports too.

is there anyway that I can pass the port number through flags

I too am trying to figure that out.

There could be another possibility of the error.
jupyter is bound on localhost instead of 0.0.0.0 which is the loopback and can be only accessed internally.

Could you follow this blogpost instead: https://cloudxlab.com/blog/running-pyspark-jupyter-notebook/

hi giri,

I have tried that and it worked. But I am facing problem initiating SparkSession.

import org.apache.spark.sql.SparkSession

thanks for your support giri. It feels great to have a mentor like you

1 Like

Cheers! Happy Learning.

having trouble launching jupyter notebook with spark. not sure what is wrong…

Any help is appreciated. TIA

the error message is below :roll_eyes: