[SERVER-28027] mongod service keeps running even after packages get removed on Debian/Ubuntu Created: 16/Feb/17  Updated: 17/Feb/17  Resolved: 17/Feb/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Hrvoje Matijakovic Assignee: Mark Agarunov
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-28035 Debian Jessie systemd service not han... Closed
Operating System: ALL
Participants:

 Description   

After removing packages on Ubuntu Xenial mongod service is still running:

Installed packages:

oot@xenial:~# dpkg -l | grep mongo
ii  mongodb-org                        3.4.2                              amd64        MongoDB open source document-oriented database system (metapackage)
ii  mongodb-org-mongos                 3.4.2                              amd64        MongoDB sharded cluster query router
ii  mongodb-org-server                 3.4.2                              amd64        MongoDB database server
ii  mongodb-org-shell                  3.4.2                              amd64        MongoDB shell client
ii  mongodb-org-tools                  3.4.2                              amd64        MongoDB tools

Removing packages:

root@xenial:~# apt-get remove mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 269 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 37889 files and directories currently installed.)
Removing mongodb-org (3.4.2) ...
Removing mongodb-org-mongos (3.4.2) ...
Removing mongodb-org-server (3.4.2) ...
Removing mongodb-org-shell (3.4.2) ...
Removing mongodb-org-tools (3.4.2) ...
Processing triggers for man-db (2.7.5-1) ...

Binaries are removed but service is still running:

root@xenial:~# mongo
-su: /usr/bin/mongo: No such file or directory
root@xenial:~# ps auxww| grep mongo
mongodb  21807  0.5  3.2 273468 66904 ?        Ssl  16:18   0:00 /usr/bin/mongod --quiet --config /etc/mongod.conf
root     22856  0.0  0.0  14224   984 pts/0    S+   16:21   0:00 grep --color=auto mongo



 Comments   
Comment by Mark Agarunov [ 17/Feb/17 ]

Hello hmatijak,

Thank you for the report. Looking over the provided output, this appears to be a duplicate of SERVER-28035, which you can check for future updates on the progress of this issue.

Thanks,
Mark

Comment by Hrvoje Matijakovic [ 16/Feb/17 ]

works ok on Trusty:

root@trusty:~# apt-get remove -y mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
  mongodb-org-tools
0 upgraded, 0 newly installed, 5 to remove and 54 not upgraded.
After this operation, 270 MB disk space will be freed.
(Reading database ... 35336 files and directories currently installed.)
Removing mongodb-org (3.4.2) ...
Removing mongodb-org-mongos (3.4.2) ...
Removing mongodb-org-server (3.4.2) ...
mongod stop/waiting
Removing mongodb-org-shell (3.4.2) ...
Removing mongodb-org-tools (3.4.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
root@trusty:~# ps auxww | grep mongo
root     11484  0.0  0.0  11740   940 pts/1    S+   19:34   0:00 grep --color=auto mongo
root@trusty:~#

so probably systemd issue?

Comment by Hrvoje Matijakovic [ 16/Feb/17 ]

Debian Jessie:

root@jessie:~# dpkg -l | grep mongo
ii  mongodb-org                    3.4.2                       amd64        MongoDB open source document-oriented database system (metapackage)
ii  mongodb-org-mongos             3.4.2                       amd64        MongoDB sharded cluster query router
ii  mongodb-org-server             3.4.2                       amd64        MongoDB database server
ii  mongodb-org-shell              3.4.2                       amd64        MongoDB shell client
ii  mongodb-org-tools              3.4.2                       amd64        MongoDB tools
root@jessie:~# apt-get remove -y mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  mongodb-org-mongos
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 0 newly installed, 4 to remove and 67 not upgraded.
After this operation, 239 MB disk space will be freed.
(Reading database ... 32581 files and directories currently installed.)
Removing mongodb-org (3.4.2) ...
Removing mongodb-org-server (3.4.2) ...
Removing mongodb-org-shell (3.4.2) ...
Removing mongodb-org-tools (3.4.2) ...
Processing triggers for man-db (2.7.0.2-5) ...
root@jessie:~# ps auxww | grep mongo
mongodb   1887  0.5  6.0 272984 61508 ?        Ssl  16:38   0:00 /usr/bin/mongod --quiet --config /etc/mongod.conf
root      2135  0.0  0.2  12728  2144 pts/0    S+   16:39   0:00 grep mongo

Generated at Thu Feb 08 04:16:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.