Open JB-data opened 4 years ago
I just found how to fix this:
in /cloud-local/hbase-1.3.1/conf/hbase-env.sh
add the path to JAVA_HOME for java 8:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
then run
bin/cloud-local init
again and if passed the check for JAVA_HOME .
When I run the
bin/cloud-local.sh init
script , I am asked to login to my own machine (which serves as the hbase master) and provide the password when he complains about JAVA_HOME not set:On my machine(the one used as hbase master), a proper version of java is installed and JAVA_HOME is not empty:
so it is not clear to me why I get this error.
The error comes from /cloud-local/hbase-1.3.1/bin/hbase-config.sh where there is a check if JAVA_HOME is defined. I believe that in cloud-local/hbase-1.3.1/conf/hbase-env.sh folder JAVA_HOME can be set (like described here: https://hbase.apache.org/book.html#quickstart in 2.2.3), but this file is overwritten every time you run the cloud-local.sh init command, so I dont see how I can specify this. If I copy the exact same part of the script where it fails, and run it directly on my machine, it does not fail as JAVA_HOME is indeed recognized.
Any clue how I can specify JAVA_HOME variable correctly? Thanks!!
Extra info: I believe these are all the scripts that call each other: 1)script to initiate the cloud environment on local node /cloud-local/bincloud-local.sh init --> 2)calls script to start hbase /cloud-local/hbase-1.3.1/bin/start-hbase.sh --> 3)calls script to start daemon: "$bin"/hbase-daemon.sh --config "${HBASE_CONF_DIR}" start master $@ 4)daemon is started: ~/Documents/cloud-local/hbase-1.3.1/bin/hbase-daemon.sh 5)From /cloud-local/hbase-1.3.1/bin/hbase-config.sh there is a check if JAVA_HOME is defined that fails .