exsilium / docker-unifi-video

Dockerized Ubiquiti Unifi Video Controller software (v3.10.13). Mainly intended to be ran within MacOS
15 stars 9 forks source link

mongodb unable to start #8

Open gordonthree opened 6 years ago

gordonthree commented 6 years ago

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 commented 6 years ago

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! :beers: