[ZBX-18561] Jar file missing in package zabbix-java-gateway_5.0.5-1+buster_all.deb Created: 2020 Oct 27  Updated: 2024 Apr 10  Resolved: 2020 Nov 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Packages (C)
Affects Version/s: 5.0.5rc1, 5.0.5
Fix Version/s: 5.0.5

Type: Problem report Priority: Major
Reporter: Benoît Locher Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 3
Labels: trivial
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian Buster 10.6
OpenJDK 11.0.9 2020-10-20
Using officiel Debian packages
Zabbix Server 5.0.5
Zabbix Agent 5.0.5


Issue Links:
Duplicate
is duplicated by ZBX-18560 zabbix-java-gateway not work after up... Closed
Team: Team I
Sprint: Sprint 69 (Oct 2020), Sprint 70 (Nov 2020)
Story Points: 0.5

 Description   

Steps to reproduce:

  1. Upgrade java_gateway to v5.0.5 using official packages

Result:

# apt dist-upgrade
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Calculating upgrade... Done
 The following packages will be upgraded:
 {{ zabbix-java-gateway}}
 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
 Need to get 0 B/840 kB of archives.
 After this operation, 31.7 kB disk space will be freed.
 Do you want to continue? [Y/n]
 Reading changelogs... Done
 (Reading database ... 71982 files and directories currently installed.)
 Preparing to unpack .../zabbix-java-gateway_1%3a5.0.5-1+buster_all.deb ...
 Unpacking zabbix-java-gateway (1:5.0.5-1+buster) over (1:5.0.4-1+buster) ...
 Setting up zabbix-java-gateway (1:5.0.5-1+buster) ...
 [zabbix-java-gateway.conf:1] Line references path below legacy directory /var/run/, updating /var/run/zabbix → /run/zabbix; please update the tmpfiles.d/ drop-in file accordingly.
 Job for zabbix-java-gateway.service failed because the control process exited with error code.
 See "systemctl status zabbix-java-gateway.service" and "journalctl -xe" for details.
 invoke-rc.d: initscript zabbix-java-gateway, action "restart" failed.
 ● zabbix-java-gateway.service - Zabbix Java Gateway
 {{ Loaded: loaded (/lib/systemd/system/zabbix-java-gateway.service; enabled; vendor preset: enabled)}}
 {{ Active: failed (Result: exit-code) since Tue 2020-10-27 08:32:48 CET; 8ms ago}}
 {{ Process: 101831 ExecStart=/usr/sbin/zabbix_java_gateway (code=exited, status=1/FAILURE)}}Oct 27 08:32:48 frscydgbbzbx01 systemd[1]: Starting Zabbix Java Gateway...
 Oct 27 08:32:48 frscydgbbzbx01 zabbix_java_gateway[101831]: Error: Could not find or load main class com.zabbix.gateway.JavaGateway
 Oct 27 08:32:48 frscydgbbzbx01 zabbix_java_gateway[101831]: Caused by: java.lang.ClassNotFoundException: com.zabbix.gateway.JavaGateway
 Oct 27 08:32:48 frscydgbbzbx01 zabbix_java_gateway[101831]: Zabbix Java Gateway did not start
 Oct 27 08:32:48 frscydgbbzbx01 systemd[1]: zabbix-java-gateway.service: Control process exited, code=exited, status=1/FAILURE
 Oct 27 08:32:48 frscydgbbzbx01 systemd[1]: zabbix-java-gateway.service: Failed with result 'exit-code'.
 Oct 27 08:32:48 frscydgbbzbx01 systemd[1]: Failed to start Zabbix Java Gateway.
 dpkg: error processing package zabbix-java-gateway (--configure):
 {{ installed zabbix-java-gateway package post-installation script subprocess returned error exit status 1}}
 Processing triggers for systemd (241-7~deb10u4) ...
 Errors were encountered while processing:
 {{ zabbix-java-gateway}}
 E: Sub-process /usr/bin/dpkg returned an error code (1)

Expected:
Java gateway process should be running

 

