# py4j.protocol.Py4JNetworkError: Answer from Java side is empty: hail, download files

**URL:** <https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069>\
**Category:** Hail Query & hailctl\
**Created:** [September 3, 2019, 4:21pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069 "2019-09-03T16:21:42Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 3, 2019, 4:21pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/1 "2019-09-03T16:21:42Z")

</div>

Hello, I have installed hail using pycharm not from github nor conda. I was trying read 1k genome vcf data:  
hl.import\_vcf(‘data/1kg.vcf.bgz’).write(‘data/1kg.mt’, overwrite=True)  
mt = hl.read\_matrix\_table(‘data/1kg.mt’)  
The error:

> /shire/zillur/learning/python/project1/venv/bin/python /shire/zillur/learning/python/project1/gwas\_hail\_1.py  
> 19/09/03 11:58:06 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable  
> Using Spark’s default log4j profile: org/apache/spark/log4j-defaults.properties  
> Setting default log level to “WARN”.  
> To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).  
> Running on Apache Spark version 2.4.1  
> SparkUI available at [http://dutillab:4040](http://dutillab:4040)  
> Welcome to  
> \_\_ \_\_ \<\>\_\_  
> / /\_/ /\_\_ \_\_/ /  
> / \_\_ / \_ `/ / / /_/ /_/\_,_/_/_/ version 0.2.20-dd6c996e7db5 LOGGING: writing to /shire/zillur/learning/python/project1/hail-20190903-1158-0.2.20-dd6c996e7db5.log 2019-09-03 11:58:18 Hail: INFO: downloading 1KG VCF ... Source: https://storage.googleapis.com/hail-tutorial/1kg.vcf.bgz 2019-09-03 11:58:19 Hail: INFO: importing VCF and writing to matrix table... ERROR: dlopen("/tmp/libhail7063416592875974503.so"): /lib64/libstdc++.so.6: version `CXXABI\_1.3.8’ not found (required by /tmp/libhail7063416592875974503.so)  
> FATAL: caught exception java.lang.UnsatisfiedLinkError: /tmp/libhail7063416592875974503.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libhail7063416592875974503.so) java.lang.UnsatisfiedLinkError: /tmp/libhail7063416592875974503.so: /lib64/libstdc++.so.6: version `CXXABI\_1.3.8’ not found (required by /tmp/libhail7063416592875974503.so)  
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)  
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)  
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)  
> at java.lang.Runtime.load0(Runtime.java:809)  
> at java.lang.System.load(System.java:1086)  
> at is.hail.nativecode.NativeCode.(NativeCode.java:30)  
> at is.hail.nativecode.NativeBase.(NativeBase.scala:20)  
> at is.hail.annotations.Region.(Region.scala:180)  
> at is.hail.annotations.Region$.apply(Region.scala:16)  
> at is.hail.annotations.Region$.scoped(Region.scala:18)  
> at is.hail.expr.ir.ExecuteContext$.scoped(ExecuteContext.scala:7)  
> at is.hail.backend.Backend.execute(Backend.scala:86)  
> at is.hail.backend.Backend.executeJSON(Backend.scala:92)  
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
> at java.lang.reflect.Method.invoke(Method.java:498)  
> at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)  
> at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)  
> at py4j.Gateway.invoke(Gateway.java:282)  
> at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)  
> at py4j.commands.CallCommand.execute(CallCommand.java:79)  
> at py4j.GatewayConnection.run(GatewayConnection.java:238)  
> at java.lang.Thread.run(Thread.java:748)  
> ERROR:root:Exception while sending command.  
> Traceback (most recent call last):  
> File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1159, in send\_command  
> raise Py4JNetworkError(“Answer from Java side is empty”)  
> py4j.protocol.Py4JNetworkError: Answer from Java side is empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 985, in send\_command  
response = connection.send\_command(command)  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1164, in send\_command  
“Error while receiving”, e, proto.ERROR\_ON\_RECEIVE)  
py4j.protocol.Py4JNetworkError: Error while receiving  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/gwas\_hail\_1.py”, line 8, in   
hl.utils.get\_1kg(‘data/’)  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/hail/utils/tutorial.py”, line 73, in get\_1kg  
hl.import\_vcf(cluster\_readable\_vcf, min\_partitions=16).write(matrix\_table\_path, overwrite=True)  
File “\</shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/decorator.py:decorator-gen-1018\>”, line 2, in write  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/hail/typecheck/check.py”, line 585, in wrapper  
return _original\_func(\*args, \*\*kwargs_)  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/hail/matrixtable.py”, line 2508, in write  
Env.backend().execute(MatrixWrite(self.\_mir, writer))  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/hail/backend/backend.py”, line 108, in execute  
result = json.loads(Env.hc().\_jhc.backend().executeJSON(self.\_to\_java\_ir(ir)))  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1257, in **call**  
answer, self.gateway\_client, self.target\_id, self.name)  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/hail/utils/java.py”, line 213, in deco  
return f(\*args, \*\*kwargs)  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/protocol.py”, line 336, in get\_return\_value  
format(target\_id, “.”, name))  
py4j.protocol.Py4JError: An error occurred while calling o50.executeJSON  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused  
ERROR:py4j.java\_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:40268)  
Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 929, in \_get\_connection  
connection = self.deque.pop()  
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/shire/zillur/learning/python/project1/venv/lib64/python3.6/site-packages/py4j/java\_gateway.py”, line 1067, in start  
self.socket.connect((self.address, self.port))  
ConnectionRefusedError: [Errno 111] Connection refused

Process finished with exit code 1

---

<div class="post-metadata">

**Author:** ![johnc1231](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/johnc1231/32/286_2.png) [@johnc1231](https://discuss.hail.is/u/johnc1231)\
**Post date:** [September 3, 2019, 4:23pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/2 "2019-09-03T16:23:47Z")

</div>

Based on error, my guess is that your version of the C++ standard library is incompatible with the version of Hail you have. Your system must have _at least_ GCC 4.9 installed in order to have access to CXXABI\_1.3.8. What is the output of `gcc --version` ?

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 3, 2019, 4:28pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/3 "2019-09-03T16:28:47Z")

</div>

Thank you John.  
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36). How can I get newer version of gcc? Best, Zillur

---

<div class="post-metadata">

**Author:** ![johnc1231](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/johnc1231/32/286_2.png) [@johnc1231](https://discuss.hail.is/u/johnc1231)\
**Post date:** [September 3, 2019, 4:32pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/4 "2019-09-03T16:32:26Z")

</div>

Probably by running something like: `sudo yum install gcc-c++` ?

> <https://stackoverflow.com/questions/47175706/how-to-install-gcc-4-9-2-on-rhel-7-4>

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [September 3, 2019, 8:06pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/5 "2019-09-03T20:06:34Z")

</div>

@zillurbmb51, Even if you get a recent version of `gcc` installed, you will need a newer version of RHEL. RHEL 4.8.5 was released in December 2004 and uses a version of the GNU C Standard Library with which Hail is incompatible. RHEL 7 should be sufficient for use with Hail.

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 2:23pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/6 "2019-09-09T14:23:32Z")

</div>

Hello, Thank you. Now I have gcc 7 in centos 7  
`gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5 )  
I have reinstalled hail as follows:  
conda create -n hail python==3.6  
conda activate hail  
sudo pip3 install hail  
sudo python3.6 -m pip install -U --force-reinstall hail  
Now I am getting following error: Any help?

```
(hail) [zillur@dutillab hail]$ python3.6 -c 'import hail as hl; hl.balding_nichols_model(3, 100, 100)._force_count_rows()'
Initializing Spark and Hail with default parameters...
19/09/09 10:22:08 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Setting default log level to "WARN".
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).
Running on Apache Spark version 2.4.1
SparkUI available at http://dutillab:4040
Welcome to
     ____ <>__
    / /_/ / ____ / /
   / __ / _ `/ / /
  /_/ /_/\_,_/_/_/ version 0.2.21-f16fd64e0d77
LOGGING: writing to /shire/zillur/hail/hail-20190909-1022-0.2.21-f16fd64e0d77.log
2019-09-09 10:22:20 Hail: INFO: balding_nichols_model: generating genotypes for 3 populations, 100 samples, and 100 variants...
ERROR: dlopen("/tmp/libhail1432194653321224887.so"): /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libhail1432194653321224887.so)
FATAL: caught exception java.lang.UnsatisfiedLinkError: /tmp/libhail1432194653321224887.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libhail1432194653321224887.so)
java.lang.UnsatisfiedLinkError: /tmp/libhail1432194653321224887.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libhail1432194653321224887.so)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:809)
	at java.lang.System.load(System.java:1086)
	at is.hail.nativecode.NativeCode.<clinit>(NativeCode.java:30)
	at is.hail.nativecode.NativeBase.<init>(NativeBase.scala:20)
	at is.hail.annotations.Region.<init>(Region.scala:180)
	at is.hail.annotations.Region$.apply(Region.scala:16)
	at is.hail.annotations.Region$.scoped(Region.scala:18)
	at is.hail.expr.ir.ExecuteContext$.scoped(ExecuteContext.scala:7)
	at is.hail.backend.Backend.execute(Backend.scala:86)
	at is.hail.backend.Backend.executeJSON(Backend.scala:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
	at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
	at py4j.Gateway.invoke(Gateway.java:282)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.GatewayConnection.run(GatewayConnection.java:238)
	at java.lang.Thread.run(Thread.java:748)
ERROR:root:Exception while sending command.
Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1159, in send_command
    raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 985, in send_command
    response = connection.send_command(command)
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1164, in send_command
    "Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/hail/matrixtable.py", line 2389, in _force_count_rows
    return Env.backend().execute(MatrixToValueApply(self._mir, {'name': 'ForceCountMatrixTable'}))
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/hail/backend/backend.py", line 108, in execute
    result = json.loads(Env.hc()._jhc.backend().executeJSON(self._to_java_ir(ir)))
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1257, in __call__
    answer, self.gateway_client, self.target_id, self.name)
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/hail/utils/java.py", line 213, in deco
    return f(*args, **kwargs)
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/protocol.py", line 336, in get_return_value
    format(target_id, ".", name))
py4j.protocol.Py4JError: An error occurred while calling o50.executeJSON
ERROR:root:Exception while sending command.
Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1159, in send_command
    raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 985, in send_command
    response = connection.send_command(command)
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1164, in send_command
    "Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:39100)
Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 929, in _get_connection
    connection = self.deque.pop()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1067, in start
    self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:39100)
Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 929, in _get_connection
    connection = self.deque.pop()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/shire/anaconda2/envs/hail/lib/python3.6/site-packages/py4j/java_gateway.py", line 1067, in start
    self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
```

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [September 9, 2019, 2:29pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/7 "2019-09-09T14:29:17Z")

</div>

what platform are you running on? You’ll probably need to compile hail yourself: [https://hail.is/docs/0.2/getting\_started\_developing.html#building-hail](https://hail.is/docs/0.2/getting_started_developing.html#building-hail)

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 2:36pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/8 "2019-09-09T14:36:16Z")

</div>

Thank you. I have tried from the link you shared. Getting this:  
(hail) [zillur@dutillab hail]$ git clone [https://github.com/hail-is/hail.git](https://github.com/hail-is/hail.git)

```auto
Cloning into 'hail'...
    remote: Enumerating objects: 43, done.
    remote: Counting objects: 100% (43/43), done.
    remote: Compressing objects: 100% (42/42), done.
    remote: Total 91935 (delta 14), reused 3 (delta 1), pack-reused 91892
    Receiving objects: 100% (91935/91935), 71.62 MiB | 22.92 MiB/s, done.
    Resolving deltas: 100% (55407/55407), done.
    (hail) [zillur@dutillab hail]$ cd hail/hail/
    (hail) [zillur@dutillab hail]$ ls
    benchmark diagnose.sh env_var.mk gradlew.bat pgradle scripts test-jar-with-dependencies.xml www
    build.gradle Dockerfile.hail-build get-deployed-sha.sh install-gcs-connector.sh prebuilt settings.gradle testng-cpp-codegen.xml
    build.sbt Dockerfile.hail-run gradle list_pypi_versions.py project src testng-distributed-backend.xml
    code_style.xml Dockerfile.hailtop gradlew Makefile python style-guide.md testng.xml
    (hail) [zillur@dutillab hail]$ make install-wheel HAIL_COMPILE_NATIVES=1 SPARK_VERSION=2.4.1
    make: *** No rule to make target 'install-wheel'. Stop.
    (hail) [zillur@dutillab hail]$ ls ../
    apiserver batch2 datasets gateway image-fetcher monitoring project router-resolver setup.cfg vdc
    auth build.yaml docker gateway-internal letsencrypt notebook pylintrc scheduler site
    AUTHORS ci env-setup.sh generate-uid.sh LICENSE notebook2 README.md scorecard ukbb-rg
    batch cloud-sql.mk etc hail Makefile pipeline router SECRETS.md until-with-fuel
    (hail) [zillur@dutillab hail]$ cd ../
    (hail) [zillur@dutillab hail]$ make install-wheel HAIL_COMPILE_NATIVES=1 SPARK_VERSION=2.4.1
    make: *** No rule to make target 'install-wheel'. Stop.

