Skip to content
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

mongodb unable to start #8

Open
gordonthree opened this issue Jun 22, 2018 · 1 comment
Open

mongodb unable to start #8

gordonthree opened this issue Jun 22, 2018 · 1 comment

Comments

@gordonthree
Copy link

hello,

I'm just testing out this image for a future project, and running into trouble getting it to launch properly.

I'm not using a Synology, instead running docker under Fedora 28 on a HPE Proliant Microserver.

I've run into an issue where the container never fully starts, it seems stuck in a loop trying to start mongodb. Here's a little snippet from the console:

I also attached a copy of "run.sh" , renamed a little...

Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] MongoDB starting : pid=8948 port=27017 dbpath=/var/lib/mongodb 64-bit host=7e473a75ec8f
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] db version v2.6.10
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] git version: nogitversion
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] allocator: tcmalloc
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "syslog" } }
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] dbexit:
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: going to close listening sockets...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: going to flush diaglog...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: going to close sockets...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: waiting for fs preallocator...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: lock for final commit...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: final commit...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: closing all files...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] closeAllFiles() finished
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] shutdown: removing fs lock...
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor
Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] dbexit: really exiting now

run-unifi-video.txt

Here's the directory tree, created as described in your instructions
[gordon@microserver ~]$ tree -d Applications/
Applications/
└── unifi-video
├── log
├── mongodb
└── unifi-video
└── logs

5 directories

@exsilium
Copy link
Owner

Hi!

Jun 22 13:34:58 7e473a75ec8f mongod.27017[8948]: [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /var/lib/mongodb/mongod.lock errno:13 Permission denied Is a mongod instance already running?, terminating

The /var/lib/mongodb is a mapped Host Data Volume directory which is the Applications/mongodb directory that you have created. However, it seems that the docker daemon doesn't have the required access rights to write to that directory. Make sure that whichever user the docker daemon is running as (most probably a separate user called "docker") has the required access rights to write to Applications/mongodb

I hope this helps.

Cheers! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants