Unable register pmm-client to pmm-server

I am evaluating percona pmm as a possible replacement for our Oracle Enterprise MySQL monitor since it has gone to end-of-life status. we have 92 MySQL systems which I manage. I am setting up pmm using containers on my home network to evaluate before presenting it as a possible solution for the company I work for.

I have more detailed initialed entered, but when I try to post it, I get the message new users can only have 2 links. I don’t even know what it means by a link

basically I have the pmm-server setup on my Mac mini and I am able to connect to it but am not able to register the client.

Hi @cpritt, you’re not the first MEM/OEM convert :wink: Can you please provide commands you’ve used, and the output? There’s an option to format “code” in the text editor or use triple-backtick like most Markdown editors.

I have a Mac mini with MySQL installed, and Docker Desktop.

I am working through the manual and have successfully installed pmm and got this output from the install:

You can access your new server using one of the following web addresses:

https://127.0.0.1:443/
https://192.168.1.198:443/
https://10.0.0.34:443/
https://192.168.64.1:443/

I am able to connect into and successfully login to pmm.
I have executed *docker pull percona/pmm-client:3

However, I am not able to register the agent successfully.

I am using the script:

PMM_SERVER=X.X.X.X:443

docker run \
 --rm \
 --name pmm-client \
 -e PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER} \
 -e PMM_AGENT_SERVER_USERNAME=admin \
 -e PMM_AGENT_SERVER_PASSWORD=admin \
 -e PMM_AGENT_SERVER_INSECURE_TLS=1 \
 -e PMM_AGENT_SETUP=1 \
 -e PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml \
 -v pmm-client-data:/srv \
 percona/pmm-client:3

I have tried everyone of the ip’s listed above for the PMM_SERVER ip address and everyone gives an error of no route to host. I have tried the container address which is 172.17.0.2 and get the same thing. I have tried 127.0.0.1 and gotten connection refused and I assume that is because that is trying to connect to the port 443 of the Mac and not port 443 of the pmm container.

right now I am stuck. I have a meeting on Wednesday with the team that manages SolarWinds about using that product but I would rather use pmm and was hoping to go through the setup process and try it out before Wednesday. today is Monday. any help would be appreciated.

(I formatted your post above. Only use 3 backticks around code/output, not words/paragraphs.)

Please copy directly from your terminal and paste here. Also, please add this:
-e PMM_AGENT_DEBUG=1
to get a better sense of what is happening.

Again, please provide all output, copied directly from terminal.

You can use https://pmmdemo.percona.com/ also to demonstrate. Also, remind them that SolarWinds is close-source, and costs $$$, while PMM is 100% open-source, and 100% free to use, no costs, no restrictions, and no licensing.

Also, running the pmm-client via docker is not typical. Most installs, and our recommendation, of PMM use docker for pmm-server, and install the pmm-client RPM/APT for their OS directly to the machine running MySQL. If you run pmm-client inside a container, you miss out on some OS-level metrics, and can’t see “the entire picture.”

