If fluentd.enabled=true we automatically set -Datlassian.logging.cloud.enabled=true in jvm configmap. This, however, has an undesirable effect if FluentD in a sidecar runs in a non-server mode, for example, type @tail:
As a result, Confluence and Jira will try to push logs to localhost:9880 which is the default FluentD port, and logs will be cluttered with networking errors because Confluence/Jira will try to push logs to 9880 port on localhost but nothing listens on that port. This happens because of the following config in log4j.properties:
# This appender will post logs events in JSON format to a fluentd service.
# It is inactive by default, and activation requires setting the "atlassian.logging.cloud.enabled" system property to "true"
log4j.appender.fluentdAppender=com.atlassian.logging.log4j.appender.FluentdAppender
# This is currently hard-wired, since FluentdAppender currently doesn't allow it to be configured via system property.
log4j.appender.fluentdAppender.FluentdEndpoint=http://localhost:9880/
New Behavior
This PR suggests that -Datlassian.logging.cloud.enabled is set to true only if the default fluentd config is used. Users with custom FluentD config running it in a server mode, type @http, e.g.:
<source>
@type http
port {{ .Values.fluentd.httpPort }}
bind 0.0.0.0
</source>
will have to add -Datlassian.logging.cloud.enabled=true to ${product}.additionalJvmArgs in Helm values file.
Checklist
[x] I have added unit tests
[x] I have applied the change to all applicable products
Current behavior
If fluentd.enabled=true we automatically set
-Datlassian.logging.cloud.enabled=true
in jvm configmap. This, however, has an undesirable effect if FluentD in a sidecar runs in a non-server mode, for example, type@tail
:As a result, Confluence and Jira will try to push logs to
localhost:9880
which is the default FluentD port, and logs will be cluttered with networking errors because Confluence/Jira will try to push logs to 9880 port on localhost but nothing listens on that port. This happens because of the following config in log4j.properties:New Behavior
This PR suggests that
-Datlassian.logging.cloud.enabled
is set to true only if the default fluentd config is used. Users with custom FluentD config running it in a server mode, type@http
, e.g.:will have to add
-Datlassian.logging.cloud.enabled=true
to${product}.additionalJvmArgs
in Helm values file.Checklist
e2e
label)