Skip to content

Unclean Shoutdown detected- mongo DB #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rahulprasad12 opened this issue Jun 26, 2018 · 2 comments
Closed

Unclean Shoutdown detected- mongo DB #281

rahulprasad12 opened this issue Jun 26, 2018 · 2 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@rahulprasad12
Copy link

How to Resolve this?

2018-06-26T15:37:49.751+0000 ** WARNING: --rest is specified without --httpinterface,
2018-06-26T15:37:49.751+0000 ** enabling http interface
warning: bind_ip of 0.0.0.0 is unnecessary; listens on all ips by default
2018-06-26T15:37:49.754+0000 [initandlisten] MongoDB starting : pid=2194 port=27017 dbpath=data 64-bit host=rahul-983-rahul-webdeveloper-6206876
2018-06-26T15:37:49.754+0000 [initandlisten] db version v2.6.12
2018-06-26T15:37:49.754+0000 [initandlisten] git version: d73c92b1c85703828b55c2916a5dd4ad46535f6a
2018-06-26T15:37:49.755+0000 [initandlisten] build info: Linux build5.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2018-06-26T15:37:49.755+0000 [initandlisten] allocator: tcmalloc
2018-06-26T15:37:49.755+0000 [initandlisten] options: { net: { bindIp: "0.0.0.0", http: { RESTInterfaceEnabled: true, enabled: true } }, storage: { dbPath: "data", journal: { enabled: false } } }


Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.


2018-06-26T15:37:49.755+0000 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
2018-06-26T15:37:49.755+0000 [initandlisten] dbexit:
2018-06-26T15:37:49.755+0000 [initandlisten] shutdown: going to close listening sockets...
2018-06-26T15:37:49.755+0000 [initandlisten] shutdown: going to flush diaglog...
2018-06-26T15:37:49.755+0000 [initandlisten] shutdown: going to close sockets...
2018-06-26T15:37:49.755+0000 [initandlisten] shutdown: waiting for fs preallocator...
2018-06-26T15:37:49.755+0000 [initandlisten] shutdown: closing all files...
2018-06-26T15:37:49.755+0000 [initandlisten] closeAllFiles() finished
2018-06-26T15:37:49.755+0000 [initandlisten] dbexit: really exiting now

@wglambert
Copy link

Looks like it was shutdown with a lockfile open, you should probably follow the recovery instructions.

In the Dockerfile the image runs mongod as the only process in the container, then it calls the docker-entrypoint.sh which will explicitly run any positional parameters given.

mongo/4.0-rc/Dockerfile

Lines 88 to 91 in 2dd01a0

ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 27017
CMD ["mongod"]

So given the command docker run --rm -it mongo --dbpath /data/db --repair will execute mongod --dbpath /data/db --repair as suggested by the recovery instructions.

The arguments after mongo are set as positional parameters in the docker-entrypoint.sh and then executed.

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Jun 26, 2018
@wglambert
Copy link

Closing since this seems resolved, if you have further questions there's the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

2 participants