AKS : Sidecar dotnet-monitor container is throwing error 400 - Unable to discover the target process #4815
vaibhav-shimpi-maersk
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a lot of memory consumption issue occurring in Production. To analyse the pod - dotnet application memory and its usage, we would like to collect the managed memory and GCDUMP. For this reason, we have implemented the sidecar pattern to install the dotnet-monitor tool in one container and track the main container within same pod.
The approach is implemented and tested using minikube and is working fine in local environment. I am not sure what is blocking not to collect the processes, dump and gcdump in AKS.
Following is the deployment.yaml file -
After applying the above yaml file, the steps carried out are as follows -
Kubectl get pods -n gco-dev
Check logs of respective pods whether both containers are running fine
a. kubectl logs
b. kubectl logs monitor
Login to application container to check whether the processes are running -
a. kubectl exec -it -- sh
b. ps aux
c. netstat -tulpnx
d. exit
This is ensuring the dotnet application is running with process ID and also diagnostics sockets are listening.
Login to side care monitor container to check whether processes are running -
a. kubectl exec -it -c monitor -- sh
b. ps aux
c. netstat -tulpnx
d. exit
This is ensuring the dotnet-monitor tool is running with process ID and also diagnostics sockets are listening.
kubectl port-forward pods/ 7000:52323
Navigate to http://localhost:7000/info. This will show the following output -
{"version":"6.3.2+68aa7e8f1d65aa702a75525176bb72f2b50c1bba","runtimeVersion":"6.0.19","diagnosticPortMode":"Listen","diagnosticPortName":"/diag/port.sock"}
7.Navigate to http://localhost:7000/processes. This is showing the blank array in AKS-
[]
In minikube, it is displaying - [{"pid":1,"uid":"d1a6f3d5-b420-43b3-9690-111801eadf78","name":"aspnetapp","isDefault":true}]
400 - unable to discover a target process
In minikube, it is downloading the dump file.
I have also tried with removing the securityContext and running the pods on root user, same non-root user number but no luck
I also tried to collect the dump by logging into monitor container and executing - dotnet-monitor collect -u http://localhost:52323 or some other port, it is giving the expection http://localhost:52323 is already is in use
Beta Was this translation helpful? Give feedback.
All reactions