[ZBX-14585] Java Gateway error logging usability Created: 2018 Jul 09  Updated: 2018 Oct 08  Resolved: 2018 Oct 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Java gateway (J)
Affects Version/s: 3.4.11, 4.0.0alpha8
Fix Version/s: 4.0.1rc1, 4.2.0alpha1, 4.2 (plan)

Type: Problem report Priority: Major
Reporter: Alexey Pustovalov Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 1
Labels: java, javagateway, usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team A
Sprint: Sprint 38, Sprint 39, Sprint 40, Sprint 41, Sprint 42, Sprint 43, Sprint 44
Story Points: 0.5

 Description   

Currently we write into the log file something like that:

2018-06-08 18:18:18.983 [pool-1-thread-5] WARN  com.zabbix.gateway.SocketProcessor - error processing request: Invalid username or password
2018-06-08 18:18:20.986 [pool-1-thread-1] WARN  com.zabbix.gateway.SocketProcessor - error processing request: Connection refused (Connection refused)

It is not useful to understand what exactly happened and where. It is better to add IP/DNS and item key information to the error log messages



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Aug 23 ]

I suggest adding jmx endpoint to error message, for example

Request:

{"request":"java gateway jmx","username":"test","password":"test","jmx_endpoint":"service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi","keys":["jmx[\"java.lang:type=Memory\",\"HeapMemoryUsage.used\"]"]}

Warning message if connection refused.

2018-08-24 16:31:36.841 [pool-1-thread-1] WARN  com.zabbix.gateway.SocketProcessor - error processing request from '/127.0.0.1': Connection refused (Connection refused): service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi

2018-08-24 16:32:37.389 [pool-1-thread-2] WARN  com.zabbix.gateway.SocketProcessor - error processing request from '/127.0.0.1': connection timed out: service:jmx:rmi:///jndi/rmi://128.0.0.1:12345/jmxrmi

2018-08-24 16:34:17.703 [pool-1-thread-4] WARN  com.zabbix.gateway.SocketProcessor - error processing request from '/127.0.0.1': Invalid username or password: service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi

Frontend:

connection timed out: service:jmx:rmi:///jndi/rmi://128.0.0.1:12345/jmxrmi

Connection refused (Connection refused): service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi

Authentication failed! Credentials required: service:jmx:rmi:///jndi/rmi://127.0.0.1:12345/jmxrmi

Before it was

2018-08-24 16:38:34.874 [pool-1-thread-2] WARN  com.zabbix.gateway.SocketProcessor - error processing request: Connection refused (Connection refused)

2018-08-24 16:38:10.417 [pool-1-thread-1] WARN  com.zabbix.gateway.SocketProcessor - error processing request: Invalid username or password

2018-08-24 16:38:58.623 [pool-1-thread-3] WARN  com.zabbix.gateway.SocketProcessor - error processing request: connection timed out: service:jmx:rmi:///jndi/rmi://128.0.0.1:12345/jmxrmi

Frontend

Connection refused (Connection refused)

Invalid username or password

connection timed out: service:jmx:rmi:///jndi/rmi://128.0.0.1:12345/jmxrmi

Idea is that you need to know JMX endpoint that you have wrong credentials to or connectivity issues. Especially if you have more than one endpoint it will be now easier to understand which one does not work.

Comment by Vladislavs Sokurenko [ 2018 Aug 24 ]

Fixed in development branch:
svn://svn.zabbix.com/branches/dev/ZBX-14585-2

Comment by Vjaceslavs Bogdanovs [ 2018 Aug 28 ]

(1) [J] Why error message "connection timed out" left "as is" without capital first letter? It produces wrong message in Frontend.

vso decided not to change that but to me it also feels strange as errors are usually capitalized in frontend, so should fix, RESOLVED in r84496

vjaceslavs Thanks! CLOSED

Comment by bunkzilla [ 2018 Sep 09 ]

I just started playing around with using this functionality.   I'm glad this is being addressed!

Comment by bunkzilla [ 2018 Sep 14 ]

can we get this fixed in 3.4?    Thank you!

Comment by richlv [ 2018 Sep 14 ]

bunkzilla, unlikely, as 3.4 is to be EOLed this year

Comment by bunkzilla [ 2018 Sep 14 ]

That makes sense, as I'm in the process of rolling out 3.4.13.     /sarcasm

 

Comment by bunkzilla [ 2018 Sep 14 ]

If to be EOLed this year, why does it still show up as good option on the https://www.zabbix.com/download page? 

 

Comment by richlv [ 2018 Sep 14 ]

You might want to see https://www.zabbix.com/life_cycle_and_release_policy - but in general that's getting offtopic for this issue, please consider using other communication channels like IRC to continue this discussion.

Comment by bunkzilla [ 2018 Sep 14 ]

The chart doesn't seem to have the right dates on it.    based on the column headers of 3 years (end of support)   and 5 years...

and zabbix 4.0.0 is not released yet..  so....

 

from this page: https://www.zabbix.com/documentation/4.0/manual/introduction/whatsnew400

Zabbix 4.0.0 is not released yet.
 

 

Comment by Vladislavs Sokurenko [ 2018 Oct 03 ]

Fixed in:

  • pre-4.0.1rc1 r85393
  • pre-4.2.0alpha1 (trunk) r85394
Generated at Thu Mar 28 17:45:18 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.