Support Questions

Find answers, ask questions, and share your expertise

Zeppelin & SparkR - unable to start device X11cairo

avatar
Expert Contributor

@Neeraj Sabharwal - seeing your post on linkedin I decided to write here, hopefully someone is doing sparkR on Zeppelin

I have installed Zeppelin with R interpreter and at the beginning everything worked well. I could run spark.r and spark.knitr. Then all of a sudden, I started getting the following error message: unable to start device X11cairo when running spark.r. Cairo library is installed, I could run all RInterpreter examples, but after a while this happened.

My zeppelin out file gives me this:

ERROR RContext: R Error .zreplout <- rzeppelin:::.z.valuate(.zreplin) unable to start device X11cairo

Zeppelin is installed on ubuntu 14.04, Im using spark 1.5.2, sparkR from the CLI runs properly. Ive used this git: https://github.com/elbamos/Zeppelin-With-R

What am I missing?

1 ACCEPTED SOLUTION

avatar
Expert Contributor
@Neeraj Sabharwal

Manage to fix it now. Silly problem, actually.

I was installing R packages as sudo, but running my zeppelin service as zeppelin user. Now I ran zeppelin as sudo and it works.

View solution in original post

9 REPLIES 9

avatar
Master Mentor

avatar
Master Mentor

avatar
Master Mentor

@marko I used spark 1.6 ...Try with 1.6

avatar
Expert Contributor

@Neeraj Sabharwal

Ive set up Spark 1.6.0, installed sparkR environment, and built and started zeppelin with R interpreter. I managed to run the RInterpreter notebook.

Then I tried to run your example with flights data, I got the same erro message. Now it seems as if I cannot run the zeppelin example either. Same error message:

unable to start device X11cairo

avatar
Master Mentor

@marko What are you running specifically? Error is related to R

Can you make sure that you have all the packages installed mentioned in https://gist.github.com/nsabharwal/9163e0adfc66af080145?

avatar
Expert Contributor

@Neeraj Sabharwal

The way I have tested RZeppelin twice now is the following: I ran the RInterpreter and it worked fine.

As soon as I try something on my own, I get this error. The second time I installed, I wanted to run your flights example and when I wanted to load the four libraries I already got this error message.

btw, Im surprised your installation was successful without installing Cairo package. I had to install cairo package before running install install_github('IRkernel/repr').

If I run the following command in R:

#list all installed packages and versions:

ip <- as.data.frame(installed.packages()[,c(1,3:4)])

rownames(ip) <- NULL

ip <- ip[is.na(ip$Priority),1:2,drop=FALSE]

print(ip, row.names=FALSE)

Packages and versions you mention in your git (plus Cairo):

base64enc 0.1-3

Cairo 1.5-9

caret 6.0-64

devtools 1.10.0

dplyr 0.4.3

evaluate 0.8

repr 0.4

This is the list of all installed packages:

r-installed-pkgs.txt

My R version:

> version _ platform x86_64-pc-linux-gnu

arch x86_64

os linux-gnu

system x86_64, linux-gnu

status

major 3

minor 2.3

year 2015

month 12

day 10

svn rev 69752

language R

version.string R

version 3.2.3 (2015-12-10)

nickname Wooden Christmas-Tree

avatar
Expert Contributor

@Neeraj Sabharwal

Just to help you help me, here is what Ive installed to make it work before the error message:

sudo apt-get install libxml2-dev -y

sudo apt-get install libcurl4-openssl-dev -y

sudo apt-get install libssl-dev -y

sudo apt-get install libcurl4-gnutls-dev -y

sudo apt-get install libcairo2-dev -y

in R (as root):

install.packages("evaluate", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages("base64enc", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages("devtools", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages("dplyr", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages("caret", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages("Cairo", dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages('googleVis', dependencies = TRUE, repos='http://cran.us.r-project.org')

install.packages('mplot', dependencies = TRUE, repos='http://cran.us.r-project.org')

avatar
Expert Contributor
@Neeraj Sabharwal

Manage to fix it now. Silly problem, actually.

I was installing R packages as sudo, but running my zeppelin service as zeppelin user. Now I ran zeppelin as sudo and it works.

avatar
Master Mentor

@marko That's good to know and thanks for the final followup.