fluent / fluent/fluent-logger-scala

org.fluentd.logger.sender.RawSocketSender java.net.ConnectException: Connection refused

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
46
Forks
16
PR merge metrics
No merged PRs in 30d

Description

ScalaRawSocketSender -> open() shows exceptions with stacktrace when failed to connect to server. The behavior itself seems to have no problem. However, it is confusing in production and during tests. Observed "printStackTrace" message when server refused to connect. Could we suppress it please in production code 0.7.0 versionon-wards?

Reference Code:
def open(): Unit = {
try {
connect()
} catch {
case e: IOException =>
LOG.severe(s"Failed to connect fluentd: $server")
LOG.severe("Connection will be retried")
e.printStackTrace()
close()
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at ScalaRawSocketSender.open() and inspect how a failed connect is handled. Confirm the existing severe log messages and retry behavior, then remove the confusing stack-trace output while preserving the connection cleanup and retry flow. Verify the behavior using the project's available tests or a connection attempt against an unavailable server.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.