py4j.protocol.Py4JNetworkError: Answer from Java side is empty

#1

Warm greetings to Hail community.

gwas = hl.linear_regression_rows(y=mt.pheno.CaffeineConsumption,
x=mt.GT.n_alt_alleles(),
covariates=[1.0])

While I was running the above command in jupyter notebook in centos 7 , I got the following error:-

**019-04-29 11:38:35 Hail: INFO: linear_regression_rows: running on 250 samples for 1 response variable y,
with input variable x, and 1 additional covariate…
ERROR:root:Exception while sending command.
Traceback (most recent call last):
File “/home/aby/spark/python/lib/py4j-0.10.7-src.zip/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 “/home/aby/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py”, line 985, in send_command
response = connection.send_command(command)
File “/home/aby/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py”, line 1164, in send_command
“Error while receiving”, e, proto.ERROR_ON_RECEIVE)
4j.protocol.Py4JNetworkError: Error while receiving

Initially I thought this might be because of Java home is not available, but I checked and set my JAVA_HOME variable , still I am getting the same error.

Below is my JAVA_HOME variable’s Output.

**[root@localhost ~]# echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/
**

Kindly help me in resolving the issue.

#2

what is the full version (with git SHA) of Hail you’re using?

#3

import hail
import hail as hl
hl.init()
19/05/01 10:33:12 WARN Utils: Your hostname, localhost.localdomain resolves to a loopback address: 127.0.0.1; using 10.149.240.149 instead (on interface wlp8s0)
19/05/01 10:33:12 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
19/05/01 10:33:13 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://10.149.240.149:4040
Welcome to
__ __ <>__
/ // /__ __/ /
/ __ / _ `/ / /
/
/ //_,/// version 0.2.12-2571917c39c6
LOGGING: writing to /root/hail-20190501-1033-0.2.12-2571917c39c6.log

The hail version is 0.2.12-2571917c39c6.

#4

Is there any java stack trace?

#5

I am attaching the backend terminal output of jupyter notebook apart from this I didnt find any stack trace for java.

[I 14:26:23.396 NotebookApp] 302 GET /?token=20c3fe169bcd06b8b53b7da8a5f35092f8c03297a929411b (::1) 0.74ms
[I 14:26:30.069 NotebookApp] Kernel started: d75dedfd-1718-44d9-be5c-4cde788f528e
[I 14:26:32.806 NotebookApp] Adapting to protocol v5.1 for kernel d75dedfd-1718-44d9-be5c-4cde788f528e
19/05/03 14:26:44 WARN Utils: Your hostname, localhost.localdomain resolves to a loopback address: 127.0.0.1; using 10.149.240.149 instead (on interface wlp8s0)
19/05/03 14:26:44 WARN Utils: Set SPARK_LOCAL_IP if you need to bind to another address
19/05/03 14:26:46 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).
[Stage 32:> (0 + 2) / 2]/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre//bin/java: symbol lookup error: /tmp/jniloader8933272701730098438netlib-native_system-linux-x86_64.so: undefined symbol: cblas_dgemm
[I 14:28:29.992 NotebookApp] Saving file at /gwas.ipynb

#6

I think you need to install openblas