# No data from client

**URL:** <https://forums.percona.com/t/no-data-from-client/8165>\
**Category:** PMM 2.x\
**Created:** [October 22, 2020, 2:30am UTC](https://forums.percona.com/t/no-data-from-client/8165 "2020-10-22T02:30:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarasx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sarasx/32/2932_2.png) [@sarasx](https://forums.percona.com/u/sarasx)\
**Post date:** [October 22, 2020, 2:30am UTC](https://forums.percona.com/t/no-data-from-client/8165/1 "2020-10-22T02:30:39Z")

</div>

I’m trying to setup MySQL monitoring, but it doesn’t seem to work.

After setting up pmm agent on the db node, the node appears on the pmm dashboard but there is no data, the only thing I’m getting is a System Information message

```auto
No pmm-agent running on this node

```

which after some time changes to correct system data (hostname, cpu, ram, etc…).  
On the db node:  
pmm-admin status

```auto
Agent ID: /agent_id/e0a6d26f-08e8-4213-abc6-f219062df39b
Node ID : /node_id/b8fd9824-5e65-4e6f-8b8e-0eceb1233c53

PMM Server:
        URL : https://localhost:11443/ (NOTE: this is an ssh tunnel)
        Version: 2.11.1

PMM Client:
        Connected : true
        Time drift : 1.280067ms
        Latency : 1.978329ms
        pmm-admin version: 2.11.1
        pmm-agent version: 2.11.1
Agents:
        /agent_id/4b05f2a7-bbac-4cff-b1a6-6a9bc6cbee05 mysql_perfschema_agent Running
        /agent_id/91da16f9-c8d0-41ee-97c3-d62df282c5cc node_exporter Running
        /agent_id/b57a494a-fee7-4c3d-95f4-f498468d67fa mysqld_exporter Running

```

pmm-admin list

```auto
Service type Service name Address and port Service ID
MySQL myServiceName 127.0.0.1:3306 /service_id/8c508bf3-bdd8-4971-b519-1b5cb0e7f113

Agent type Status Agent ID Service ID
pmm_agent Connected /agent_id/e0a6d26f-08e8-4213-abc6-f219062df39b
node_exporter Running /agent_id/91da16f9-c8d0-41ee-97c3-d62df282c5cc
mysqld_exporter Running /agent_id/b57a494a-fee7-4c3d-95f4-f498468d67fa /service_id/8c508bf3-bdd8-4971-b519-1b5cb0e7f113
mysql_perfschema_agent Running /agent_id/4b05f2a7-bbac-4cff-b1a6-6a9bc6cbee05 /service_id/8c508bf3-bdd8-4971-b519-1b5cb0e7f113

```

pmm can be seen performing queries on the database every few seconds

what logs should i attach?

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [October 22, 2020, 4:34am UTC](https://forums.percona.com/t/no-data-from-client/8165/2 "2020-10-22T04:34:02Z")

</div>

Hi Sarasx,

Could you perform next command on the monitor node?

```auto
curl -k -s -u pmm:/agent_id/b57a494a-fee7-4c3d-95f4-f498468d67fa http://127.0.0.1:42001/metrics

```

Also please check if it’s possible to get metrics on pmm-server directly by the same command. But please replace 127.0.0.1 by node’s IP.

---

<div class="post-metadata">

**Author:** ![sarasx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sarasx/32/2932_2.png) [@sarasx](https://forums.percona.com/u/sarasx)\
**Post date:** [October 22, 2020, 4:46am UTC](https://forums.percona.com/t/no-data-from-client/8165/3 "2020-10-22T04:46:07Z")

</div>

Output on db node

```auto
curl -k -u pmm:/agent_id/b57a494a-fee7-4c3d-95f4-f498468d67fa http://127.0.0.1:42001/metrics
curl: (7) Failed to connect to 127.0.0.1 port 42001: Connection refused

```

I removed -s to see error output, same on pmm-server

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [October 22, 2020, 9:41am UTC](https://forums.percona.com/t/no-data-from-client/8165/4 "2020-10-22T09:41:36Z")

</div>

Just please make sure that it’s correct port that is used by mysqld\_exporter

If port is really 42001 then access to this port is rejected on your node.

 ![Screenshot_20201022_180343.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/125c0657ab974ff77ed0fca915588cb894ce0e72.png)

---

<div class="post-metadata">

**Author:** ![sarasx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sarasx/32/2932_2.png) [@sarasx](https://forums.percona.com/u/sarasx)\
**Post date:** [October 23, 2020, 1:02am UTC](https://forums.percona.com/t/no-data-from-client/8165/5 "2020-10-23T01:02:53Z")

</div>

Here’s the output

```auto
root 10741 0.0 0.1 716036 46560 ? Sl Oct21 0:06 /usr/local/percona/pmm2/exporters/mysqld_exporter --collect.auto_increment.columns --collect.binlog_size --collect.custom_query.hr --collect.custom_query.hr.directory=/usr/local/percona/pmm2/collectors/custom-queries/mysql/high-resolution --collect.custom_query.lr --collect.custom_query.lr.directory=/usr/local/percona/pmm2/collectors/custom-queries/mysql/low-resolution --collect.custom_query.mr --collect.custom_query.mr.directory=/usr/local/percona/pmm2/collectors/custom-queries/mysql/medium-resolution --collect.engine_innodb_status --collect.engine_tokudb_status --collect.global_status --collect.global_variables --collect.heartbeat --collect.info_schema.clientstats --collect.info_schema.innodb_cmp --collect.info_schema.innodb_cmpmem --collect.info_schema.innodb_metrics --collect.info_schema.innodb_tablespaces --collect.info_schema.processlist --collect.info_schema.query_response_time --collect.info_schema.tables --collect.info_schema.tablestats --collect.info_schema.userstats --collect.perf_schema.eventsstatements --collect.perf_schema.eventswaits --collect.perf_schema.file_events --collect.perf_schema.file_instances --collect.perf_schema.indexiowaits --collect.perf_schema.tableiowaits --collect.perf_schema.tablelocks --collect.slave_status --collect.standard.go --collect.standard.process --exporter.conn-max-lifetime=55s --exporter.global-conn-pool --exporter.max-idle-conns=3 --exporter.max-open-conns=3 --web.listen-address=:42002

```

particullary

```auto
--web.listen-address=:42002

```

Running

```auto
curl -k -u pmm:/agent_id/b57a494a-fee7-4c3d-95f4-f498468d67fa http://127.0.0.1:42002/metrics

```

on the db node gives output `(mysql_perf_schema_file_instances_bytes{event_name="wait/io/file/innodb/innodb_data_file",file_name="<redacted>",mode="read"} 4.01408e+06 and so on)`, same on pmm-server when runnin with node IP

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [October 23, 2020, 4:39am UTC](https://forums.percona.com/t/no-data-from-client/8165/6 "2020-10-23T04:39:14Z")

</div>

So pmm-server is able to fetch metrics from the db node.

But no data are displayed on mysql dashboards. Am I right?

Could you check targets states for this mysqld\_exporter on Prometheus UI?

[https://your-pmm-server/prometheus/targets](https://your-pmm-server/prometheus/targets)

e.g.

 ![Screenshot_20201023_130638.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/956ef7b0bdef4f7dcf95cc1d4b39465213cb04ee.png)

---

<div class="post-metadata">

**Author:** ![sarasx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sarasx/32/2932_2.png) [@sarasx](https://forums.percona.com/u/sarasx)\
**Post date:** [October 23, 2020, 5:10am UTC](https://forums.percona.com/t/no-data-from-client/8165/7 "2020-10-23T05:10:15Z")

</div>

> So pmm-server is able to fetch metrics from the db node.
> 
> But no data are displayed on mysql dashboards. Am I right?

Yes

It seems pmm-server thinks the DB node is on localhost.

The node was registered running the following command on the node:

```auto
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:<password>@localhost:11443

```

The db node can’t talk directly with the pmm-server and has to go throught an ssh tunnel, but the pmm-server can talk to the node.

 ![prometheus targets.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/3603b49eeb0e47fdb95acff2ae7f1b5d42c3ddde.png)

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [October 23, 2020, 6:51am UTC](https://forums.percona.com/t/no-data-from-client/8165/8 "2020-10-23T06:51:36Z")

</div>

The script couldn’t correctly detect your node IP.

Please specify it in configuration command.

e.g.

```auto
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:<password>@localhost:11443 172.17.0.1 generic mynode1

```

---

<div class="post-metadata">

**Author:** ![sarasx](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sarasx/32/2932_2.png) [@sarasx](https://forums.percona.com/u/sarasx)\
**Post date:** [October 23, 2020, 7:09am UTC](https://forums.percona.com/t/no-data-from-client/8165/9 "2020-10-23T07:09:23Z")

</div>

After reruning pmm-admin config with an IP parameter and rerunning pmm-admin add mysql I’m getting data

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [October 23, 2020, 1:55pm UTC](https://forums.percona.com/t/no-data-from-client/8165/10 "2020-10-23T13:55:06Z")

</div>

just for anyone that stumbles on this across the internet you can run pmm-admin config --help or pmm-admin add \<mysql|postgresql|mongodb\> --help and see what we autodetected as the IP of the system, if you don’t specify that positional argument, we’ll default to what we detected. It’s on our roadmap to enhance that or at least make it more obvious what we will use.
