Need help in resolving error during installation of spark R:Error in sparkR.init(master = "local") : JVM is not ready after 10 seconds



Hi everyone,

I was installing spark R on windows 10, and during the process, I am not able to remove one error even after constant struggle and searches.
The system has 64 bit OS , and 8GB RAM. I am currently using Java 7.

I followed the spark R documentation and typed the following code:
if (nchar(Sys.getenv("SPARK_HOME")) < 1) { Sys.setenv(SPARK_HOME = "C:/Users/shashwat2014/Documents/spark-1.6.1") } library("SparkR", lib.loc="C:/Users/shashwat2014/Documents/R/win-library/3.3")

Here, spark-1.6.1 is the folder in which spark 1.6.1 is installed.
Till this point everything worked fine.

Then during initialising:
Launching java with spark-submit command C:/Users/shashwat2014/Documents/spark-1.6.1/bin/spark-submit.cmd sparkr-shell C:\Users\SHASHW~1\AppData\Local\Temp\Rtmp0MEKzo\backend_port24904e7438fe
Error in sparkR.init(master = “local”) :
JVM is not ready after 10 seconds

Please help me with the installation. Any help would be appreciated.


Hi @shashwat.2014

I have recently installed sparkR on windows as well. This error arises when the environment variables are not set up properly. Ensure that you have included HADOOP_HOME in the environment variables as well if the version of Spark that you are using is pre-built for some version of Hadoop.

Also, make sure that a spark shell is running while you initialise spark R.

The following links will definitely help you out.