AppD Archive

MachineAgent error when running as non root user

CommunityUser
Splunk Employee
Splunk Employee

Hello,

Does MachineAgent require to be run as root ? When I start the machine agent as non root user, it gives me below errors.

[Agent-Scheduler-1] 27 Feb 2015 18:23:37,779 WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/2230/environ (Permission denied) exception caught attempting to determine environmental variables for process 2230
[Agent-Scheduler-1] 27 Feb 2015 18:23:37,779 WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/2252/environ (Permission denied) exception caught attempting to determine environmental variables for process 2252
[Agent-Scheduler-1] 27 Feb 2015 18:23:37,780 WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/2255/environ (Permission denied) exception caught attempting to determine environmental variables for process 2255
[Agent-Scheduler-1] 27 Feb 2015 18:23:37,780 WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/2311/environ (Permission denied) exception caught attempting to determine environmental variables for process 2311
[Agent-Scheduler-1] 27 Feb 2015 18:23:37,780 WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/2340/environ (Permission denied) exception caught attempting to determine environmental variables for process 2340

Also, How can I configure the agent to collect metrics for netstat, vmstat etc on linux host ?

Thank you,

Charan

0 Karma

Arun_Dasetty
Super Champion

Hi Charan,

the warn message you see will not affect the machine agent in reporting h/w statistics like (network , cpu, disk i/o etc) the wanr messages are due to new jvm crash guard feature added in recent agent versions which requires root permssions, Hope that clarifies. You can safely those warn messages as long you are more concerned about h/w stats which are reporting fine.

refer doc for more details : https://docs.appdynamics.com/display/PRO40/JVM+Crash+Guard

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi all,

We are seeing the same error messages running the machine agent as a non-root user.

[Agent-Monitor-Scheduler-4] 02 May 2016 09:32:09,221  WARN SigarAppAgentMonitor - java.io.FileNotFoundException: /proc/20172/environ (Permission denied) exception caught attempting to determine environmental variables for process 20172

It writes a few hundred exception messages in the machine-agent.log per hour.  

How do we disable the JVM Crash Guard feature if we are not using it?

Thank you.

0 Karma

Arun_Dasetty
Super Champion

Hi,

Can try switching from default javasigarhardware monitor (set to false for enabled xml element in monitor.xml) and see how it goes using hardwaremonitor monitor.xml enabled setting set to try , post machine agent jvm restart and see how it goes.

Or see if below jvm arg helps:

-Dchmod-use-full-permissions=false

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Adding the -Dchmod-use-full-permissions=false arg didn't work.

I updated the ./monitors/JavaHardwareMonitor/monitor.xml file and set the the <enabled> tag to false.

<name>SigarHardwareMonitor</name>
<type>managed</type>
<enabled>false</enabled>

We no longer see the Sigar exceptions in the logs.  Is there any data we lose by setting this to false though?

Now no data is being sent to App Dynamics dashboard.

thanks!

Here is the machine agent version info:

[main] 03 May 2016 10:32:26,863 INFO SystemAgent - Using Agent Version [Machine Agent v4.0.6.0 GA Build Date 2015-05-11 20:56:44]
[main] 03 May 2016 10:32:26,864 INFO SystemAgent - JVM Runtime:
java.home=/usr/java/jdk1.7.0_60/jre
java.vm.vendor=Oracle Corporation
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.runtime.version=1.7.0_60-b19
java.io.tmpdir=/tmp
[main] 03 May 2016 10:32:26,864 INFO SystemAgent - OS Runtime:
os.name=Linux

thanks

0 Karma

Arun_Dasetty
Super Champion

Hi,

Have you set enabled flag to true in file monitor.xml at path /monitors/HardwareMonitor/monitor.xml file and restart machine agent jvm, if yes, please send the machine agent logs folder archive attached to this point to better answer your query

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

thank you

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...