/opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
xenhaxumus
Posts: 10
Joined: Fri Mar 09, 2018 2:51 am

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby xenhaxumus » Fri Mar 01, 2019 11:49 pm

I want to comment on something, reviewing the contents, when executing this command: grep -i java .bashrc

These lines do not have them in my file
which java
common/lib/jvm/java/bin/java
type java
java is /opt/zimbra/common/lib/jvm/java/bin/java


when executing this command: env |grep -i java
I have these other lines of more
DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
JAVA_HOME=/opt/zimbra/common/lib/jvm/java
J2SDKDIR=/usr/lib/jvm/java-8-oracle
J2REDIR=/usr/lib/jvm/java-8-oracle/jre


java -version
openjdk version "1.8.0_172-zimbra"
OpenJDK Runtime Environment (build 1.8.0_172-zimbra-b01)
OpenJDK 64-Bit Server VM (build 25.172-b01, mixed mode)

Return to the backup of zmjava and execute the command again: bash -x $(which zmprov) exit
+ source /opt/zimbra/bin/zmshutil
++ dirname /opt/zimbra/bin/zmprov
+ exec /opt/zimbra/bin/zmjava com.zimbra.cs.account.ProvUtil exit
/opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

and
bash -x /opt/zimbra/bin/zmjava com.zimbra.cs.account.ProvUtil exit
++ dirname /opt/zimbra/bin/zmjava
+ source /opt/zimbra/bin/zmshutil
+ zmsetvars -f
+ '[' x-f = x-f ']'
+ shift
+ zmlocalconfig=/opt/zimbra/bin/zmlocalconfig
+ '[' '!' -x /opt/zimbra/bin/zmlocalconfig ']'
+ export zmsetvars=true
+ zmsetvars=true
+ '[' -d /jre ']'
+ JRE_EXT_DIR=/lib/ext
+ '[' -f .hotspot_compiler ']'
+ case "`uname`" in
++ uname
+ PATHSEP=:
+ ZIMBRA_EXTENSIONS='backup clamscanner network zimbra-license zimbrahsm zimbrasync twofactorauth com_zimbra_ssdb_ephemeral_store'
+ ZIMBRA_EXT_DIR=/opt/zimbra/lib/ext-common
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/backup ']'
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/clamscanner ']'
+ ZIMBRA_EXT_DIR=/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/network ']'
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/zimbra-license ']'
+ ZIMBRA_EXT_DIR=/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/zimbra-license
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/zimbrahsm ']'
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/zimbrasync ']'
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/twofactorauth ']'
+ ZIMBRA_EXT_DIR=/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/zimbra-license:/opt/zimbra/lib/ext/twofactorauth
+ for i in '$ZIMBRA_EXTENSIONS'
+ '[' -d /opt/zimbra/lib/ext/com_zimbra_ssdb_ephemeral_store ']'
+ ZIMBRA_EXT_DIR=/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/zimbra-license:/opt/zimbra/lib/ext/twofactorauth:/opt/zimbra/lib/ext/com_zimbra_ssdb_ephemeral_store
+ java_options=-XX:ErrorFile=/opt/zimbra/log
+ '[' x = x ']'
+ zimbra_zmjava_java_library_path=/opt/zimbra/lib
+ '[' x = x ']'
+ zimbra_zmjava_java_ext_dirs=/lib/ext:/opt/zimbra/lib/jars:/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/zimbra-license:/opt/zimbra/lib/ext/twofactorauth:/opt/zimbra/lib/ext/com_zimbra_ssdb_ephemeral_store
+ exec /bin/java -XX:ErrorFile=/opt/zimbra/log -client -Dzimbra.home=/opt/zimbra -Djava.library.path=/opt/zimbra/lib -Djava.ext.dirs=/lib/ext:/opt/zimbra/lib/jars:/opt/zimbra/lib/ext-common:/opt/zimbra/lib/ext/clamscanner:/opt/zimbra/lib/ext/zimbra-license:/opt/zimbra/lib/ext/twofactorauth:/opt/zimbra/lib/ext/com_zimbra_ssdb_ephemeral_store com.zimbra.cs.account.ProvUtil exit
/opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

https://computingforgeeks.com/fix-zimbra-zclient-io_error-connection-refused-server-localhost/
In this url says something of the previous error modify it from false to true
zimbra_zmprov_default_to_ldap = false change it to true
zimbra_zmprov_default_to_ldap = true

My question is the following one I must modify some of these archives: .bashrc, zmjava, localconfig.xml, zmlocalconfig, zmutils or others or some other directory?


xenhaxumus
Posts: 10
Joined: Fri Mar 09, 2018 2:51 am

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby xenhaxumus » Sat Mar 02, 2019 12:14 am

/usr/lib/jvm
default-java java-1.8.0-openjdk-amd64 java-8-openjdk-amd64 java-8-oracle
Rony
Posts: 12
Joined: Fri Jan 27, 2017 3:50 pm

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby Rony » Sun Mar 24, 2019 3:39 pm

HI,

Configuration is correct.
I have the same issue with zmprov, I used instead zmprov -l ..... and it worked
Try it.
xenhaxumus
Posts: 10
Joined: Fri Mar 09, 2018 2:51 am

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby xenhaxumus » Mon Apr 08, 2019 2:03 pm

Thanks for your answer, I already tried

For example with this command:

zimbra@:~$ zmprov -l ma count@xxx zimbraAccountStatus active
/opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory
User avatar
DualBoot
Elite member
Elite member
Posts: 1073
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby DualBoot » Thu Apr 11, 2019 9:03 pm

Hello,

why did you install Oracle JVM on your server ? You should purge this and try to test again the zmprov command.

Regards,
ashmuh
Posts: 1
Joined: Fri Nov 08, 2019 9:37 am

Re: /opt/zimbra/bin/zmjava: line 56: /bin/java: No such file or directory

Postby ashmuh » Fri Nov 08, 2019 9:40 am

you might be running the command as some other user. You should be running the command as zimbra user .Otherwise export the variable

Return to “Administrators”

Who is online

Users browsing this forum: MSN [Bot] and 9 guests