```

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [September 9, 2019, 2:48pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/9 "2019-09-09T14:48:26Z")

</div>

ack that’s out of date. Should be `install` not `install-wheel`

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 3:10pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/10 "2019-09-09T15:10:55Z")

</div>

Thank you. Still doesn’t work.  
(hail) [zillur@dutillab hail]$ sudo make install HAIL\_COMPILE\_NATIVES=1 SPARK\_VERSION=2.4.1  
[sudo] password for zillur:  
SPARK\_VERSION is set to “2.4.1” which is different from old value “2.4.0”  
printf “2.4.1” \> env/SPARK\_VERSION  
echo ‘[Build Metadata]’ \> src/main/resources/build-info.properties  
echo ‘user=root’ \>\> src/main/resources/build-info.properties  
echo ‘revision=b42ffc0c9feb43cca19a3a743a535e7d93cfb93d’ \>\> src/main/resources/build-info.properties  
echo ‘branch=master’ \>\> src/main/resources/build-info.properties  
echo ‘date=2019-09-09T15:10:01Z’ \>\> src/main/resources/build-info.properties  
echo ‘url=https://github.com/hail-is/hail.git’ \>\> src/main/resources/build-info.properties  
echo ‘sparkVersion=2.4.1’ \>\> src/main/resources/build-info.properties  
echo ‘hailPipVersion=0.2.21’ \>\> src/main/resources/build-info.properties  
make -C src/main/c prebuilt  
make[1]: Entering directory ‘/shire/zillur/hail/hail/hail/src/main/c’  
make[1]: \*\*\* No rule to make target ‘lz4.h’, needed by ‘build/Decoder.o’. Stop.  
make[1]: Leaving directory ‘/shire/zillur/hail/hail/hail/src/main/c’  
make: \*\*\* [Makefile:350: native-lib-prebuilt] Error 2

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [September 9, 2019, 3:25pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/11 "2019-09-09T15:25:25Z")

</div>

[You need to install lz4](https://hail.is/docs/0.2/getting_started.html). Anyway, it appears that you don’t have a recent version of `libstdc++`. What version of `g++` do you have installed?

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 3:31pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/12 "2019-09-09T15:31:48Z")

</div>

Thank you. The g++ version is:  
`g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)`  
And the lz4:  
(hail) [zillur@dutillab hail]$ sudo yum install lz4  
Loaded plugins: fastestmirror, langpacks  
Loading mirror speeds from cached hostfile  
\* base: mirror.linux.duke.edu  
\* centos-sclo-rh: [mirror.fileplanet.com](http://mirror.fileplanet.com)  
\* centos-sclo-sclo: [mirror.teklinks.com](http://mirror.teklinks.com)  
\* elrepo: [mirror.pit.teraswitch.com](http://mirror.pit.teraswitch.com)  
\* epel: mirror.siena.edu  
\* extras: [mirror.mojohost.com](http://mirror.mojohost.com)  
\* updates: [mirrors.gigenet.com](http://mirrors.gigenet.com)  
Package lz4-1.7.5-2.el7.x86\_64 already installed and latest version  
Nothing to do

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [September 9, 2019, 3:36pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/13 "2019-09-09T15:36:42Z")

</div>

You need the development version of lz4, in apt-get this is called liblz4-dev, you’ll need to find the equivalent package for yum. Also, after updating, you’ll need to run `make clean` before trying to build again.

It seems likely that your worker nodes do not have g++ 7.3.1. Every node in the Spark cluster will need the same version of g++.

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 4:47pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/14 "2019-09-09T16:47:54Z")

</div>

Thank you. Now I have the lz4-devel, gcc 9.2 for all nodes and getting this:  
(base) [zillur@dutillab hail]$ sudo make clean  
rm -rf env  
make -C www clean  
make[1]: Entering directory `/shire/zillur/hail/hail/hail/www' rm -f 404.html references.html index.html make[1]: Leaving directory`/shire/zillur/hail/hail/hail/www’  
make -C src/main/c clean  
make[1]: Entering directory `/shire/zillur/hail/hail/hail/src/main/c' g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Upcalls.cpp -MG -M -MF build/Upcalls.d -MT build/Upcalls.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux testutils/unit-tests.cpp -MG -M -MF build/testutils/unit-tests.d -MT build/testutils/unit-tests.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux test.cpp -MG -M -MF build/test.d -MT build/test.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Region_test.cpp -MG -M -MF build/Region_test.d -MT build/Region_test.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Region.cpp -MG -M -MF build/Region.d -MT build/Region.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux PartitionIterators.cpp -MG -M -MF build/PartitionIterators.d -MT build/PartitionIterators.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ObjectArray.cpp -MG -M -MF build/ObjectArray.d -MT build/ObjectArray.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeStatus.cpp -MG -M -MF build/NativeStatus.d -MT build/NativeStatus.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativePtr.cpp -MG -M -MF build/NativePtr.d -MT build/NativePtr.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeModule.cpp -MG -M -MF build/NativeModule.d -MT build/NativeModule.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeLongFunc.cpp -MG -M -MF build/NativeLongFunc.d -MT build/NativeLongFunc.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeCodeSuite.cpp -MG -M -MF build/NativeCodeSuite.d -MT build/NativeCodeSuite.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeBoot.cpp -MG -M -MF build/NativeBoot.d -MT build/NativeBoot.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Logging.cpp -MG -M -MF build/Logging.d -MT build/Logging.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ibs.cpp -MG -M -MF build/ibs.d -MT build/ibs.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux FS.cpp -MG -M -MF build/FS.d -MT build/FS.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Encoder.cpp -MG -M -MF build/Encoder.d -MT build/Encoder.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Decoder.cpp -MG -M -MF build/Decoder.d -MT build/Decoder.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux davies.cpp -MG -M -MF build/davies.d -MT build/davies.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux cache-tests.cpp -MG -M -MF build/cache-tests.d -MT build/cache-tests.o g++: error: unrecognized command line option ‘-std=c++14’ g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ApproximateQuantiles_test.cpp -MG -M -MF build/ApproximateQuantiles_test.d -MT build/ApproximateQuantiles_test.o g++: error: unrecognized command line option ‘-std=c++14’ rm -rf build libsimdpp-2.1 lib make[1]: Leaving directory`/shire/zillur/hail/hail/hail/src/main/c’  
./gradlew clean -Dspark.version=2.4.0 -Dpy4j.version