cpritt@myMiniPlus ~ % PMM_SERVER=192.168.64.1:443                                           
cpritt@myMiniPlus ~ % docker run \
--rm \
--name pmm-client \
-e PMM_AGENT_SERVER_ADDRESS=${PMM_SERVER} \
-e PMM_AGENT_SERVER_USERNAME=admin \
-e PMM_AGENT_SERVER_PASSWORD=admin \
-e PMM_AGENT_SERVER_INSECURE_TLS=1 \
-e PMM_AGENT_DEBUG=1 \
-e PMM_AGENT_SETUP=1 \
-e PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml \
-v pmm-client-data:/srv \
percona/pmm-client:3
time="2025-04-28T21:56:19.661+00:00" level=info msg="Run setup: true Sidecar mode: false" component=entrypoint
time="2025-04-28T21:56:19.661+00:00" level=info msg="Starting 'pmm-agent setup'..." component=entrypoint
time="2025-04-28T21:56:19.669+00:00" level=info msg="Loading configuration file /usr/local/percona/pmm/config/pmm-agent.yaml." component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Temporary directory is not configured and will be set to /usr/local/percona/pmm/tmp" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Nomad data directory will default to /usr/local/percona/pmm/data/nomad" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/tools/pt-summary as a path to Percona Toolkit pt-summary" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/tools/pt-pg-summary as a path to Percona Toolkit pt-pg-summary" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/tools/pt-mongodb-summary as a path to Percona Toolkit pt-mongodb-summary" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/tools/pt-mysql-summary as a path to Percona Toolkit pt-mysql-summary" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/tools/nomad as a path to Nomad binary" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/mongodb_exporter as a path to mongodb_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/postgres_exporter as a path to postgres_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/proxysql_exporter as a path to proxysql_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/rds_exporter as a path to rds_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/azure_exporter as a path to azure_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/vmagent as a path to vmagent" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/node_exporter as a path to node_exporter" component=setup
time="2025-04-28T21:56:19.670+00:00" level=info msg="Using /usr/local/percona/pmm/exporters/mysqld_exporter as a path to mysqld_exporter" component=setup
Checking local pmm-agent status...
time="2025-04-28T21:56:19.670+00:00" level=debug msg="POST /local/Status HTTP/1.1\r\nHost: 127.0.0.1:7777\r\nUser-Agent: Go-http-client/1.1\r\nContent-Length: 3\r\nAccept: application/json\r\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\n{}\n\n" component=setup
time="2025-04-28T21:56:19.670+00:00" level=debug msg="Status error: &url.Error{Op:\"Post\", URL:\"http://127.0.0.1:7777/local/Status\", Err:(*net.OpError)(0x4000388190)}" component=setup
pmm-agent is not running.
Registering pmm-agent on PMM Server...
time="2025-04-28T21:56:19.670+00:00" level=debug msg="POST /v1/management/nodes HTTP/1.1\r\nHost: 192.168.64.1:443\r\nUser-Agent: Go-http-client/1.1\r\nContent-Length: 168\r\nAccept: application/json\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\n{\"node_type\":\"NODE_TYPE_GENERIC_NODE\",\"node_name\":\"bce52b288718\",\"address\":\"192.168.1.2\",\"distro\":\"linux\",\"metrics_mode\":\"METRICS_MODE_AUTO\",\"disable_collectors\":null}\n\n" component=setup
Failed to register pmm-agent on PMM Server: Post "https://192.168.64.1:443/v1/management/nodes": dial tcp 192.168.64.1:443: connect: no route to host.
time="2025-04-28T21:56:22.772+00:00" level=debug msg="Register error: &url.Error{Op:\"Post\", URL:\"https://192.168.64.1:443/v1/management/nodes\", Err:(*net.OpError)(0x40001943c0)}" component=setup
time="2025-04-28T21:56:22.773+00:00" level=info msg="'pmm-agent setup' exited with 1" component=entrypoint
cpritt@myMiniPlus ~ %

It looks like the new pmm-client container, from within this container, cannot reach the other container running pmm-server. How did you launch the pmm-server container? Please provide all commands. Did you create a separate network, or bridge to the host? As a fellow mac user, MacOS has very funky permissions regarding listening for incoming connections. Do you recall denying any of these?

You can do some debugging by grabbing a simple busybox container, exec into it, then try to ping the pmm-server IP. If that also fails, then you know 100% it’s a docker IP/network issue.

Here is the process I followed to install pmm-server:

On my Mac mini I installed docker desktop.
I have docker desktop open .
I started a terminal session.
In the terminal session I executed:
curl -fsSL https://raw.githubusercontent.com/percona/pmm/refs/heads/v3/get-pmm.sh > get-pmm.sh
I then executed get-pmm.sh

It executed, and created the pmm-net and containers

cpritt@myMiniPlus ~ % docker network ls
NETWORK ID     NAME      DRIVER    SCOPE
3cb5ccf3dbe9   bridge    bridge    local
a00cec84461d   host      host      local
d6ef033aaf20   none      null      local
1e8fe53f710b   pmm-net   bridge    local
cpritt@myMiniPlus ~ % 

