Trouble registering agent in PMM

Failed to register a PMM agent using docker-compose. Want to re-register but getting the following message:

“Failed to register pmm-agent on PMM Server: Node with name “pmm-client-app03-dev” already exists. If you want override node, use --force option.”

I have two agents successfully registered. Was getting ‘failed ID/PW’ for this one on the first attempt for some reason.

Output:
Status: Downloaded newer image for percona/pmm-client:2
Creating pmm-client …
Creating pmm-client … done
Attaching to pmm-client
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Loading configuration file /etc/pmm-agent.yaml. component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/node_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/mysqld_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/mongodb_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/postgres_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/proxysql_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/rds_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/azure_exporter component=setup
pmm-client | INFO[2021-10-04T14:27:19.652+00:00] Using /usr/local/percona/pmm2/exporters/vmagent component=setup
pmm-client | Checking local pmm-agent status…
pmm-client | pmm-agent is not running.
pmm-client | Registering pmm-agent on PMM Server…
pmm-client | Failed to register pmm-agent on PMM Server: Node with name “pmm-client-app03-dev” already exists. If you want override node, use --force option.
pmm-client exited with code 1

Hi @Mikem thanks for posting!

It looks like you previously registered a node with the same name. PMM Server will detect this and not allow subsequent registrations using this node name.
If you would like to force registration and override the old node information, you can use the --force flag as follows:

pmm-admin config --force ...

You can see the full list of commands available at the following link:

1 Like

Michael, I did try the pmm-admin but on both the Server and agent hosts, pmm-admin does not appear to be installed? I will look through the docs and see what I need to do.

Thanks.

2 Likes

Assuming @Michael_Coburn is correct and it’s not some other error, you can use the PMM server UI to find and delete the node and any services that may have been added for it.

If you login as an admin, you should see the gear icon on the left side menu, hover on it, choose “PMM Inventory” followed by “Inventory List”.

Click on the “Nodes” tab on the resulting page and find the pmm-client-app03-dev in the Node Name column. Check the corresponding box, and hit the delete button. When the resulting dialog box pops up, be sure to check the “Force Mode” option as that will identify and delete any agents and services that may still be registered.

You won’t lose any data for the old node, however you should make sure you actually want to delete first as there may be an agent actually collecting under that name but the IP address column should give you a hint on where the node is/came from.

2 Likes

That helped a lot. I was able to drop the host from within the UI and add it back via docker-compose. You can close this. Thanks!

2 Likes