# Pmm client container not able connect automatically once it gets restarted and query analytics

**URL:** <https://forums.percona.com/t/pmm-client-container-not-able-connect-automatically-once-it-gets-restarted-and-query-analytics/34298>\
**Category:** Percona Monitoring and Management (PMM)\
**Tags:** community, percona, mongodb\
**Created:** [October 10, 2024, 11:52am UTC](https://forums.percona.com/t/pmm-client-container-not-able-connect-automatically-once-it-gets-restarted-and-query-analytics/34298 "2024-10-10T11:52:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnu](https://avatars.discourse-cdn.com/v4/letter/v/258eb7/32.png) [@vishnu](https://forums.percona.com/u/vishnu)\
**Post date:** [October 10, 2024, 11:52am UTC](https://forums.percona.com/t/pmm-client-container-not-able-connect-automatically-once-it-gets-restarted-and-query-analytics/34298/1 "2024-10-10T11:52:44Z")

</div>

Hello  
actually iam working on pmm dashboard for MongoDB in which the pmm client is not able to reconnect once the pmm container got restarted when i check the logs iam getting

Checking  
local pmm-agent status…  
pmm-agent is not running.  
Registering pmm-agent on PMM Server…  
Failed to register pmm-agent on PMM Server: Node with name “mongodb01.info” already exists. If you want override node, use --force option.  
time=“2024-10-10T11:11:05.335+00:00” level=info msg=“‘pmm-agent setup’ exited with 1” component=entrypoint

which is not reconnecting with pmm dashboard eventhough the pmm client container has been created with pmm-server-setup=true pmm-agent-force also been used. if i try to add it manually it will get connected

in Query analytics  
ive done the profiling using mongod.conf,using cli and for particular db for permanent solution and also restarted the mongod and pmm clients still am not able to get a querys in query analytics pmm dashboard.please help me to solve this above issues

---

<div class="post-metadata">

**Author:** ![anil.joshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/anil.joshi/32/13100_2.png) [@anil.joshi](https://forums.percona.com/u/anil.joshi)\
**Post date:** [November 2, 2024, 10:23am UTC](https://forums.percona.com/t/pmm-client-container-not-able-connect-automatically-once-it-gets-restarted-and-query-analytics/34298/2 "2024-11-02T10:23:26Z")

</div>

@vishnu

It looks like you running PMM Agent/Client in a container based environment. Can you please share the **docker/container logs** along with the file generated from the below command on the client to check if there is any connection related warnings/errors there.

`shell> pmm-admin summary`  
`shell> journalctl -eu pmm-agent > agent.log`

From the Mongod node, please share the output of below command to check the profiling status ?  
`mongo> db.getProfilingStatus()`

Are you seeing those queries directly in the profiling collection as below OR in the **mongod.log** file ?

shell\> `db.system.profile.find().pretty()`

What is the PMM Server/Client version you are using ? If you remove the service and then re-add is this working fine along with the QAN ?
