Could not send GELF message: null

Hi Team,
I am trying to configure log from tomcat setup to send to Graylog server. But getting the following error. But in the same server i have one more i am able to get logs from there.

java.util.logging.ErrorManager: 5: Could not send GELF message: null
java.lang.NullPointerException
at biz.paluch.logging.gelf.GelfUtil.getSimpleClassName(GelfUtil.java:67)
at biz.paluch.logging.gelf.jul.JulLogEvent.getValue(JulLogEvent.java:156)
at biz.paluch.logging.gelf.jul.JulLogEvent.getValues(JulLogEvent.java:138)
at

Reference Link : https://paluch.biz/blog/105-integrating-logstash-with-tomcat-7.html
Tomcat version : tomcat-7.0.23
jar files : commons-pool2-2.0.jar
jedis-2.5.1.jar
json-simple-1.1.jar
logstash-gelf-1.4.2.jar

Server side iptables are stopped.
Logging.properties File entries

biz.paluch.logging.gelf.jul.GelfLogHandler.host=udp:graylog.hostname.net
biz.paluch.logging.gelf.jul.GelfLogHandler.port=12201
biz.paluch.logging.gelf.jul.GelfLogHandler.level=INFO

Thanks,
Raghu Reddy

The NullPointerException looks like a bug in the logging library.

Try filing a bug report at https://github.com/mp911de/logstash-gelf/issues.

Thanks for the update.

Below is the scenario, Both the tomcat version are same.

We have two servers server1 and server2 and in each server there are two Application App1 and App2.
We are able to get logs from both applicatin logs of Server1. But for server2 we are not able to get logs from Application2.

image

Can you please help with this, same library is working on first server.

Or is there any other way to get logs to graylog server.

Thanks,
Raghu Reddy

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.