JON agent logs contain warning message NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug when Augeas support is enabled for one or more resources

Solution Unverified - Updated -

Issue

  • The agent logs are getting a huge amount of log error:

    WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Unable to check for updated configuration
    java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug
            at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:557)
            ...
    Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug
            at net.augeas.Augeas.<init>(Unknown Source)
            at net.augeas.Augeas.<init>(Unknown Source)
            ...
    
  • The agent log contains the following message:

    WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Directory] Resources - failed after 86 ms.
    java.lang.Exception: Discovery component invocation failed.
            at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:297)
            ...
    Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'augeas': libaugeas.so: cannot open shared object file: No such file or directory
            at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:164)
            at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:237)
            at com.sun.jna.Library$Handler.<init>(Library.java:140)
            at com.sun.jna.Native.loadLibrary(Native.java:375)
            at com.sun.jna.Native.loadLibrary(Native.java:360)
            at net.augeas.jna.Aug.<clinit>(Unknown Source)
            at net.augeas.Augeas.<init>(Unknown Source)
            at net.augeas.Augeas.<init>(Unknown Source)
            at org.rhq.plugins.apache.ApacheServerComponent.isAugeasEnabled(ApacheServerComponent.java:1011)
            ...
    
  • Can not get Apache configuration:

    No configuration was retrieved. This means that either the plugin failed to load the configuration or that configuration collection is merely switched off in the connection settings.
    

Environment

  • Red Hat JBoss Operations Network (JON) 3
  • Apache Web Server resource has its Augeas support enabled
  • Agent is running on:
    • Non-Linux platform
    • Linux platform and <RHQ_AGENT_HOME>/lib/augeas or its contents have been renamed or moved

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In