# pmm-client initContainer is failing with exit code 3

**URL:** <https://forums.percona.com/t/pmm-client-initcontainer-is-failing-with-exit-code-3/7775>\
**Category:** PMM 2.x\
**Created:** [July 15, 2020, 7:37am UTC](https://forums.percona.com/t/pmm-client-initcontainer-is-failing-with-exit-code-3/7775 "2020-07-15T07:37:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugene\_burachevskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/eugene_burachevskiy/32/1362_2.png) [@eugene\_burachevskiy](https://forums.percona.com/u/eugene_burachevskiy)\
**Post date:** [July 15, 2020, 7:37am UTC](https://forums.percona.com/t/pmm-client-initcontainer-is-failing-with-exit-code-3/7775/1 "2020-07-15T07:37:21Z")

</div>

Hi guys!I’m trying to setup PMM based monitoring for perconaservermongodb kubernetes operator.Server part with percona/pmm-server Helm chart is OK.But clients are not. I’m setting them with following definition in perconaservermongodbs CR:

```auto
pmm:
enabled: true
image: percona/percona-server-mongodb-operator:1.4.0-pmm
serverHost: pmm-service.psmdb
serverUser: admin

```

I have also updated “my-cluster-name-secrets” secret to have proper usernames/passwords.pmm-client initContainer is always failing with exitcode 3:  
- containerID: docker://baf2ea49ad054eed8972cd65d31437ae248b22d8beb55adf00f6ed13d3452db8  
&nbsp; image: percona/percona-server-mongodb-operator:1.4.0-pmm  
&nbsp; imageID: docker-pullable://percona/percona-server-mongodb-operator@sha256:bf0cdfd9f9971964cb720a92e99da1a75367cf6a07deec9367ca6b80e78b0f89  
&nbsp; lastState:  
&nbsp;&nbsp;&nbsp; terminated:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; containerID: docker://f276c66f0a47d8ce6f626645ffb3255fc03926f961d82de399282972f1af6fd3  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exitCode: 3  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finishedAt: “2020-07-15T11:11:34Z”  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reason: Error  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startedAt: “2020-07-15T11:11:24Z”  
  
Logs are also not so informative:

```auto
+ main<br>+ '[' -z pmm-service.psmdb ']'<br>+ ARGS+="--server-password=PMM_PASSWORD"<br>++ sed -e 's/).*//; s/.*(//'<br>++ grep PING<br>++ ping -c 1 pmm-service.psmdb<br>+ PMM_SERVER_IP=172.20.15.45<br>++ ip route get 172.20.15.45<br>++ grep 'src '<br>++ sed -e 's/.* src //; s/ .*//'<br>+ SRC_ADDR=10.240.90.250<br>+ CLIENT_NAME=dev-core-rs0-2<br>

```

At least according to this logs we can see that pmm-server k8s service is resolved properly and reachable.Then I checked pmm-client docker image entrypoint.sh and I’m pretty sure that error with exitcode 3 happens on that part of main() function:

```auto
<br>{ set +x; } 2&gt; /dev/null<br>&nbsp;&nbsp;&nbsp; SERVER_RESPONSE_CODE=$(curl -k -s -o /dev/null -w "%{http_code}" "https://${PMM_USER}:$(urlencode ${PMM_PASSWORD})@${PMM_SERVER}/v1/readyz")<br>&nbsp;&nbsp;&nbsp; set -x

```

Because in log we can see succesfull assignment of CLIENT\_NAME variable, but pmm2\_start() function hasn’t started yet, as we dont see echo output from its begining.  
The strange thing is that those command works fine when I run it from another shell pod:

```auto
[root@shell /]# echo ${PMM_USER}<br>admin<br>[root@shell /]# echo ${PMM_SERVER}<br>pmm-service.psmdb<br>[root@shell /]# curl -k -s -o /dev/null -w "%{http_code}" "https://${PMM_USER}:$(urlencode ${PMM_PASSWORD})@${PMM_SERVER}/v1/readyz"<br>200[root@shell /]# echo $?<br>0<br>[root@shell /]#

```

I am not sure where to go next… Maybe somebody has faced something similar before or may advice some ideas for further troubleshoot?  
Thank you!

---

<div class="post-metadata">

**Author:** ![eugene\_burachevskiy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/eugene_burachevskiy/32/1362_2.png) [@eugene\_burachevskiy](https://forums.percona.com/u/eugene_burachevskiy)\
**Post date:** [July 17, 2020, 10:25am UTC](https://forums.percona.com/t/pmm-client-initcontainer-is-failing-with-exit-code-3/7775/2 "2020-07-17T10:25:42Z")

</div>

Logs were not formatted properly here, please see my question here:[pmm-client initContainer fails to start with exitcode 3 - PMM 2.x - Percona Community Forum](https://forums.percona.com/discussion/55895/pmm-client-initcontainer-fails-to-start-with-exitcode-3#latest)
