NullPointerException when the Fluentd server is down
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- java
- Domain
- backend, observability-sre
Research direction
Start in RawSocketSender.java, especially flushBuffer around lines 152 and 158, and trace the server-down path that reaches the socket access. Reproduce the failure with the Fluentd server unavailable; done means that path no longer throws a NullPointerException and reports the send failure instead.
Written by the indexing model from the issue text.
Description
When We try to use the Fluentd java logger it throws the fellowing NullPointerException when the Fluentd server is down:
An exception occurred processing Appender fluentd java.lang.NullPointerException
at org.fluentd.logger.sender.RawSocketSender.flushBuffer(RawSocketSender.java:158)
at org.fluentd.logger.sender.RawSocketSender.send(RawSocketSender.java:168)
at org.fluentd.logger.sender.RawSocketSender.emit(RawSocketSender.java:149)
at org.fluentd.logger.sender.RawSocketSender.emit(RawSocketSender.java:131)
at org.fluentd.logger.sender.RawSocketSender.emit(RawSocketSender.java:126)
at org.fluentd.logger.FluentLogger.log(FluentLogger.java:101)
at org.fluentd.logger.FluentLogger.log(FluentLogger.java:86)
The source of the problem is that when the Fluentd server is down the socket in the RawSocketSender object is null so the call to the method RawSocketSender.flushBuffer#Line:152 throws the null pointer exception when executing the fellowing instruction (RawSocketSender.flushBuffer#Line:158):
LOG.error("Cannot send logs to " + socket.getInetAddress().toString());
- Dominant language
- Java
- Stars
- 210
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluent/fluent-logger-java
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
fluent/fluent-logger-java#100 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
fluent/fluent-logger-java#99 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
fluent/fluent-logger-java#98 · 1 comment ·
-
Null Pointer Exception with slf4j-log4j12-1.7.30 (Fluent-logger incompatible with the new version) Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
fluent/fluent-logger-java#89 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
fluent/fluent-logger-java#88 · 1 comment ·
All issues in fluent/fluent-logger-java
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/flink-agents#1152 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jenkinsci/blueocean-plugin#5417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·