Open todhm opened 6 years ago
@todhm
In my case, this error starting with JAVA_HOME is not set
. I tried to save the JAVA_HOME manually but it was not working.
JAVA_HOME is not set
JAVA_HOME is not set
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
File "./app/__init__.py", line 6, in <module>
from app import route
File "./app/route.py", line 4, in <module>
from app.resources.recommendation import Recommendation, GetRecommendation, Model
File "./app/resources/recommendation.py", line 5, in <module>
from app.core import core
File "./app/core/core.py", line 15, in <module>
sc =SparkContext.getOrCreate()
File "/usr/local/lib/python3.7/site-packages/pyspark/context.py", line 367, in getOrCreate
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
SparkContext(conf=conf or SparkConf())
File "./app/__init__.py", line 6, in <module>
File "/usr/local/lib/python3.7/site-packages/pyspark/context.py", line 133, in __init__
from app import route
File "./app/route.py", line 4, in <module>
SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
File "/usr/local/lib/python3.7/site-packages/pyspark/context.py", line 316, in _ensure_initialized
from app.resources.recommendation import Recommendation, GetRecommendation, Model
File "./app/resources/recommendation.py", line 5, in <module>
from app.core import core
File "./app/core/core.py", line 15, in <module>
SparkContext._gateway = gateway or launch_gateway(conf)
File "/usr/local/lib/python3.7/site-packages/pyspark/java_gateway.py", line 46, in launch_gateway
sc =SparkContext.getOrCreate()
File "/usr/local/lib/python3.7/site-packages/pyspark/context.py", line 367, in getOrCreate
return _launch_gateway(conf)
File "/usr/local/lib/python3.7/site-packages/pyspark/java_gateway.py", line 108, in _launch_gateway
raise Exception("Java gateway process exited before sending its port number")
Exception: Java gateway process exited before sending its port number
Has the error been solved?
I am trying to create python app which use spark cluster consists with docker.
However when I try to create pyspark app in webapp container with following configuration it gave me some error.
How can I solve this problem?