Error adding MySQL queries: problem with agent registration on QAN API

I am trying to get PMM (running in Docker container) working with RDS instances.
But QAN is not running there:
Query Analytics API DOWN

When trying to add an instance:
[linux:metrics] OK, already monitoring this system.
[mysql:metrics] OK, already monitoring MySQL metrics.
[mysql:queries] Error adding MySQL queries: problem with agent registration on QAN API: exit status 1

From the log /var/log/qan-api.log:
2018/05/17 14:33:40 config.go:79: Loading /etc/percona-qan-api.conf
2018/05/17 14:33:40 config.go:119: API root dir /usr/share/percona-qan-api/src/
2018/05/17 14:33:40 base.go:20: Error 1045: Access denied for user ‘qan-api’@‘localhost’ (using password: YES)

Can anyone please help me with this? I don’t have perf_schema enabled on RDS. Can it be the issue?

This issue appears when I use AWS EFS for pmm storage. If I use local directories QAN is started successfully

Hello atymoshyk one of our other community forum users found that the problem was caused the docker MySQL database not being up, so QAN was not ready to receive from the client.
Could you check that? Meanwhile, I will ask the PMM team if they have other suggestions for you in case that’s not the problem. Thanks!

Hi atymoshyk

could you recreate both pmm-data and pmm-server containers?
looks like something wrong with MySQL database inside a container.

So I managed to get PMM working with EFS by doing the following:

  1. Created containers without using EFS
  2. Copied all needed directories to EFS
  3. Removed containers
  4. Recreated containers using EFS.

The reason for doing this was that I found that not all needed files were created if I used EFS from the very beginning for pmm-data.

Aren’t there any instructions for using EFS (NFS) for storing PMM’s data? I need to automate the deployment of PMM from scratch