Issue with Spark in yarn mode and webUI

  1. while launching spark on yarn mode i am getting the following error

console>:14: error: not found: value spark
import spark.implicits._
^
:14: error: not found: value spark
import spark.sql

2.Not able to view Spark WebUI @http://172.31.38.183:4040/

Try this.

val sqlContext = new org.apache.spark.sql.SQLContext(sc)
import sqlContext.implicits._

2 Likes

Hi @mrdboddu

In addition to Kranthi’s suggestion, if your Spark is running on port 4044 and your web console is on g.cloudxlab.com, go to below URL to access Spark

http://g.cloudxlab.com:4044

Hope this helps.

1 Like

Thanks @Kranthi_Karnam for your input.
tried @abhinav but didnt work
im still not able to access webUI even in local mode…is there anything that im missing?


Hi @mrdboddu,

Port 4045 is generally not accessible from the web browser. Please go through this link for the same. Can you please launch your spark job again and see if it is not running on port 4045.

Other ports apart from 4045 should open provided they are not blocked by your network firewall.

Hope this helps.

yeah @abhinav i tried that too but no luck with port 4040 either
does it have to do anything about my chrome version? as i m using my old macbook which doesnt allow me to upgrade furthur:confused:

Hi @mrdboddu,

172.x.x.x is a private ip. You will not be able to access it using web browser.

Since you are launching spark job on f.cloudxlab.com and your job is running on port 4040, type f.cloudxlab.com:4040 to access SparkUI

Hope this helps.

1 Like

Thank you @abhinav. it worked

1 Like

Great :slight_smile:

[quote=“Kranthi_Karnam, post:2, topic:282”]
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
[/quote]

hi @abhinav,

Again I am not able to create sparkContext object in yarn mode. it is throwing an error

Thanks
Deepak

Hi @mrdboddu,

Spark2.0.1 is not tightly integrated with Hadoop so it may not work in YARN mode.

Please use default Spark version for YARN mode

Hope this helps.