Splunk AppDynamics

Docker monitoring doesn't work

Dan_Loku
Engager

Hi,

The below error appears only whenever Sim monitoring and docker monitoring enabled is enabled.

(MACHINE_AGENT_PROPERTIES=-Dappdynamics.sim.enabled=true -Dappdynamics.docker.enabled=true)

I could not start up the machine agent due to: Failed to get a response from /info using a GET request. The error encountered is: javax.xml.ws.WebServiceException: Cannot connect to Docker. The unix socket file /var/run/docker.sock does not exist. Please provide a valid file to access.
Please see startup.log in the current working directory for details.

Tried resolutions but didnt work :-

Labels (1)
1 Solution

Sandor_Bihary
Path Finder

Hey Guys!

If you want to run it on K8S the official gitrepo currently has a bug. 

The issue here is that there was a commit which removed some important line from the 

appd-machine-agent-analytics/deploy/machine-agent.yaml file.

You need to mount the proper directory, so you need add the follow


- mountPath: /var/run/docker.sock
name: docker-sock

If you are trying to run it in plain docker with compose you can try this repository:

https://github.com/Appdynamics/docker-machine-agent/blob/master/docker-compose.yml

Here you can see that the /var/run/docker.sock is also mounted:

volumes:
- /:/hostroot:ro
- /var/run/docker.sock:/var/run/docker.sock

View solution in original post

Sandor_Bihary
Path Finder

HI Everyone!

Giving this a bump. I have the same issue. Did anyone find a solution to this?

iamryan
Community Manager
Community Manager

@Sandor.Bihary @Dan.Loku 

Sandor, Did you happen to check out the link Dan provided in his post? I'm wondering if that KB article needs to be updated to make things more clear or improved?

0 Karma

Sandor_Bihary
Path Finder

Hey Guys!

If you want to run it on K8S the official gitrepo currently has a bug. 

The issue here is that there was a commit which removed some important line from the 

appd-machine-agent-analytics/deploy/machine-agent.yaml file.

You need to mount the proper directory, so you need add the follow


- mountPath: /var/run/docker.sock
name: docker-sock

If you are trying to run it in plain docker with compose you can try this repository:

https://github.com/Appdynamics/docker-machine-agent/blob/master/docker-compose.yml

Here you can see that the /var/run/docker.sock is also mounted:

volumes:
- /:/hostroot:ro
- /var/run/docker.sock:/var/run/docker.sock

Claudia_Landiva
Communicator

Hello, Sandor

I wanted to let you know that I've updated the How do I resolve Docker Machine Agent article in the Knowledge Base. Per your recommendation, I noted that users should check to be sure the mount is properly configured.

Thank you for helping us make the community better by flagging this..

Regards,

Claudia Landivar

Community Manager & Editor 

Sandor_Bihary
Path Finder

So answering your question this KB article is good. If the container runs under a user which does not have a privilige, you need to add it to the proper docker group.

However, it may happen if you don't start the container properly you may get this issue as well. So would be great to add to this KB that you need to check if the mount is properly configured.

iamryan
Community Manager
Community Manager

Hi Sandor,

Thanks for sharing your research and that additional information. I've created an internal ticket to have that KB article be looked at. If you felt like your previous response answers the question, would you mind marking your reply as the accepted solution? This will help let the community know this question has an official response. 

Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...