Hi Wei,

The agent still logs expected lines to disk when removing these:
 jcl-over-slf4j-1.7.5.jar
jul-to-slf4j-1.7.5.jar
log4j-over-slf4j-1.7.5.jar
slf4j-api-1.7.5.jar 

Met vriendelijke groet / Kind regards,

Ruben Bosch
CLDIN

> On 20 Jun 2023, at 12:46, Wei ZHOU <ustcweiz...@gmail.com> wrote:
> 
> Hi Ruben,
> 
> Thanks for the update.
> 
> I am wondering if the slf4j jars can be removed. Can you test it if
> possible ?
> 
> -Wei
> 
> On Tue, 20 Jun 2023 at 11:47, Ruben Bosch <ruben.bo...@cldin.eu> wrote:
> 
>> Just an update: we found it has to do with log4j-over-slf4j being loaded
>> before reload4j. When we update CLASSPATH in /etc/default/cloudstack-agent
>> to load reload4j first, it seems to work fine.
>> 
>> Met vriendelijke groet / Kind regards,
>> 
>> Ruben Bosch
>> CLDIN
>> 
>>> On 19 Jun 2023, at 17:18, Ruben Bosch <ruben.bo...@cldin.eu> wrote:
>>> 
>>> Hi guys,
>>> 
>>> I'm checking in to see if anyone here has seen this behaviour before:
>> when installing a fresh kvm hypervisor (Ubuntu 20.04) using CS version
>> 4.16.1 it's a roll of the dice whether agent.log will be populated or does
>> not get created at all and fails on a class loading failure. This does not
>> happen each time we install a host, but it does pop up frequently.
>> journalctl will still return part of the log, but it's never written to
>> /var/log/cloudstack/agent/agent.log. Has anyone seen this behaviour before
>> and have they found a quick fix? We've had to reinstall the affected hosts,
>> which is a waste of resources.
>>> 
>>> What we see in journalctl:
>>> 
>>> systemd[1]: Started CloudStack Agent.
>>> java[8793]: SLF4J: Failed to load class
>> "org.slf4j.impl.StaticLoggerBinder".
>>> java[8793]: SLF4J: Defaulting to no-operation (NOP) logger implementation
>>> java[8793]: SLF4J: See
>> http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
>>> sudo[9160]:     root : TTY=unknown ; PWD=/ ; USER=root ;
>> COMMAND=/usr/bin/grep InitiatorName= /etc/iscsi/initiatorname.iscsi
>>> sudo[9160]: pam_unix(sudo:session): session opened for user root by
>> (uid=0)
>>> sudo[9160]: pam_unix(sudo:session): session closed for user root
>>> java[8793]: libvirt: Domain Config error : invalid connection pointer in
>> virConnectGetVersion
>>> java[8793]: libvirt: Storage Driver error : Storage pool not found: no
>> storage pool with matching uuid '457f56b3-a4b4-4fb5-88d9-6866a2411233'
>>> java[8793]: SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
>>> java[8793]: SLF4J: Defaulting to no-operation MDCAdapter implementation.
>>> java[8793]: SLF4J: See
>> http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.
>>> 
>>> Relavent libraries present on a broken and working system share the same
>> checksum:
>>> 4dde0990b45d1bbba6ee141da8fa9c25
>> /usr/share/cloudstack-agent/lib/jcl-over-slf4j-1.7.5.jar
>>> b184ba88bc78cedc2c73ab4da5a4b5a8
>> /usr/share/cloudstack-agent/lib/jul-to-slf4j-1.7.5.jar
>>> 43f5e20de20e839d305abe1f0b594a7a
>> /usr/share/cloudstack-agent/lib/log4j-over-slf4j-1.7.5.jar
>>> 3b1ececad9ebc3fbad2953ccf4a070ca
>> /usr/share/cloudstack-agent/lib/slf4j-api-1.7.5.jar
>>> 
>>> Met vriendelijke groet / Kind regards,
>>> 
>>> Ruben Bosch
>>> CLDIN
>>> 
>> 
>> 

Reply via email to