```
BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date
rm -rf build/
rm -rf python/hail/hail-all-spark.jar
rm -rf python/README.md
(base) [zillur@dutillab hail]$ sudo make install HAIL_COMPILE_NATIVES=1 SPARK_VERSION=2.4.1
SHORT_REVISION is set to "b42ffc0c9feb" which is different from old value ""
printf "b42ffc0c9feb" > env/SHORT_REVISION
HAIL_PIP_VERSION is set to "0.2.21" which is different from old value ""
printf "0.2.21" > env/HAIL_PIP_VERSION
echo 0.2.21-b42ffc0c9feb > python/hail/hail_version
echo 0.2.21 > python/hail/hail_pip_version
cp -f python/hail/hail_version python/hailtop/hailctl/hail_version
REVISION is set to "b42ffc0c9feb43cca19a3a743a535e7d93cfb93d" which is different from old value ""
printf "b42ffc0c9feb43cca19a3a743a535e7d93cfb93d" > env/REVISION
BRANCH is set to "master" which is different from old value ""
printf "master" > env/BRANCH
URL is set to "https://github.com/hail-is/hail.git" which is different from old value ""
printf "https://github.com/hail-is/hail.git" > env/URL
SPARK_VERSION is set to "2.4.1" which is different from old value ""
printf "2.4.1" > env/SPARK_VERSION
echo '[Build Metadata]' > src/main/resources/build-info.properties
echo 'user=zillur' >> src/main/resources/build-info.properties
echo 'revision=b42ffc0c9feb43cca19a3a743a535e7d93cfb93d' >> src/main/resources/build-info.properties
echo 'branch=master' >> src/main/resources/build-info.properties
echo 'date=2019-09-09T16:45:30Z' >> src/main/resources/build-info.properties
echo 'url=https://github.com/hail-is/hail.git' >> src/main/resources/build-info.properties
echo 'sparkVersion=2.4.1' >> src/main/resources/build-info.properties
echo 'hailPipVersion=0.2.21' >> src/main/resources/build-info.properties
make -C src/main/c prebuilt
make[1]: Entering directory `/shire/zillur/hail/hail/hail/src/main/c'
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Upcalls.cpp -MG -M -MF build/Upcalls.d -MT build/Upcalls.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux testutils/unit-tests.cpp -MG -M -MF build/testutils/unit-tests.d -MT build/testutils/unit-tests.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux test.cpp -MG -M -MF build/test.d -MT build/test.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Region_test.cpp -MG -M -MF build/Region_test.d -MT build/Region_test.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Region.cpp -MG -M -MF build/Region.d -MT build/Region.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux PartitionIterators.cpp -MG -M -MF build/PartitionIterators.d -MT build/PartitionIterators.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ObjectArray.cpp -MG -M -MF build/ObjectArray.d -MT build/ObjectArray.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeStatus.cpp -MG -M -MF build/NativeStatus.d -MT build/NativeStatus.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativePtr.cpp -MG -M -MF build/NativePtr.d -MT build/NativePtr.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeModule.cpp -MG -M -MF build/NativeModule.d -MT build/NativeModule.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeLongFunc.cpp -MG -M -MF build/NativeLongFunc.d -MT build/NativeLongFunc.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeCodeSuite.cpp -MG -M -MF build/NativeCodeSuite.d -MT build/NativeCodeSuite.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux NativeBoot.cpp -MG -M -MF build/NativeBoot.d -MT build/NativeBoot.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Logging.cpp -MG -M -MF build/Logging.d -MT build/Logging.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ibs.cpp -MG -M -MF build/ibs.d -MT build/ibs.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux FS.cpp -MG -M -MF build/FS.d -MT build/FS.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Encoder.cpp -MG -M -MF build/Encoder.d -MT build/Encoder.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Decoder.cpp -MG -M -MF build/Decoder.d -MT build/Decoder.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux davies.cpp -MG -M -MF build/davies.d -MT build/davies.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux cache-tests.cpp -MG -M -MF build/cache-tests.d -MT build/cache-tests.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux ApproximateQuantiles_test.cpp -MG -M -MF build/ApproximateQuantiles_test.d -MT build/ApproximateQuantiles_test.o
g++: error: unrecognized command line option ‘-std=c++14’
g++ -o build/NativeBoot.o -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux -MD -MF build/NativeBoot.d -MT build/NativeBoot.o -c NativeBoot.cpp
g++: error: unrecognized command line option ‘-std=c++14’
make[1]: *** [build/NativeBoot.o] Error 1
make[1]: Leaving directory `/shire/zillur/hail/hail/hail/src/main/c'
make: *** [native-lib-prebuilt] Error 2
```

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 4:53pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/15 "2019-09-09T16:53:02Z")

