# Mongodb node getting uregistred

**URL:** <https://forums.percona.com/t/mongodb-node-getting-uregistred/35904>\
**Category:** PMM 2.x\
**Created:** [December 31, 2024, 11:45am UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904 "2024-12-31T11:45:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pramod\_Kumar\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pramod_kumar_gupta/32/19488_2.png) [@Pramod\_Kumar\_Gupta](https://forums.percona.com/u/Pramod_Kumar_Gupta)\
**Post date:** [December 31, 2024, 11:45am UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/1 "2024-12-31T11:45:50Z")

</div>

I am running percona client in a container. Nodes are getting unregistred after i restart the client .

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [January 2, 2025, 2:45pm UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/2 "2025-01-02T14:45:52Z")

</div>

Hi, please provide the steps you are taking and the expected result along with more details about exactly what problem you are seeing. Are nodes visible in PMM inventory page?

---

<div class="post-metadata">

**Author:** ![Pramod\_Kumar\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pramod_kumar_gupta/32/19488_2.png) [@Pramod\_Kumar\_Gupta](https://forums.percona.com/u/Pramod_Kumar_Gupta)\
**Post date:** [January 3, 2025, 6:11am UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/3 "2025-01-03T06:11:07Z")

</div>

I have launched the client in container . If the client gets restarted it reiniliazes and nodes get unregistred

---

<div class="post-metadata">

**Author:** ![Abhinav\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/abhinav_gupta/32/6262_2.png) [@Abhinav\_Gupta](https://forums.percona.com/u/Abhinav_Gupta)\
**Post date:** [January 3, 2025, 2:28pm UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/4 "2025-01-03T14:28:52Z")

</div>

Hi Pramod, As requested by Ivan earlier, we will need these details (including command and logs) to troubleshoot it better. Please provide us with those details, like what command you used to register the PMM client? Also, please share the command output (pmm status/inventory status list, etc.) to understand it better.

---

<div class="post-metadata">

**Author:** ![Pramod\_Kumar\_Gupta](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/pramod_kumar_gupta/32/19488_2.png) [@Pramod\_Kumar\_Gupta](https://forums.percona.com/u/Pramod_Kumar_Gupta)\
**Post date:** [January 6, 2025, 1:16pm UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/5 "2025-01-06T13:16:17Z")

</div>

so i already have mongo cluster running inside docker  
i am using this docker compose file to run client

version: ‘3.9’

networks:  
perconNetwork:  
name: perconNetwork  
driver: bridge

services:  
mongo-1-pmm-client:  
image: percona/pmm-client:2  
container\_name: mongo-1-pmm-client  
environment:  
PMM\_AGENT\_SERVER\_ADDRESS: pmm-server  
PMM\_AGENT\_SERVER\_USERNAME: admin  
PMM\_AGENT\_SERVER\_PASSWORD: pramod # Password set to “pramod”  
PMM\_AGENT\_SERVER\_INSECURE\_TLS: ‘1’  
PMM\_AGENT\_SETUP: ‘1’  
PMM\_AGENT\_CONFIG\_FILE: config/pmm-agent.yaml  
PMM\_AGENT\_PRERUN\_SCRIPT: “pmm-admin status --wait=10s; pmm-admin add mongodb --username=pmm --password=pmm --host=mongo1 mongo1 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000”

```
volumes:
  - pmm-client-data-1:/srv
restart: always
networks:
  - perconNetwork

```

mongo-2-pmm-client:  
image: percona/pmm-client:2  
container\_name: mongo-2-pmm-client  
environment:  
PMM\_AGENT\_SERVER\_ADDRESS: pmm-server  
PMM\_AGENT\_SERVER\_USERNAME: admin  
PMM\_AGENT\_SERVER\_PASSWORD: pramod # Password set to “pramod”  
PMM\_AGENT\_SERVER\_INSECURE\_TLS: ‘1’  
PMM\_AGENT\_SETUP: ‘1’  
PMM\_AGENT\_CONFIG\_FILE: config/pmm-agent.yaml  
PMM\_AGENT\_PRERUN\_SCRIPT: “pmm-admin status --wait=10s; pmm-admin add mongodb --username=pmm --password=pmm --host=mongo2 mongo2 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000”

```
volumes:
  - pmm-client-data-2:/srv
restart: always
networks:
  - perconNetwork

```

mongo-3-pmm-client:  
image: percona/pmm-client:2  
container\_name: mongo-3-pmm-client  
environment:  
PMM\_AGENT\_SERVER\_ADDRESS: pmm-server  
PMM\_AGENT\_SERVER\_USERNAME: admin  
PMM\_AGENT\_SERVER\_PASSWORD: pramod # Password set to “pramod”  
PMM\_AGENT\_SERVER\_INSECURE\_TLS: ‘1’  
PMM\_AGENT\_SETUP: ‘1’  
PMM\_AGENT\_CONFIG\_FILE: config/pmm-agent.yaml  
PMM\_AGENT\_PRERUN\_SCRIPT: “pmm-admin status --wait=10s; pmm-admin add mongodb --username=pmm --password=pmm --host=mongo3 mongo3 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000”

```
volumes:
  - pmm-client-data-3:/srv
restart: always
networks:
  - perconNetwork

```

volumes:  
pmm-client-data-1:  
driver: local  
pmm-client-data-2:  
driver: local  
pmm-client-data-3:  
driver: local

Now if the if start the client it fialis to restart showing the error  
node already exists.  
So in order to restart the i need to remove it manually from server then i am able restart the client.  
Also if my host gets restarted client get in restarting stage automatically beacuse of this issue  
is there nay solution to this .

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [January 15, 2025, 11:17am UTC](https://forums.percona.com/t/mongodb-node-getting-uregistred/35904/6 "2025-01-15T11:17:54Z")

</div>

Hi, given that you are trying to add the service each time the container starts, your config needs to include

```auto
PMM_AGENT_SETUP_FORCE: 1

```
