Unable to acces tokenized link while running spark on jupyter


#2

Hi @Manoj_Nandam,

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


#3

This is the terminal when I put pyspark command


#4

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


#5

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


#6

this is my “.bashrc”


#7

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.


#8

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


#9

Hi giri,

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


#10

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


#11

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.


#12

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


#13

I too am trying to figure that out.


#14

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/


#15

hi giri,

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


#16

import org.apache.spark.sql.SparkSession


#17

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


#18

Cheers! Happy Learning.


#19

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

Any help is appreciated. TIA


#20

the error message is below :roll_eyes:


#21

Could you try running the jupyter at port starting from 4040?