</div>

When I try to download the ikg vcf file, I am getting:  
\>\>\> hl.init()  
19/09/09 12:49:34 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform… using builtin-java classes where applicable  
Using Spark’s default log4j profile: org/apache/spark/log4j-defaults.properties  
Setting default log level to “WARN”.  
To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel).  
Running on Apache Spark version 2.4.1  
SparkUI available at [http://dutillab:4040](http://dutillab:4040)  
Welcome to  
\_\_ \_\_ \<\>\_\_  
/ /\_/ /\_\_ \_\_/ /  
/ \_\_ / \_ `/ / / /_/ /_/\_,_/_/_/ version 0.2.21-f16fd64e0d77 LOGGING: writing to /shire/zillur/hail/hail-20190909-1249-0.2.21-f16fd64e0d77.log >>> from hail.plot import show >>> from pprint import pprint >>> hl.plot.output_notebook() In : In : hl.utils.get_1kg('data/') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'hl' is not defined In : In : In : hl.utils.get_1kg('data/') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'hl' is not defined In : In : In : hl.utils.get_1kg('data/') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'hl' is not defined In : In : import hail as hl In : from hail.plot import show In : from pprint import pprint In : hl.utils.get_1kg('data/') 2019-09-09 12:51:12 Hail: INFO: downloading 1KG VCF ... Source: https://storage.googleapis.com/hail-tutorial/1kg.vcf.bgz 2019-09-09 12:51:13 Hail: INFO: importing VCF and writing to matrix table... ERROR: dlopen("/tmp/libhail2217219008725920630.so"): /lib64/libstdc++.so.6: version`CXXABI\_1.3.8’ not found (required by /tmp/libhail2217219008725920630.so)  
FATAL: caught exception java.lang.UnsatisfiedLinkError: /tmp/libhail2217219008725920630.so: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/libhail2217219008725920630.so) java.lang.UnsatisfiedLinkError: /tmp/libhail2217219008725920630.so: /lib64/libstdc++.so.6: version`CXXABI\_1.3.8’ not found (required by /tmp/libhail2217219008725920630.so)  
at java.lang.ClassLoader$NativeLibrary.load(Native Method)  
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)  
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)  
at java.lang.Runtime.load0(Runtime.java:809)  
at java.lang.System.load(System.java:1086)  
at is.hail.nativecode.NativeCode.(NativeCode.java:30)  
at is.hail.nativecode.NativeBase.(NativeBase.scala:20)  
at is.hail.annotations.Region.(Region.scala:180)  
at is.hail.annotations.Region$.apply(Region.scala:16)  
at is.hail.annotations.Region$.scoped(Region.scala:18)  
at is.hail.expr.ir.ExecuteContext$.scoped(ExecuteContext.scala:7)  
at is.hail.backend.Backend.execute(Backend.scala:86)  
at is.hail.backend.Backend.executeJSON(Backend.scala:92)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)  
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)  
at py4j.Gateway.invoke(Gateway.java:282)  
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)  
at py4j.commands.CallCommand.execute(CallCommand.java:79)  
at py4j.GatewayConnection.run(GatewayConnection.java:238)  
at java.lang.Thread.run(Thread.java:748)  
ERROR:root:Exception while sending command.  
Traceback (most recent call last):  
File “/usr/lib/python3.6/site-packages/py4j/java\_gateway.py”, line 1159, in send\_command  
raise Py4JNetworkError(“Answer from Java side is empty”)  
py4j.protocol.Py4JNetworkError: Answer from Java side is empty

```
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 985, in send_command
    response = connection.send_command(command)
  File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1164, in send_command
    "Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/hail/utils/tutorial.py", line 73, in get_1kg
    hl.import_vcf(cluster_readable_vcf, min_partitions=16).write(matrix_table_path, overwrite=True)
  File "</usr/lib/python3.6/site-packages/decorator.py:decorator-gen-1020>", line 2, in write
  File "/usr/lib/python3.6/site-packages/hail/typecheck/check.py", line 585, in wrapper
    return __original_func(*args_, **kwargs_)
  File "/usr/lib/python3.6/site-packages/hail/matrixtable.py", line 2508, in write
    Env.backend().execute(MatrixWrite(self._mir, writer))
  File "/usr/lib/python3.6/site-packages/hail/backend/backend.py", line 108, in execute
    result = json.loads(Env.hc()._jhc.backend().executeJSON(self._to_java_ir(ir)))
  File "/usr/lib/python3.6/site-packages/py4j/java_gateway.py", line 1257, in __call__
    answer, self.gateway_client, self.target_id, self.name)
  File "/usr/lib/python3.6/site-packages/hail/utils/java.py", line 213, in deco
    return f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/py4j/protocol.py", line 336, in get_return_value
    format(target_id, ".", name))
py4j.protocol.PyIn : 
4JError: An error occurred while calling o50.executeJSON
```

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [September 9, 2019, 6:05pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/16 "2019-09-09T18:05:23Z")

</div>

A few things:

1. You should probably not run `sudo make install`, that gives too much privilege to our build system. If the user compiling hail is also running hail, `make install` is sufficient (it will use pip’s local install method). If you need to install hail for all users on the system, I recommend `make wheel && sudo make install`
2. What is the output of `g++ --version`? Hail’s error output is very clear: the `g++` you are using to build does not support `c++14`. This support was completed in GCC 5.0, so the `g++` below must not be version 5.0

```auto
g++ -march=corei7-avx -O3 -std=c++14 -Ilibsimdpp-2.1 -Wall -Wextra -fPIC -ggdb -fno-strict-aliasing -I../resources/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64/include/linux Upcalls.cpp -MG -M -MF build/Upcalls.d -MT build/Upcalls.o
g++: error: unrecognized command line option ‘-std=c++14’

```

1. The second message indicates that the standard library installed at `/lib64/libstdc++.so.6` uses an ABI before version 1.3.8. The following command will tell you what ABI versions are supported. That command needs to print `CXXABI_1.3.8` or hail will be unable to run correctly.

```auto
strings /usr/lib/libstdc++.so.6 | grep CXXABI

