# PMM agent version mismatch

**URL:** <https://forums.percona.com/t/pmm-agent-version-mismatch/15901>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [May 31, 2022, 3:57am UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901 "2022-05-31T03:57:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakobyan](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@hakobyan](https://forums.percona.com/u/hakobyan)\
**Post date:** [May 31, 2022, 3:57am UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/1 "2022-05-31T03:57:17Z")

</div>

This is the output of `pmm-agent -v`

```auto
ProjectName: pmm-agent
Version: 2.26.0
PMMVersion: 2.26.0
Timestamp: 2022-02-03 14:03:52 (UTC)
FullCommit: c74f5ae58331dc29af34d29c2b6905b8f47cc3ab

```

whereas when I add mysql with this command

```auto
sudo pmm-admin add mysql --trace --json --username=stats --socket=$(...) --replication-set=repl_set --query-source=perfschema

```

among other stuff I get this output

```auto
{"component":"agentlocal-transport","file":"/tmp/go/pkg/mod/github.com/go-openapi/runtime@v0.19.20/client/runtime.go:446","func":"github.com/go-openapi/runtime/client.(*Runtime).Submit","level":"debug","msg":"HTTP/1.1 200 OK\r\nContent-Length: 1171\r\nContent-Type: application/json\r\nDate: Tue, 31 May 2022 03:53:49 GMT\r\nGrpc-Metadata-Content-Type: application/grpc\r\n\r\n{\n \"agent_id\": \"/agent_id/8f33ef6f-1f6e-473c-8e6d-282735217f98\",\n \"runs_on_node_id\": \"/node_id/20fb4f3c-6157-4a16-b276-874c81f424e8\",\n \"server_info\": {\n \"url\": \"https://admin:admin@pmm-server-common-tls.service.consul:443/\",\n \"insecure_tls\": true,\n \"connected\": true,\n \"version\": \"2.26.0\",\n \"latency\": null,\n \"clock_drift\": null\n },\n \"agents_info\": [\n {\n \"agent_id\": \"/agent_id/475fe48d-5dc2-4562-b454-ea2e58d6249a\",\n \"agent_type\": \"VM_AGENT\",\n \"status\": \"RUNNING\",\n \"listen_port\": 42000\n },\n {\n \"agent_id\": \"/agent_id/4c649d28-f799-49ac-8b45-c564e4581ec2\",\n \"agent_type\": \"NODE_EXPORTER\",\n \"status\": \"RUNNING\",\n \"listen_port\": 42001\n },\n {\n \"agent_id\": \"/agent_id/51aef961-98f6-4bc3-9d05-6e118e8fa9d3\",\n \"agent_type\": \"QAN_MYSQL_PERFSCHEMA_AGENT\",\n \"status\": \"RUNNING\",\n \"listen_port\": 0\n },\n {\n \"agent_id\": \"/agent_id/e0b540e6-5d4d-4427-8e0d-bc861551f3dd\",\n \"agent_type\": \"MYSQLD_EXPORTER\",\n \"status\": \"RUNNING\",\n \"listen_port\": 42002\n }\n],\n \"config_filepath\": \"/usr/local/percona/pmm2/config/pmm-agent.yaml\",\n \"agent_version\": \"2.17.0\"\n}\n","time":"2022-05-31T03:53:49Z"}

```

on the last line it indicates that the agent version is actually 2.17.0.  
Can someone explain where this discrepancy is coming from? I am trying to upgrade the pmm-agent to above 2.20.0 to make the Explain/Table tabs work in QAN, because at the pmm-agent version of 2.17.0 the output of the REST calls to retrieve the query explain information is different than what the dashboard expects due to this change [[PMM-8059] Update Query Analytics UI to clarify estimated results on MySQL 'explain' response where we modified original query - Percona JIRA](https://jira.percona.com/browse/PMM-8059) and its related backend change [[PMM-6278] Modification of MySQL 'Delete' queries to provide 'Explain' information - Percona JIRA](https://jira.percona.com/browse/PMM-6278)

Thanks!

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [May 31, 2022, 3:06pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/2 "2022-05-31T15:06:36Z")

</div>

Hello, this seems like a bug with the reported version. How are you installing the pmm2-client? rpm? You should try to always match the same version between client and server.

---

<div class="post-metadata">

**Author:** ![hakobyan](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@hakobyan](https://forums.percona.com/u/hakobyan)\
**Post date:** [May 31, 2022, 3:25pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/3 "2022-05-31T15:25:40Z")

</div>

Hi.  
Which one is the reported version in this case?  
I am installing by downloading manually then using the package manager, Ubuntu 20.04.  
I am trying to upgrade my client to match the server, which is 2.26. I thought I did that, but it doesn’t seem so.

---

<div class="post-metadata">

**Author:** ![hakobyan](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@hakobyan](https://forums.percona.com/u/hakobyan)\
**Post date:** [May 31, 2022, 3:28pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/4 "2022-05-31T15:28:21Z")

</div>

My understanding is that by upgrading the client past 2.20, [this change](https://github.com/percona/pmm-agent/pull/260) would be included, so that the JSON response from the Explain API-s would be in the new format, because currently it is using the old format which the frontend code fails to handle.

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [May 31, 2022, 3:31pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/5 "2022-05-31T15:31:13Z")

</div>

can you post here the exact steps you took to upgrade? at the risk of saying something obvious did you restart pmm-agent service after the upgrade?

---

<div class="post-metadata">

**Author:** ![hakobyan](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@hakobyan](https://forums.percona.com/u/hakobyan)\
**Post date:** [May 31, 2022, 3:37pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/6 "2022-05-31T15:37:33Z")

</div>

We are using an internal deployment tool to install PMM, I am not familiar with the details but I know that it is using dpkg at some point.  
I did restart the service by running  
`pmm-admin remove mysql service_name`  
Then running  
`pmm-admin config...`  
then  
`pmm-admin add mysql ...`  
So which version is meant to be the correct one? The one coming from `pmm-agent -v` or the one in the JSON output when I ran `pmm-admin add`?

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [May 31, 2022, 4:00pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/7 "2022-05-31T16:00:49Z")

</div>

What I mean is try to restart the pmm agent systemd service:

`systemctl pmm-agent restart`

it is possible you installed the new binaries but the old ones are still in-memory, so there is a mismatch? try the above and let me know

---

<div class="post-metadata">

**Author:** ![hakobyan](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@hakobyan](https://forums.percona.com/u/hakobyan)\
**Post date:** [May 31, 2022, 5:08pm UTC](https://forums.percona.com/t/pmm-agent-version-mismatch/15901/8 "2022-05-31T17:08:30Z")

</div>

That worked! Thank you!
