cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Rajendra.Nautiyal
AppDynamics Team (Retired)

Symptoms

While running the Machine Agent, you may see the following error in the Machine Agent logs:

 

ERROR RawCollectorUtil - Could not collect raw data
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: ; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3747)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3687)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2714)
at com.appdynamics.sim.agent.extensions.servers.model.RawCollectorUtil.runCollector(RawCollectorUtil.java:101)
at com.appdynamics.sim.agent.extensions.servers.model.RawCollectorUtil.runCollector(RawCollectorUtil.java:67)
at com.appdynamics.sim.agent.extensions.servers.model.newlinux.NewLinuxRawCollector.collectRawData(NewLinuxRawCollector.java:62)
at com.appdynamics.sim.agent.extensions.servers.model.newlinux.NewLinuxRawCollector.collectRawData(NewLinuxRawCollector.java:36)
at com.appdynamics.sim.agent.extensions.servers.model.Server.collectAndReport(Server.java:43)
at com.appdynamics.sim.agent.extensions.servers.ServersMonitor.run(ServersMonitor.java:90)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

ERROR RawCollectorUtil - The standard out from the collector script was: 
WARN RawCollectorUtil - The error log from the collector script was: ERROR: missing ip

 

When this occurs, the Machine Agent is not able to collect machine-level metrics.

 

Diagnosis

This error occurs when the IP command is not in the PATH for the Machine Agent user. Without the correctly configured PATH, it is impossible for the Machine Agent to use SIM to collect the network metadata.

 

To verify the root cause, run the following commands in the shell prompt on the server that runs the Machine Agent.

 

shell> ip a
shell > which ip
shell> echo $PATH


The following results confirm the root cause:

 

bash: ip: command not found
which ip /usr/bin/which: no ip in
no ip present is path

 

 

Solution

1) Stop the Machine Agent.

 

2) Set IP as an environment variable for the user who is running the Machine Agent.

  •  "ip" utility is usually in /sbin folder. 
  • Check if /sbin/ip -V returns ip version and if it returns then ip is in /sbin.
  • Add /sbin to PATH environment variable
  • Reference: ip(8) - Linux man page

 

3) Start the Machine Agent.

Comments

Hello,

 

What should i do if i have the following warning even with ip command isntalled and in the path with Machine agent 4.5 ?

 

 

[extension-scheduler-pool-7] 27 Aug 2018 09:51:38,147  WARN RawCollectorUtil - The collector script returned with these errors: ERROR: Failed to collect networks, Unable to find ip command. Please check if ip is installed on this machine, or if the PATH environment variable is correctly configured

 

 

 

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd xx:xx:xx:xx:xx:xx
    inet xxx.xxx.xxx.xxx/xx brd xxx.xxx.xxx.xxx scope global eth0
    inet6 xxxx::xxxx:xxxx:xxxx:xxxx/xx scope link
       valid_lft forever preferred_lft forever
$ which ip
/sbin/ip
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/puppetlabs/bin
$ /sbin/ip -V
ip utility, iproute2-ss091226

 

 

Regards,

 

Matthieu

Version history
Last update:
‎06-08-2020 04:21 PM
Updated by:
Join Us On December 10
Learn how Splunk and AppDynamics are redefining observability


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here