# PMM Server /ping Bad Gateway

**URL:** <https://forums.percona.com/t/pmm-server-ping-bad-gateway/7314>\
**Category:** PMM 1.x\
**Created:** [November 26, 2019, 8:21am UTC](https://forums.percona.com/t/pmm-server-ping-bad-gateway/7314 "2019-11-26T08:21:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@Patrick](https://forums.percona.com/u/Patrick)\
**Post date:** [November 26, 2019, 8:21am UTC](https://forums.percona.com/t/pmm-server-ping-bad-gateway/7314/1 "2019-11-26T08:21:07Z")

</div>

We have a PMM server instance (v1.17.2) running as a docker container on an EC2 instance. Unfortunately, we have some issues regarding linux metrics. It seems to be the case that the PMM server is misconfigured, but I’m unfortunately unable to find the exact issue.

The web dashboard is working fine, registering new client with pmm-admin add also works without problems. But when running pmm-admin check-network on the clients, we get the following message:

```auto
[B]* Connection: Client <-- Server[/B]

-------------- -------- ----------------- ------- ---------- ---------

SERVICE TYPE NAME REMOTE ENDPOINT STATUS HTTPS/TLS PASSWORD 

-------------- -------- ----------------- ------- ---------- ---------

linux:metrics worker1 <ip>:42000 [B]DOWN[/B] [B]YES[/B] [B]YES[/B]

```

AWS SG are setup correctly. Interesstincly, when calling

```auto
curl http://pmm-server-ip/ping

```

we get a

```auto
502 Bad Gateway

```

Also, when running

```auto
pmm-admin list

```

on the client it shows the service linux metrics as running, but also displays

```auto
Error getting a list of external metrics: status code 502 (text/html).

Please check versions of your PMM Server and PMM Client.

```

I’ve check the containers nginx

```auto
cat /var/log/nginx/error.log

```

which shows a lot of error messages like this one:

```auto
2019/11/26 10:54:55 [error] 155#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: _, request: "GET /qan-api/ HTTP/1.1", upstream: "http://127.0.0.1:9001/", host: "127.0.0.1"

```

What is going on here? Is the server misconfigured? Thanks in advance for anyone helping out!
