I’m back to troubleshooting this issue. On the Apache proxy side, there is nothing in the error log. In the access log:
10.1.2.3 - - [04/Oct/2020:19:04:47 +0100] “GET /qan-api/ping HTTP/1.1” 200 - “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:47 +0100] “GET /v1/status/leader HTTP/1.1” 200 16 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:47 +0100] “GET /qan-api/ping HTTP/1.1” 401 172 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:47 +0100] “GET /managed/v1/version HTTP/1.1” 200 20 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:47 +0100] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /v1/catalog/service/mysql:queries?tag=alias_data HTTP/1.1” 200 2 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /qan-api/instances/dcd80f6d64e543097d6ee56e48d2acee HTTP/1.1” 200 237 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /qan-api/instances/?type=mysql&name=data&parent_uuid=a21bd52ba20d460a52e9b455f6cd4a2d HTTP/1.1” 200 301 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “PUT /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 204 - “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:48 +0100] “GET /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 200 301 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:49 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:49 +0100] “GET /qan-api HTTP/1.1” 200 133 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:49 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee HTTP/1.1” 200 564 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:50 +0100] “PUT /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 204 - “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:50 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-”
10.1.2.3 - - [04/Oct/2020:19:04:50 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-”
10.1.2.3 - - [04/Oct/2020:19:04:50 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:51 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:52 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:53 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-”
10.1.2.3 - - [04/Oct/2020:19:04:53 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-”
10.1.2.3 - - [04/Oct/2020:19:04:53 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:54 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:55 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:56 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:57 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:04:59 +0100] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1”
10.1.2.3 - - [04/Oct/2020:19:05:00 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-”
10.1.2.3 - - [04/Oct/2020:19:05:00 +0100] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-”
Inside PMM Server container, in nginx log:
172.17.0.1 - pmm [04/Oct/2020:18:04:47 +0000] “GET /qan-api/ping HTTP/1.1” 200 0 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:47 +0000] “GET /v1/status/leader HTTP/1.1” 200 16 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - - [04/Oct/2020:18:04:47 +0000] “GET /qan-api/ping HTTP/1.1” 401 172 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:47 +0000] “GET /managed/v1/version HTTP/1.1” 200 20 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:47 +0000] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /v1/catalog/service/mysql:queries?tag=alias_data HTTP/1.1” 200 2 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /v1/catalog/node/data HTTP/1.1” 200 590 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /qan-api/instances/dcd80f6d64e543097d6ee56e48d2acee HTTP/1.1” 200 237 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /qan-api/instances/?type=mysql&name=data&parent_uuid=a21bd52ba20d460a52e9b455f6cd4a2d HTTP/1.1” 200 301 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “PUT /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 204 0 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:48 +0000] “GET /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 200 301 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:49 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:49 +0000] “GET /qan-api HTTP/1.1” 200 133 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:49 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee HTTP/1.1” 200 564 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:50 +0000] “PUT /qan-api/instances/73d67e4241ba4c1e44c37ad06685b4c3 HTTP/1.1” 204 0 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:50 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-” "10.1.2.3"172.17.0.1 - pmm [04/Oct/2020:18:04:50 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:50 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:51 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:52 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:53 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-” "10.1.2.3"172.17.0.1 - pmm [04/Oct/2020:18:04:53 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:53 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:54 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:55 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:56 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:57 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:04:59 +0000] “PUT /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 31 “-” “Go-http-client/1.1” “10.1.2.3”
172.17.0.1 - pmm [04/Oct/2020:18:05:00 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd HTTP/1.1” 404 220 “-” “-” "10.1.2.3"172.17.0.1 - pmm [04/Oct/2020:18:05:00 +0000] “GET /qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log HTTP/1.1” 400 126 “-” “-” “10.1.2.3”
Looking through the commands above that work and the ones that don’t work:
https://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee
returns
{“UUID”:“dcd80f6d64e543097d6ee56e48d2acee”,“ParentUUID”:“a21bd52ba20d460a52e9b455f6cd4a2d”,“Hostname”:“data”,“Version”:“1.0.5”,“Created”:“2020-10-03T23:49:47Z”,“Deleted”:“0001-01-01T00:00:00Z”,“Links”:{“cmd”:“ws://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd”,“data”:“ws://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/data”,“log”:“ws://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/log”,“self”:"<a href=“http://pmm.shatteredsilicon.net/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee"}}">http://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee”}}
But:
https://pmm/qan-api/agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
returns a 404:
Not Found
No matching route found: /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
Inside the container in the qan-api.log:
2020/10/04 18:04:47.766 127.0.0.1 200 127.365us GET /ping
2020/10/04 18:04:48.170 127.0.0.1 200 1.372578ms GET /instances/dcd80f6d64e543097d6ee56e48d2acee
2020/10/04 18:04:48.265 127.0.0.1 200 1.647799ms GET /instances/
2020/10/04 18:04:48.343 127.0.0.1 0 1.791326ms PUT /instances/73d67e4241ba4c1e44c37ad06685b4c3
2020/10/04 18:04:48.417 127.0.0.1 200 1.065216ms GET /instances/73d67e4241ba4c1e44c37ad06685b4c3
2020/10/04 18:04:49.341 127.0.0.1 404 1.404129ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:49.389 127.0.0.1 200 69.861us GET /
2020/10/04 18:04:49.403 127.0.0.1 200 1.147961ms GET /agents/dcd80f6d64e543097d6ee56e48d2acee
2020/10/04 18:04:50.285 127.0.0.1 0 1.968151ms PUT /instances/73d67e4241ba4c1e44c37ad06685b4c3
2020/10/04 18:04:50.350 127.0.0.1 400 1.715599ms GET /agents/dcd80f6d64e543097d6ee56e48d2acee/log
2020/10/04 18:04:50.355 127.0.0.1 404 83.411us GET /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:50.417 127.0.0.1 404 1.612986ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:51.496 127.0.0.1 404 1.564227ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:52.569 127.0.0.1 404 1.643864ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:53.453 127.0.0.1 404 90.952us GET /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:53.452 127.0.0.1 400 1.48291ms GET /agents/dcd80f6d64e543097d6ee56e48d2acee/log
2020/10/04 18:04:53.639 127.0.0.1 404 1.582219ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:54.712 127.0.0.1 404 1.766631ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:55.811 127.0.0.1 404 1.801726ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:56.884 127.0.0.1 404 1.794774ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:57.956 127.0.0.1 404 1.674902ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:04:59.053 127.0.0.1 404 1.489232ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
2020/10/04 18:05:00.532 127.0.0.1 404 123.356us GET /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
So the error seems to genuinely be coming from the QAN API. I’m purely guessing that the agent creation fails here:
2020/10/04 18:04:49.341 127.0.0.1 404 1.404129ms PUT /agents/dcd80f6d64e543097d6ee56e48d2acee/cmd
but I am not sure how to troubleshoot it further. Any hints on where to look next would be gratefully received.