This message was deleted.
# troubleshooting
s
This message was deleted.
g
We did change the way logging is done in the default startup scripts, mainly in: https://github.com/apache/druid/pull/10147, https://github.com/apache/druid/pull/12570
Idea was to move the logs to rotated files so people's disks don't fill up
If you have your own logging setup you may want to provide your own log4j2.xml
j
not really own setup, just working from whats offered out of the box
g
ah, which box are you talking about?
I mean did you follow some particular documentation? Maybe we need to fix something
j
docker image 24.0.0 being used in helm chart
g
which helm chart?
I'm wondering if we can repro what you're seeing somehow and make some fixes accordingly
added in configVars the following
Copy code
DRUID_LOG4J: '<?xml version="1.0" encoding="UTF-8" ?><Configuration status="WARN"><Appenders><Console name="Console" target="SYSTEM_OUT"><PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/></Console></Appenders><Loggers><Root level="info"><AppenderRef ref="Console"/></Root><Logger name="org.apache.druid.jetty.RequestLog" additivity="false" level="DEBUG"><AppenderRef ref="Console"/></Logger></Loggers></Configuration>'
and getting logs in k9s
s
Does that mean that it is writing to <service>.stdout.log instead of ${druid.node.type}.log ? I've been digging through the
dockerfile
and it seems to me that with default values.yaml it is not defining the setting
druid.node.type
by default (which should probably change) but given this line in the dockerfile's entrypoint script
druid.sh
, I think you can update your values.yaml for the `helm install`: As a workaround, I think if you add the config item to each service section, you should get the correct naming for each log as in:
Copy code
historical:
  config:
    druid_node_type: historical
j
I think thats what I was missing
druid_node_type
however, if do that and remove
DRUID_LOG4J
, would k9s pick up logs and will also datadog collect logs?
s
I'm not very familiar with k9s or datadog, but that would return the default log file name in each service to: historical.log, broker.log, etc. which is perhaps what the k9s/datadog setup is expecting?
j
with the current
DRUID_LOG4J
I see logs in k9s, but I can try adding the node type and see
s
If your workaround is working, I wouldn't mess with it. This is just a different workaround. I think the dockerfile and or helm chart need to consider this.
j
this is a testing env/cluster so no issues with playing and check
changed the values in coordinator config :
druid_node_type: 'coordinator',
but logs in the dir keeps showing up as
${sys:druid.node.type}.log
s
I think there is one advantage to reverting back to default log4j2.xml, in that it uses the rotating logs approach. Can you. share the whole coordinator section of your values.yaml?
j
I am using pulumi to configure the helm values:
Copy code
coordinator: {
                    replicaCount: 3,
                    config: {
                        druid_node_type: 'coordinator',
                        DRUID_XMX: '8200m',
                        DRUID_XMS: '8200m',
                        druid_coordinator_period: 'PT60S',
                        druid_coordinator_startDelay: 'PT90S',
                        druid_coordinator_loadqueuepeon_type: 'http',
                        druid_coordinator_balancer_strategy: 'cachingCost',
                        druid_coordinator_kill_pendingSegments_on: 'true',
                        druid_coordinator_loadqueuepeon_http_batchSize: '8'
                    }
                },
in runtime.properties I have
druid.node.type=coordinator
so values are applied
s
that is weird...
So, the difference in execution single server setup and dockerfile paths is that in the latter, we are relying on runtime.properties to define this property and
druid.sh
is what writes it out to that file and in the former it is defined as part of the
java
startup command as a
-D
parameter. I'm wondering whether the runtime.properties files is begin used... can you share the section of the coordinator log where it outputs the system properties, in a standalone example I see this:
Copy code
2022-09-19T16:17:22,191 INFO [main] org.apache.druid.cli.CliCoordinator - * druid.monitoring.monitors: ["org.apache.druid.java.util.metrics.JvmMonitor"]
2022-09-19T16:17:22,191 INFO [main] org.apache.druid.cli.CliCoordinator - * druid.node.type: coordinator-overlord
2022-09-19T16:17:22,191 INFO [main] org.apache.druid.cli.CliCoordinator - * druid.plaintextPort: 8081
Do you see
druid.node.type
among them?
j
Need to check that again but given that I got the other issue fixed I need to test other things first