cpritt@myMiniPlus ~ % docker container ls
CONTAINER ID   IMAGE                  COMMAND                  CREATED        STATUS                  PORTS                             NAMES
e222d0847a49   percona/watchtower     "/watchtower --clean…"   22 hours ago   Up 22 hours (healthy)   8080/tcp                          watchtower
40ad46390be7   percona/pmm-server:3   "/opt/entrypoint.sh"     22 hours ago   Up 22 hours (healthy)   8080/tcp, 0.0.0.0:443->8443/tcp   pmm-server
cpritt@myMiniPlus ~ % 

I then connected to the pmm-server with safari and logged in to verify.

I got on the locally hosted MySQL and created the pmm account using following command:

CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_password>' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'127.0.0.1';

Of course using a unique password.

I skipped the installing of the Percona Release Tool because it appears the instructions are for a Debian based linux system instead of a Mac.

I went to page 83 of the pmm manual to “Run PMM Client as a docker container”
I executed step1: docker pull percona/pmm-client:3
I executed step2: docker volume create pmm-client-data
Then I attempted to get a docker run from the image and have been unsuccessful.

Maybe, I need to try this without using a container for the client.

If your MySQL is not running in a container, then I would not use the pmm-client inside a container either. As I said earlier, it is very a-typical to use the pmm-client container.


okay I am trying to install and setup the client from a binary following the instructions on page 86 of the manual for a arm64 architecture.

I followed all the steps successfully until I get to step 8. I replaced the ip in the command with the ip of my pmm-server: here is what I get:

cpritt@myMiniPlus pmm-client-3.1.0 % pmm-agent setup --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml --server-address=192.168.64.1 --server-insecure-tls --server-username=admin -- 
server-password=admin
zsh: exec format error: pmm-agent
zsh: command not found: server-password=admin
cpritt@myMiniPlus pmm-client-3.1.0 %

Hey @cpritt,
The three backticks are only for console output.

Like this. Some output/input.

Then go back to normal typing by closing the three backticks.

Try switching to bash instead of zsh on your mac. I’m unfamiliar with zsh. I also notice you did not put ./pmm-agent which is typically required when running local commands in terminals.

I finally got things working…

thanks very much for all of your assistance…

I figure I would go over what I had to do to make it work in case another fool comes along and is trying to do the same thing…

1.) one issue with trying to get the binary to config and setup is that I was copying the command out of the pdf manual which when I pasted it in the terminal it went to two lines causing the error.
2.) figured that out and then the binary would not execute because it was a Debian linux binary which I found out by executing files pmm-agent
3.) so… back to the agent container. I got it to register and run by adding the --network pmm-net to the run command
4.) I then pulled the latest mysql container image and set it’s network to be pmm-net and was able to add the instance to the pmm-server

will now play around a bit..

it will be easier setting up the company’s systems since all 92 servers are on red hat el8 and el9 virtual boxes. (I would just need approval from the security department and the linux admin teams)

again thanks for your help.

out of the pdf manual

You’re the first person I’ve ever known to use the PDF. All the documentation pages have the same info, including one-click copy examples. You’d have much better luck just using the docs.

Debian linux binary

Ah yes, you can’t run that on macos

adding the --network pmm-net to the run command

Yes, docker networks make things like this more painful than necessary. You’re in a unique situation where you are trying to do everything on 1 machine, some with docker and some without. That’s very a-typical.

it will be easier setting up the company’s systems since all 92 servers are on red hat el8 and el9

Most certainly! A few lines of ansible should add our repo, install the pmm-client, register it with pmm-server, and then add mysql. I did 18 servers for a customer 2 weeks ago this way. Took all of 11 minutes to accomplish.

Be sure to run pmm-client --help and pmm-client add mysql --help to see all the extra things you can add such as --environment, and --az, and --replicaset, in addition to custom tags.

Also, when you add mysql, make sure you pick the correct query source: slowlog (default) or perfschema. If slowlog, make sure it is enabled and long_query_time is set to 0. If you use perfschema, make sure performance_schema_max_query_digest=8192 in my.cnf.