Ubuntu 16.04.2 — MongoDB 未安装,但 2 个 mongod 进程占用了 RAM

Ubuntu 16.04.2 — MongoDB 未安装,但 2 个 mongod 进程占用了 RAM

我正在运行一个我一直在玩的 Ubuntu 16.04.2 安装版(Landscape、Juju、LXD)。最近几天,我重启后,系统(i7 5820K,16Gb DDR4)就会停止运行。Glances 和 gnome-system-monitor 显示两个进程,都属于 root,名为 mongod,每个进程都消耗了近 6 GB 的 RAM。

我使用了很多 Firefox 标签,这意味着我的内存使用量接近 100%,并且由于使用交换文件,速度急剧变慢。

sudo killall mongod不会终止进程。只有运行才会sudo pkill [PID]真正终止它们,即使在那之后,有时这两个进程又会恢复,尽管这次每个进程仅使用大约 30Mb 的 RAM。

另外,我还没有安装 MongoDB 或任何相关的东西。运行apt autoremove使用时*mongo*显示没有安装任何内容。

我很好奇 Juju 是否与此有关,所以我卸载了所有与 Juju 和 Landscape 相关的程序。但是,此后我重启了几次,这些进程仍然存在。

以下证明我的系统上没有安装任何与 Juju 或 MongoDB 相关的东西:

snyper@machine1:~$ sudo apt autoremove *mongo*
[sudo] password for snyper: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'jmeter-mongodb' for glob '*mongo*'
Note, selecting 'python-mongoengine' for glob '*mongo*'
Note, selecting 'mongodb' for glob '*mongo*'
Note, selecting 'ruby-mongo' for glob '*mongo*'
Note, selecting 'python2.7-pymongo' for glob '*mongo*'
Note, selecting 'python3-pymongo-ext' for glob '*mongo*'
Note, selecting 'python-mongoengine-doc' for glob '*mongo*'
Note, selecting 'juju-mongodb2.6' for glob '*mongo*'
Note, selecting 'juju-mongo-tools3.2' for glob '*mongo*'
Note, selecting 'juju-mongodb3.2' for glob '*mongo*'
Note, selecting 'libmongodb-perl' for glob '*mongo*'
Note, selecting 'libmongodbx-class-perl' for glob '*mongo*'
Note, selecting 'libcatmandu-store-mongodb-perl' for glob '*mongo*'
Note, selecting 'python3-mongoengine' for glob '*mongo*'
Note, selecting 'libmongo-client0' for glob '*mongo*'
Note, selecting 'python2.7-pymongo-ext' for glob '*mongo*'
Note, selecting 'python3-pymongo' for glob '*mongo*'
Note, selecting 'ruby-em-mongo' for glob '*mongo*'
Note, selecting 'mongodb-server' for glob '*mongo*'
Note, selecting 'libmongo-client0-dbg' for glob '*mongo*'
Note, selecting 'libmongoc-1.0-0' for glob '*mongo*'
Note, selecting 'python2.7-mongoengine' for glob '*mongo*'
Note, selecting 'libmongo-client-dev' for glob '*mongo*'
Note, selecting 'libmongo-client-doc' for glob '*mongo*'
Note, selecting 'php-mongo' for glob '*mongo*'
Note, selecting 'php-horde-mongo' for glob '*mongo*'
Note, selecting 'libmongoc-dbg' for glob '*mongo*'
Note, selecting 'libmongoc-dev' for glob '*mongo*'
Note, selecting 'libmongoc-doc' for glob '*mongo*'
Note, selecting 'juju-mongodb' for glob '*mongo*'
Note, selecting 'syslog-ng-mod-mongodb' for glob '*mongo*'
Note, selecting 'python-pymongo-doc' for glob '*mongo*'
Note, selecting 'python-pymongo' for glob '*mongo*'
Note, selecting 'mongodb-clients' for glob '*mongo*'
Note, selecting 'python-pymongo-ext' for glob '*mongo*'
Note, selecting 'puppet-module-puppetlabs-mongodb' for glob '*mongo*'
Note, selecting 'libmongodb-java' for glob '*mongo*'
Note, selecting 'php-mongodb' for glob '*mongo*'
Note, selecting 'php-doctrine-mongodb-odm' for glob '*mongo*'
Package 'php-doctrine-mongodb-odm' is not installed, so not removed
Package 'php-horde-mongo' is not installed, so not removed
Package 'php-mongo' is not installed, so not removed
Note, selecting 'python-mongoengine' instead of 'python2.7-mongoengine'
Note, selecting 'python-pymongo' instead of 'python2.7-pymongo'
Note, selecting 'python-pymongo-ext' instead of 'python2.7-pymongo-ext'
Package 'python-pymongo-doc' is not installed, so not removed
Package 'python3-pymongo' is not installed, so not removed
Package 'python3-pymongo-ext' is not installed, so not removed
Package 'jmeter-mongodb' is not installed, so not removed
Package 'juju-mongo-tools3.2' is not installed, so not removed
Package 'juju-mongodb' is not installed, so not removed
Package 'juju-mongodb2.6' is not installed, so not removed
Package 'libcatmandu-store-mongodb-perl' is not installed, so not removed
Package 'libmongo-client-dev' is not installed, so not removed
Package 'libmongo-client-doc' is not installed, so not removed
Package 'libmongo-client0' is not installed, so not removed
Package 'libmongo-client0-dbg' is not installed, so not removed
Package 'libmongoc-1.0-0' is not installed, so not removed
Package 'libmongoc-dbg' is not installed, so not removed
Package 'libmongoc-dev' is not installed, so not removed
Package 'libmongoc-doc' is not installed, so not removed
Package 'libmongodb-java' is not installed, so not removed
Package 'libmongodb-perl' is not installed, so not removed
Package 'libmongodbx-class-perl' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-clients' is not installed, so not removed
Package 'mongodb-server' is not installed, so not removed
Package 'php-mongodb' is not installed, so not removed
Package 'puppet-module-puppetlabs-mongodb' is not installed, so not removed
Package 'python-mongoengine' is not installed, so not removed
Package 'python-mongoengine-doc' is not installed, so not removed
Package 'python-pymongo' is not installed, so not removed
Package 'python-pymongo-ext' is not installed, so not removed
Package 'python3-mongoengine' is not installed, so not removed
Package 'ruby-em-mongo' is not installed, so not removed
Package 'ruby-mongo' is not installed, so not removed
Package 'syslog-ng-mod-mongodb' is not installed, so not removed
Package 'juju-mongodb3.2' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

