Problem with mysql:query when renaming client

After updating the Server and Client to 1.0.7 I tried to use the QAN. This doesn’t work before, but I hadn’t the time to get a deeper look whats going wrong.

linux:metrics and mysql:metrics works, check-network shows OK for every Server Service especially for the Query Analytics API. I renamed the client from ‘dblegacy-prod-slave’ to ‘db-legacy-slave’. Now I tried to add mysql:queries with

and in pmm-mysql-queries-0.log it shows:

2016/12/13 15:08:24.397517 main.go:165: Starting agent…
2016/12/13 15:08:24.398197 main.go:346: Agent is ready
2016/12/13 15:08:24.468939 main.go:207: API is ready
2016/12/13 15:08:25.411188 WARNING agent-ws bad status
2016/12/13 15:08:25.411933 WARNING log-ws bad status
2016/12/13 15:08:25.505428 WARNING instance-manager Cannot update mysql dblegacy-prod-slave (65100efb47bd4a0f5451d27eea62a76c): PUT https://pmm..com/qan-api/instances/65100efb47bd4a0f5451d27eea62a76c failed: code 409:

Therefore I rename the client back to “dblegacy-prod-slave” and got:

Error adding MySQL queries: PUT https://pmm..com/qan-api/instances/65100efb47bd4a0f5451d27eea62a76c: API returned HTTP status code 409, expected 204

No Logfile written.

Can I somehow wipe all QAN Data and Nodes on the Server side? I deregister the Node/Services with Consul.

Please use deregister with caution as it leaves broken relations. We recommend always to use pmm-admin to uninstall/remove client installation.

If you haven’t added any mysql:queries services to the client, try to remove those folders:
/usr/local/percona/qan-agent/config
/usr/local/percona/qan-agent/data
/usr/local/percona/qan-agent/instance

Then restart server container by stop/start.
Then try to add mysql:queries service.

I see. Unfortunately there is no such folder:

root@c563b910019d:/opt# ls -l /usr/local/percona/
total 4
drwxr-xr-x 5 root root 4096 Dec 9 14:38 qan-api
root@c563b910019d:/opt#

Therefore a Container restart doesn’t work

These are the client folders.

I created a second Container which is using new Data Container as well. Same Timeout Error but the warning about updating the instance is gone. Now the Client Log only contains:


2016/12/14 09:59:24.047847 main.go:165: Starting agent...
2016/12/14 09:59:24.048433 main.go:346: Agent is ready
2016/12/14 09:59:24.121373 main.go:207: API is ready
2016/12/14 09:59:25.061383 WARNING agent-ws bad status
2016/12/14 09:59:25.062780 WARNING log-ws bad status

Ok, now I delete those folders on the Client and start the old Container again.

2016/12/14 10:07:18.924598 WARNING instance-manager Cannot update mysql db-legacy-slave (7a8abc55566c43b047111317d78a2614): PUT https://pmm.<DOMAIN>.com/qan-api/instances/7a8abc55566c43b047111317d78a2614 failed: code 409:

Does it work overall, I mean wait 2 min. for queries on web app? mysql:queries service (percona-qan-agent process) re-establishes connection once lost.

Here are my steps I tried:
[LIST=1]
[]Client: pmm-admin repair
[
]Client: remove the 3 mentioned qan-agent folders
[]Client: pmm-admin check-network → all fine
[
]Server: stop Container
[]Server: start Container
[
]Client: pmm-admin add mysql:queries → Error adding MySQL queries: timeout 10s waiting on agent to connect to API.
[/LIST]
Client Log:

2016/12/14 10:29:47.185627 WARNING instance-manager Cannot update mysql db-legacy-slave (d2316fbc594a4ded4b0506d21d96a7c3): PUT https://pmm...com/qan-api/instances/d2316fbc594a4ded4b0506d21d96a7c3 failed: code 409:
2016/12/14 10:30:43.143550 WARNING agent-ws bad status
2016/12/14 10:30:43.143820 WARNING log-ws bad status
2016/12/14 10:30:49.092191 WARNING data-sender Cannot connect to API: bad status

Server Log:

[0m2016/12/14 09:29:47.088 127.0.0.1 409 95.76495ms PUT /instances/d2316fbc594a4ded4b0506d21d96a7c3

I guess I’ll try to start all over and reinstall Client and Server Packages.