Java gateway process

Hi,

I am having the following error when I run:

hl.init()

Any idea for solving this issue?

Exception: Traceback (most recent call last)
<ipython-input-9-1bfe9939c741> in <module>
----> 1 hl.init()
      2 output_notebook()
</home/waamer/anaconda2/envs/hail/lib/python3.7/site-packages/decorator.py:decorator-gen-1203> in init(sc, app_name, master, local, log, quiet, append, min_block_size, branching_factor, tmp_dir, default_reference, idempotent, global_seed, _optimizer_iterations, _backend)

~/anaconda2/envs/hail/lib/python3.7/site-packages/hail/typecheck/check.py in wrapper(__original_func, *args, **kwargs)
    583     def wrapper(__original_func, *args, **kwargs):
    584         args_, kwargs_ = check_all(__original_func, args, kwargs, checkers, is_method=is_method)
--> 585         return __original_func(*args_, **kwargs_)
    586 
    587     return wrapper
~/anaconda2/envs/hail/lib/python3.7/site-packages/hail/context.py in init(sc, app_name, master, local, log, quiet, append, min_block_size, branching_factor, tmp_dir, default_reference, idempotent, global_seed, _optimizer_iterations, _backend)
    262                 min_block_size, branching_factor, tmp_dir,
    263                 default_reference, idempotent, global_seed,
--> 264                 _optimizer_iterations,_backend)
    265 
    266 
</home/waamer/anaconda2/envs/hail/lib/python3.7/site-packages/decorator.py:decorator-gen-1201> in __init__(self, sc, app_name, master, local, log, quiet, append, min_block_size, branching_factor, tmp_dir, default_reference, idempotent, global_seed, optimizer_iterations, _backend)

~/anaconda2/envs/hail/lib/python3.7/site-packages/hail/typecheck/check.py in wrapper(__original_func, *args, **kwargs)
    583     def wrapper(__original_func, *args, **kwargs):
    584         args_, kwargs_ = check_all(__original_func, args, kwargs, checkers, is_method=is_method)
--> 585         return __original_func(*args_, **kwargs_)
    586 
    587     return wrapper

~/anaconda2/envs/hail/lib/python3.7/site-packages/hail/context.py in __init__(self, sc, app_name, master, local, log, quiet, append, min_block_size, branching_factor, tmp_dir, default_reference, idempotent, global_seed, optimizer_iterations, _backend)
     50             conf.set('spark.driver.extraClassPath', hail_jar_path)
     51             conf.set('spark.executor.extraClassPath', './hail-all-spark.jar')
---> 52             SparkContext._ensure_initialized(conf=conf)
     53         else:
     54             SparkContext._ensure_initialized()
~/anaconda2/envs/hail/lib/python3.7/site-packages/pyspark/context.py in _ensure_initialized(cls, instance, gateway, conf)
    314         with SparkContext._lock:
    315             if not SparkContext._gateway:
--> 316                 SparkContext._gateway = gateway or launch_gateway(conf)
    317                 SparkContext._jvm = SparkContext._gateway.jvm
    318 
~/anaconda2/envs/hail/lib/python3.7/site-packages/pyspark/java_gateway.py in launch_gateway(conf)
     44     :return: a JVM gateway
     45     """
---> 46     return _launch_gateway(conf)
     47 
     48 
~/anaconda2/envs/hail/lib/python3.7/site-packages/pyspark/java_gateway.py in _launch_gateway(conf, insecure)
    106 
    107             if not os.path.isfile(conn_info_file):
--> 108                 raise Exception("Java gateway process exited before sending its port number")
    109 
    110             with open(conn_info_file, "rb") as info:
Exception: Java gateway process exited before sending its port numbe

There’s something wrong with the install of Hail. A few questions:

  • in what environment did you install hail? On a laptop? On a cluster? In google cloud dataproc?
  • how did you install hail? Did you run pip install hail?
  • have you ever installed hail before this?
  • what version of java do you have? java -version

Thanks for the prompt reply

The issue is solved now as I was using java 1.9 and installed 1.8. Sorry missed to notice that on the installation guide.

1 Like

No worries mate, happy hailing.