It seeme the jar file for Zabbix Java gateway is missing from deb package (comparing files from 5.0.4 and 5.0.5) :

dpkg -c zabbix-java-gateway_5.0.4-1+buster_all.deb | grep '/usr/share/zabbix-java-gateway'
 drwxr-xr-x root/root 0 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/
 drwxr-xr-x root/root 0 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/bin/
 rw-rr- root/root 33005 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/bin/zabbix-java-gateway-5.0.4.jar
 drwxr-xr-x root/root 0 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/
 rw-rr- root/root 665 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/README
 rw-rr- root/root 17677 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/android-json-4.3_r3.1.jar
 rw-rr- root/root 243745 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/logback-classic-0.9.27.jar
 rw-rr- root/root 309017 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/logback-core-0.9.27.jar
 rw-rr- root/root 25491 2020-09-28 09:00 ./usr/share/zabbix-java-gateway/lib/slf4j-api-1.6.1.jar
# dpkg -c zabbix-java-gateway_5.0.5-1+buster_all.deb | grep '/usr/share/zabbix-java-gateway'
 drwxr-xr-x root/root 0 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/
 drwxr-xr-x root/root 0 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/bin/
 drwxr-xr-x root/root 0 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/lib/
 rw-rr- root/root 665 2020-05-10 19:36 ./usr/share/zabbix-java-gateway/lib/README
 rw-rr- root/root 17677 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/lib/android-json-4.3_r3.1.jar
 rw-rr- root/root 243745 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/lib/logback-classic-0.9.27.jar
 rw-rr- root/root 309017 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/lib/logback-core-0.9.27.jar
 rw-rr- root/root 25491 2020-10-26 09:00 ./usr/share/zabbix-java-gateway/lib/slf4j-api-1.6.1.jar


 Comments   
Comment by Werner Dijkerman [ 2020 Oct 27 ]

2 PR's on our Ansible Zabbix Collection are failing because of this issue. https://github.com/ansible-collections/community.zabbix/pulls

Comment by Slash [ 2020 Oct 27 ]

Can someone bump this issue? 5.0.5 is released with this problem!

Comment by Slash [ 2020 Oct 27 ]

To anybody that has this issue, do this:

wget https://cdn.zabbix.com/zabbix/sources/stable/5.0/zabbix-5.0.5.tar.gz
tar xzf zabbix-5.0.5.tar.gz
cd zabbix-5.0.5
./configure --enable-java

You will then find the missing jar at ./src/zabbix_java/bin/zabbix-java-gateway-5.0.5.jar. You need to put it at this location on the server with the java gateway: /usr/share/zabbix-java-gateway/lib.
Then since apt have failed, just run apt install zabbix-java-gateway and it should fixes the issue and start the java gateway.

Comment by Benoît Locher [ 2020 Oct 28 ]

While waiting for an updated package, the previous version can also be installed manually :

wget "http://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix/zabbix-java-gateway_5.0.4-1+buster_all.deb"
dpkg -i zabbix-java-gateway_5.0.4-1+buster_all.deb
Comment by Werner Dijkerman [ 2020 Oct 28 ]

I do understand that using/taking/installing an older version will solve this issue, but with respect to Ansible (And probably other related installation/configuration tools out there) it probably makes more sense to remove the 5.0.5. from the pools so the 5.0.4 is the latest available for the Java Gateway. We don't have control on the exact version to install on any host (Not to even mention that when some does an apt upgrade on a host that it is also updated). And if so, it would introduce a workaround that only exist for a small duration of time.

Comment by Jurijs Klopovskis [ 2020 Oct 28 ]

Build with a fix is in progress.
Expect to have an update within a few hours.

Comment by Jurijs Klopovskis [ 2020 Oct 28 ]

Released 5.0.5-2 packages for debian and ubuntu.
Please update!

Comment by Werner Dijkerman [ 2020 Oct 28 ]

Yes, it worked! Thanks!

Comment by Benoît Locher [ 2020 Oct 28 ]

New packages installed, problem fixed.

Thanks for the quick update !

Generated at Mon Jun 30 08:44:17 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.