```

1. What is your compute environment? Do you have a Spark cluster?

---

<div class="post-metadata">

**Author:** ![zillurbmb51](https://avatars.discourse-cdn.com/v4/letter/z/aeb1de/32.png) [@zillurbmb51](https://discuss.hail.is/u/zillurbmb51)\
**Post date:** [September 9, 2019, 6:11pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/17 "2019-09-09T18:11:08Z")

</div>

Thank you.  
export LD\_LIBRARY\_PATH=/usr/local/lib64/:$LD\_LIBRARY\_PATH  
Solved the issue. Now I can run the GWAS tutorial. How can I check my compute environment and Spark? Also is there any guideline to explore my own vcf file? In the GWAS tutorial a sample phonetype (Caffeine consumption) was analyzed. How can I find other phenotypes from my vcf files. Best, Zillur

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [September 9, 2019, 6:14pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/18 "2019-09-09T18:14:46Z")

</div>

> [@zillurbmb51](#):
>
> How can I check my compute environment and Spark?

Have you installed Spark on several computers and connected those computers together? If no, then you don’t have a Spark cluster. In that case, you’re using hail in “local mode”, i.e. you’re using all the CPU cores on one machine.

> [@zillurbmb51](#):
>
> In the GWAS tutorial a sample phonetype (Caffeine consumption) was analyzed. How can I find other phenotypes from my vcf files.

VCF files do not contain phenotype information. Whoever gave you those VCF files must have phenotype information stored separately.

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [November 29, 2021, 2:44pm UTC](https://discuss.hail.is/t/py4j-protocol-py4jnetworkerror-answer-from-java-side-is-empty-hail-download-files/1069/19 "2021-11-29T14:44:05Z")

</div>

A post was split to a new topic: [While running a GWAS / linear regression I get: “Answer from Java side empty” and “undefined symbol: cblas\_dgemv”](https://discuss.hail.is/t/while-running-a-gwas-linear-regression-i-get-answer-from-java-side-empty-and-undefined-symbol-cblas-dgemv/2375)
