# Container pmm-client got error with exit code 1

**URL:** <https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251>\
**Category:** Percona Operator for MySQL\
**Created:** [November 9, 2020, 2:05am UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251 "2020-11-09T02:05:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wooyoung](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@wooyoung](https://forums.percona.com/u/wooyoung)\
**Post date:** [November 9, 2020, 2:05am UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/1 "2020-11-09T02:05:53Z")

</div>

Hi,

I’ve installed Kubernetes Operator for Percona XtraDB Cluster by using the latest helm chart on OpenShift 4.4 setup.

To enable pmm, I did two things:

1. installed pmm-server by using the latest helm chart from [https://github.com/Percona-Lab/percona-openshift/tree/master/helm/pmm-server](https://github.com/Percona-Lab/percona-openshift/tree/master/helm/pmm-server)2) change to enable pmm in pxc-db helm chart like below:

values.yaml

```auto
<omitted>
pmm:
  enabled: true
  image:
    repository: perconalab/pmm-client
    tag: 1.17.1
  serverHost: monitoring-service
  serverUser: admin﻿

```

But, during installation, pxc pod got error due to container pmm-client with exit code 1 (see attached):

[pod\_describe.txt](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/73ef2519e5ef3e6194ad8424060dd8cb505a5f39.txt)

and container pmm-client log of the pod is (see attached):

[pod\_log.txt](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/d3e86a7841217102c9219462a663ae63329c4099.txt)

There is no problem with connectivity between pmm-client and pmm-server including authentication, but it seems pmm-server doesn’t provide /v1/status/leader API which could be seen in above log.

A doubtful point is the difference of installed docker image’s tag between pmm-server and pmm-client:

- pmm-server: percona/pmm-server:2.11.1 (described in [https://github.com/Percona-Lab/percona-openshift/blob/master/helm/pmm-server/values.yaml)](https://github.com/Percona-Lab/percona-openshift/blob/master/helm/pmm-server/values.yaml))

- pmm-client: perconalab/pmm-client:1.17.1 (described in [https://github.com/percona/percona-helm-charts/blob/master/charts/pxc-db/values.yaml)](https://github.com/percona/percona-helm-charts/blob/master/charts/pxc-db/values.yaml))

could you please let me know what is the root cause of this issue and how to solve it?

Thank you in advance.

Wooyoung

[pod\_describe.txt](https://forums.percona.com/uploads/short-url/gxBh274i2wd1eQ1Gs70pIz1cGjD.txt) (9.63 KB)

[pod\_log.txt](https://forums.percona.com/uploads/short-url/ueCH5GKxYhMXSjJdFT2zsllM3k5.txt) (15.8 KB)

---

<div class="post-metadata">

**Author:** ![Evgeniy\_Patlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/evgeniy_patlan/32/41_2.png) [@Evgeniy\_Patlan](https://forums.percona.com/u/Evgeniy_Patlan)\
**Post date:** [November 9, 2020, 7:13am UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/2 "2020-11-09T07:13:23Z")

</div>

hi @wooyoung

Here is the blogpost which show how to install PMM with Kubernetes Operator for Percona XtraDB Cluster

[https://www.percona.com/blog/2020/07/23/using-percona-kubernetes-operators-with-percona-monitoring-and-management/](https://www.percona.com/blog/2020/07/23/using-percona-kubernetes-operators-with-percona-monitoring-and-management/)

---

<div class="post-metadata">

**Author:** ![wooyoung](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@wooyoung](https://forums.percona.com/u/wooyoung)\
**Post date:** [November 9, 2020, 8:26pm UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/3 "2020-11-09T20:26:29Z")

</div>

Hi @Evgeniy_Patlan

Thanks for your answer. I have two questions:

1. To install pmm server on OpenShift, should we install it with version 1.17.3 only described in the blog you mentioned?

2. Does pmm server with version 2.11.1 provide /v1/status/leader API?

---

<div class="post-metadata">

**Author:** ![Evgeniy\_Patlan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/evgeniy_patlan/32/41_2.png) [@Evgeniy\_Patlan](https://forums.percona.com/u/Evgeniy_Patlan)\
**Post date:** [November 10, 2020, 4:54am UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/4 "2020-11-10T04:54:46Z")

</div>

hi @wooyoung

For openshift yes it is possible only to use 1.17 PMM for now due to some limitations.

---

<div class="post-metadata">

**Author:** ![wooyoung](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@wooyoung](https://forums.percona.com/u/wooyoung)\
**Post date:** [November 10, 2020, 9:27pm UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/5 "2020-11-10T21:27:55Z")

</div>

Hi @Evgeniy\_PatlanI installed 1.17 PMM server and followed guide the blog mentioned.

But I got some error from pmm-client container in pxc pod (below is the container log):

```auto
[root@bastion pxc-db]# oc -npercona-test logs -f pxc-db-pxc-0 -c pmm-client
+ '[' -z pxc-monitor-service ']'
+ '[' -n admin ']'
+ ARGS+=' --server-user admin'
+ '[' -n admin ']'
+ ARGS+=' --server-password admin'
++ ping -c 1 pxc-monitor-service
++ grep PING
++ sed -e 's/).*//; s/.*(//'
+ PMM_SERVER_IP=10.21.221.91
++ ip route get 10.21.221.91
++ grep 'src '
++ sed -e 's/.* src //; s/ .*//'
+ SRC_ADDR=10.131.9.34
+ CLIENT_NAME=localhost
+ wait_for_url https://admin:admin@pxc-monitor-service/v1/status/leader 127.0.0.1:8300
+ local URL=https://admin:admin@pxc-monitor-service/v1/status/leader
+ local RESPONSE=127.0.0.1:8300
++ seq 1 60
+ for i in '`seq 1 60`'
+ curl -k https://admin:admin@pxc-monitor-service/v1/status/leader
+ grep 127.0.0.1:8300
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 16 100 16 0 0 141 0 --:--:-- --:--:-- --:--:-- 141
+ result=0
+ '[' 0 -eq 0 ']'
+ return
+ pmm-admin config --skip-root --force --server pxc-monitor-service --server-insecure-ssl --bind-address 10.131.9.34 --client-address 10.131.9.34 --client-name localhost --server-user admin --server-password admin
This client is configured with HTTP basic authentication.
However, PMM server is not.

If you forgot to enable password protection on the server, you may want to do so.

Otherwise, run the following command to reset the config and disable authentication:
pmm-admin config --server pxc-monitor-service --server-insecure-ssl

```

It seems below is the root cause:

```auto
+ pmm-admin config --skip-root --force --server pxc-monitor-service --server-insecure-ssl --bind-address 10.131.9.34 --client-address 10.131.9.34 --client-name localhost --server-user admin --server-password admin
This client is configured with HTTP basic authentication.
However, PMM server is not.

```

Any idea on how to solve this error?

Thank you

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [February 10, 2021, 10:56am UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/6 "2021-02-10T10:56:42Z")

</div>

Hello @wooyoung ,

starting from [PXC Operator 1.7](https://www.percona.com/doc/kubernetes-operator-for-pxc/ReleaseNotes/Kubernetes-Operator-for-PXC-RN1.7.0.html) we added official support for PMM version 2. It works without any hacks. Going forward we will continue the support for PMM v2 in our operators.  
PMM server version 2 can be installed in Openshift, but it requires root access.

Please let me know if PMM v2 is an option for you.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 11, 2021, 4:50pm UTC](https://forums.percona.com/t/container-pmm-client-got-error-with-exit-code-1/8251/7 "2021-02-11T16:50:55Z")

</div>

Just to add to what @Sergey_Pronin mentions, in order to deploy PMM Server 2 in OpenShift you need to apply a Security Context Constraint of `anyuid` to the project like this example:

```
oc adm policy add-scc-to-user anyuid -z default -n <project>

```
