Splunk AppDynamics

Could not initialize class com.sun.jna.Native STIG RHEL 8

WILLIAM_GREENE
New Member

Greetings!   

Im unable to start appdynamics-machine-agent following the same install instructions that work with rhel 7.

Machine Agent Bundle - 64-bit linux (rpm)    24.3.0 installed.

I updated the config file to match the same controller/settings/etc as the rhel 7 servers.

Upon starting the service I see the status is failed, and the logs say:


Could not initialize class com.sun.jna.Native

  /opt/appdynamics/machine-agent/logs/startup.out OUTPUT

 2024-04-16 11:15:53.430 Using Agent Version [Machine Agent v24.3.0.4127 GA compatible with 4.4.1.0 Build Date 2024-03-20 05:00:40]
ERROR StatusLogger Reconfiguration failed: No configuration found for '10dba097' at 'null' in 'null'
2024-04-16 11:15:55.037 [INFO] Agent logging directory set to: [/opt/appdynamics/machine-agent/logs]
2024-04-16 11:15:53.468 Could not start up the machine agent due to: Could not initialize class com.sun.jna.Native
2024-04-16 11:15:53.468 Please see startup.log in the current working directory for details.

  /opt/appdynamics/machine-agent/startup.log OUTPUT

Tue Apr 16 11:15:55 CDT 2024
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at oshi.jna.platform.linux.LinuxLibc.<clinit>(LinuxLibc.java:22)
at oshi.software.os.linux.LinuxOperatingSystem.<clinit>(LinuxOperatingSystem.java:97)
at oshi.hardware.platform.linux.LinuxCentralProcessor.initProcessorCounts(LinuxCentralProcessor.java:166)
at oshi.hardware.common.AbstractCentralProcessor.<init>(AbstractCentralProcessor.java:65)
at oshi.hardware.platform.linux.LinuxCentralProcessor.<init>(LinuxCentralProcessor.java:57)
at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.createProcessor(LinuxHardwareAbstractionLayer.java:43)
at oshi.util.Memoizer$1.get(Memoizer.java:61)
at oshi.hardware.common.AbstractHardwareAbstractionLayer.getProcessor(AbstractHardwareAbstractionLayer.java:48)
at com.appdynamics.agent.sim.properties.MachineLicensePropertiesProvider.getOshiBasedLicenseCpuInfo(MachineLicensePropertiesProvider.java:75)
at com.appdynamics.agent.sim.properties.MachineLicensePropertiesProvider.getLicenseCpuInfo(MachineLicensePropertiesProvider.java:44)
at com.appdynamics.agent.sim.properties.MachineLicensePropertiesProvider.get(MachineLicensePropertiesProvider.java:106)
at com.appdynamics.agent.sim.properties.MachineLicensePropertiesProvider.get(MachineLicensePropertiesProvider.java:25)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:60)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:59)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
at com.google.inject.internal.RealMultibinder$RealMultibinderProvider.doProvision(RealMultibinder.java:253)
at com.google.inject.internal.RealMultibinder$ExtensionRealMultibinderProvider.doProvision(RealMultibinder.java:307)
at com.google.inject.internal.RealMultibinder$ExtensionRealMultibinderProvider.doProvision(RealMultibinder.java:289)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$Factory.get(InternalProviderInstanceBindingImpl.java:113)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:58)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:40)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:60)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.appdynamics.voltron.FrameworkBootstrap.createInjector(FrameworkBootstrap.java:107)
at com.appdynamics.voltron.FrameworkBootstrap.start(FrameworkBootstrap.java:162)
at com.appdynamics.voltron.FrameworkBootstrap.startAndRun(FrameworkBootstrap.java:120)
at com.appdynamics.voltron.FrameworkApplication.start(FrameworkApplication.java:31)
at com.appdynamics.agent.sim.Main.startSafe(Main.java:64)
at com.appdynamics.agent.sim.bootstrap.Bootstrap.main(Bootstrap.java:48)

Labels (1)
0 Karma

iamryan
Community Manager
Community Manager

Hi @WILLIAM.GREENE,

Your post has received two replies recently. Has either one of them helped? If so, can you click the "Accept as Solution" button? If not, please reply and continue the conversation. 

0 Karma

Bibek_Parakh1
Engager

Recently we got similar/same issue and it was solved using the following approach from the AppDynamics helpdesk:

Problem statement: Machine Agent problem installation related to temp directory
 
This issue is typically caused by a noexec flag set on the temporary directory. 
 
To resolve the issue please follow the steps:

  1. Create a directory called "tmp" in the MA home, the MA should have write permission on that directory.
  2. Run the command below (notice that we add the "-Djava.io.tmpdir" property, it will change the tmp dir that the MA use)
    • nohup /opt/appdynamics/machine-agent/jre/bin/java -Djava.io.tmpdir=/opt/appdynamics/machine-agent/tmp -jar /opt/appdynamics/machine-agent/machineagent.jar &

Rupesh_Reddy
Engager

Reference to this: https://github.com/elastic/elasticsearch/issues/57018#issuecomment-1501986185 and adding -Djava.io.tmpdir surely helped in the case of another customer I was working with as well. 

iamryan
Community Manager
Community Manager

Hi @WILLIAM.GREENE,

Have you had a chance to review the reply above? Can you confirm if this has helped you? If not, please jump back into the conversation to keep it going. 

0 Karma

Cansel_OZCAN
Path Finder

Hi William,

Think this issue hitting to OS - java version problem.

To localize this issue can you try the machine agent bundle java .zip version instead of "rpm" package with same agent version?

Another thing is can you please try to install the machine agent with "rpm" way with older version like 23.x.x.

Based on your experience if you can share the latest update we can localize your problem.

Thanks

Cansel

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...