snyper@machine1:~$ sudo apt autoremove *juju*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'juju2' for glob '*juju*'
Note, selecting 'juju-deployer' for glob '*juju*'
Note, selecting 'juju-1' for glob '*juju*'
Note, selecting 'python3-jujuclient' for glob '*juju*'
Note, selecting 'juju-1-default' for glob '*juju*'
Note, selecting 'juju-mongodb2.6' for glob '*juju*'
Note, selecting 'juju-mongo-tools3.2' for glob '*juju*'
Note, selecting 'juju-mongodb3.2' for glob '*juju*'
Note, selecting 'golang-juju-loggo-dev' for glob '*juju*'
Note, selecting 'python-jujubundlelib' for glob '*juju*'
Note, selecting 'juju-core2' for glob '*juju*'
Note, selecting 'juju-local' for glob '*juju*'
Note, selecting 'python3-jujubundlelib' for glob '*juju*'
Note, selecting 'python-txjuju' for glob '*juju*'
Note, selecting 'juju-1.25' for glob '*juju*'
Note, selecting 'juju-core' for glob '*juju*'
Note, selecting 'juju-2.0' for glob '*juju*'
Note, selecting 'juju-mongodb' for glob '*juju*'
Note, selecting 'golang-github-juju-loggo-dev' for glob '*juju*'
Note, selecting 'golang-github-juju-ratelimit-dev' for glob '*juju*'
Note, selecting 'juju' for glob '*juju*'
Note, selecting 'python-jujuclient' for glob '*juju*'
Note, selecting 'juju-local-kvm' for glob '*juju*'
Package 'juju2' is not installed, so not removed
Note, selecting 'juju-1.25' instead of 'juju-1'
Package 'juju-core2' is not installed, so not removed
Package 'golang-juju-loggo-dev' is not installed, so not removed
Package 'golang-github-juju-loggo-dev' is not installed, so not removed
Package 'golang-github-juju-ratelimit-dev' is not installed, so not removed
Package 'juju-deployer' is not installed, so not removed
Package 'juju-mongo-tools3.2' is not installed, so not removed
Package 'juju-mongodb' is not installed, so not removed
Package 'juju-mongodb2.6' is not installed, so not removed
Package 'python-jujubundlelib' is not installed, so not removed
Package 'python3-jujubundlelib' is not installed, so not removed
Package 'juju-1-default' is not installed, so not removed
Package 'juju-1.25' is not installed, so not removed
Package 'juju-core' is not installed, so not removed
Package 'juju-local' is not installed, so not removed
Package 'juju-local-kvm' is not installed, so not removed
Package 'juju-mongodb3.2' is not installed, so not removed
Package 'python-jujuclient' is not installed, so not removed
Package 'python3-jujuclient' is not installed, so not removed
Package 'juju' is not installed, so not removed
Package 'juju-2.0' is not installed, so not removed
Package 'python-txjuju' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

我真的很困惑为什么会发生这种情况,以及如何从我的系统中删除导致这种情况的原因。

答案1

解决这个问题很简单。conjure-up部署了几个 LXC 容器供 Juju 使用,这些容器在启动时运行,并包含mongod占用我 RAM 的进程。

为了修复这个问题,我们用 列出现有的容器lxc list

然后我们用以下方法阻止它们lxc stop [containername]

并使用lxc delete [containername]

现在我们的问题已经解决了。

相关内容