We couldn't kill mongod process, and tried a lot.
See original GitHub issueHere are the details - please ask me if there’s more information that’s required, thanks:
With libraries:
embed.mongo: 2.1.1
embed.process: 2.0.5
On Ubuntu server:
uname -a
Linux etb3 4.15.0-1035-azure #36~16.04.1-Ubuntu SMP Fri Nov 30 15:25:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
with ulimits:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 64083
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 64083
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Build log:
[mongod output] 2018-12-07T11:25:36.639+0000 I NETWORK [conn2] end connection 127.0.0.1:58080 (0 connections now open)
[mongod output] 2018-12-07 11:25:36,650 INFO i.c.networkmap.storage.EmbeddedMongo - manual shutdown in progress
2018-12-07T11:25:36.651+0000 I NETWORK [listener] connection accepted from 127.0.0.1:58104 #3 (1 connection now open)
[mongod output] 2018-12-07 11:25:36,655 ERROR d.f.embed.mongo.runtime.Mongod - Got some response, should be an error message
2018-12-07T11:25:36.655+0000 I NETWORK [conn3] end connection 127.0.0.1:58104 (0 connections now open)
[mongod output] 2018-12-07 11:25:36,755 WARN d.f.embed.mongo.AbstractMongoProcess - could not stop mongod with db command, try next
2018-12-07T11:25:36.758+0000 I CONTROL [signalProcessingThread] got signal 2 (Interrupt), will terminate after current cmd ends
[mongod output] 2018-12-07T11:25:36.758+0000 I NETWORK [signalProcessingThread] shutdown: going to close listening sockets...
[mongod output] 2018-12-07T11:25:36.758+0000 I NETWORK [signalProcessingThread] removing socket file: /tmp/mongodb-44059.sock
[mongod output] 2018-12-07T11:25:36.758+0000 I FTDC [signalProcessingThread] Shutting down full-time diagnostic data capture
[mongod output] 2018-12-07T11:25:36.760+0000 I STORAGE [signalProcessingThread] WiredTigerKVEngine shutting down
[mongod output] Exception in thread "vert.x-eventloop-thread-8" java.lang.IllegalStateException: Couldn't kill mongod process!
----------------------------------------------------
Something bad happend. We couldn't kill mongod process, and tried a lot.
If you want this problem solved you can help us if you open a new issue.
Follow this link:
https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues
Thank you:)
----------------------------------------------------
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
We couldn't kill mongod process, and tried a lot. - - Bountysource
We couldn't kill mongod process, and tried a lot. ... embed.mongo: 2.1.1 embed.process: 2.0.5. On Ubuntu server: uname -a Linux etb3 4.15.0-1035-azure ...
Read more >High CPU usage on Mongo server, but Mongo seems to be idle
Setup: We are running MongoDB in version 4.2.13. Replica set, primary and two replicas. Servers have 4 CPUs and 16 gb of RAM...
Read more >Can I just kill mongod to stop mongo? - Stack Overflow
I am running two mongod processes from the command line. If I need to stop the mongod processes I just execute kill <pid...
Read more >Eagle mongodb test case failed in develop branch - The Mail Archive
We couldn't kill mongod process, and tried a lot. If you want this problem solved you can help us if you open a...
Read more >Spring Boot Embedded MongoDB with Support for Transactions
Destroy method 'stop' on bean with name 'embeddedMongoServer' threw an // exception: java.lang.IllegalStateException: Couldn't kill mongod process!
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am having the exact same issue as @ptempes.
We configure embedmongo to use a replicaset (single server) in order to test transactional methods with mongodb 4.0. We are doing it similar to this https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/257#issuecomment-407770356
Almost every time we encounter this error message on shutdown.
The
extractmongod
process does go away almost immediately after the error message appears, so perhaps this is a timing issue. I can get the error message to go away by increasing thestopTimeoutInMillis()
setting onMongoConfigBuilder
. Increasing it by one second (six seconds instead of the default of five seconds) is enough for us.I am wondering though, why does it take so long to shutdown when using the single node replica set? Perhaps there is something else that needs to be done in order to shutdown the replicaset cleanly?
Unfortunately, the
ProcessControl
class closes the output streams before issuing the shutdown command (ProcessControl.closeIoAndDestroy()
) so I can’t even debug this to see where it is hanging.Doing a little research into the mongodb wire format, I figured out how to add the
timeoutSecs: 0
option. ChangingSHUTDOWN_COMMAND
to the following fixes the issue for me: