Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default env $JAVA didn't work #22

Closed
xiaoping378 opened this issue Jan 11, 2016 · 12 comments
Closed

default env $JAVA didn't work #22

xiaoping378 opened this issue Jan 11, 2016 · 12 comments
Labels

Comments

@xiaoping378
Copy link

Default environment JAVA is not work....

[root@zabbix-server /]# /usr/local/sbin/zabbix_java/startup.sh
/usr/local/sbin/zabbix_java/startup.sh: line 62: /usr/lib/jvm/java-1.8.0-openjdk/bin/java: No such file or directory
Zabbix Java Gateway did not start

[root@zabbix-server /]# export JAVA=/usr/bin/java
[root@zabbix-server /]# 
[root@zabbix-server /]# 
[root@zabbix-server /]# /usr/local/sbin/zabbix_java/startup.sh
[root@zabbix-server /]# 

[root@zabbix-server /]#

@jangaraj
Copy link
Member

Which Docker image version?

zabbix_server --version

@xiaoping378
Copy link
Author

[root@zabbix-server /]# zabbix_server --version
Zabbix server v2.4.6 (2015-12-21) (revision {ZABBIX_REVISION}) (10 August 2015)
Compilation time: Dec 21 2015 23:49:55

@jangaraj
Copy link
Member

Good, it's the latest image. I'll check.

@jangaraj jangaraj added the bug label Jan 11, 2016
@jangaraj
Copy link
Member

/usr/bin/java will be used

[root@8982201fbbe5 /]# ls -lah /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 10 11:58 /usr/bin/java -> /etc/alternatives/java
[root@8982201fbbe5 /]# ls -lah /etc/alternatives/java
lrwxrwxrwx 1 root root 70 Jan 10 11:58 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/jre/bin/java

@xiaoping378
Copy link
Author

yes, the fix is working well.
But ..
Default the JAVA_HOME should point to the directory containing a bin/java.

@jangaraj
Copy link
Member

Could you check docker image monitoringartist/zabbix-2.4 (only latest 2.4.7 is available there) and propose correct settings for java please? This image will be new community Zabbix image soon (PR #21).

@xiaoping378
Copy link
Author

my suggestions:

JAVA_HOME=/usr/lib/jvm/jre
JAVA=$JAVA_HOME/bin

JAVA=$JAVA_HOME/bin
sorry, the env java is a wrong path.

@jangaraj
Copy link
Member

Thank you.

  JAVA_HOME=/usr/lib/jvm/jre \
  JAVA=/usr/lib/jvm/jre/bin \

Please retest image monitoringartist/zabbix-2.4

@xiaoping378
Copy link
Author

Sorry, java is not OK
JAVA=/usr/lib/jvm/jre/bin

Both of below are OK.

  • JAVA=$JAVA_HOME/bin/java
  • JAVA=/usr/bin/java

@jangaraj
Copy link
Member

No problem.

JAVA_HOME=/usr/lib/jvm/jre \
JAVA=/usr/bin/java \

Please recheck monitoringartist/zabbix-2.4.

@xiaoping378
Copy link
Author

OK, work well

@jangaraj
Copy link
Member

Fixed in new Docker image zabbix/zabbix-2.4 (zabbix/zabbix-3.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants