Error while restarting Mongodb - mongodb

I tried to restart MongoDB on my server, but I got an error. The error log:
2018-05-24T12:22:08.308+0200 I CONTROL [main] ***** SERVER RESTARTED *****
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] MongoDB starting : pid=13662 port=27017 dbpath=/var/lib/mongodb 64-bit host=Challenger
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] db version v3.6.5
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] git version: a20ecd3e3a174162052ff99913bc2ca9a839d618
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] allocator: tcmalloc
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] modules: none
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] build environment:
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] distmod: ubuntu1604
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] distarch: x86_64
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] target_arch: x86_64
2018-05-24T12:22:08.422+0200 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongodb",$
2018-05-24T12:22:08.424+0200 I - [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-05-24T12:22:08.424+0200 I STORAGE [initandlisten]
2018-05-24T12:22:08.424+0200 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-05-24T12:22:08.424+0200 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-05-24T12:22:08.424+0200 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),cache_cursors=false,log=(enabled=true,ar$
2018-05-24T12:22:09.379+0200 E STORAGE [initandlisten] WiredTiger error (1) [1527157329:379309][13662:0x7f6ea10839c0], file:WiredTiger.wt, connection: /var/lib/mongodb/WiredTiger.wt: handle-open: open: Operation not permitted
2018-05-24T12:22:09.380+0200 E - [initandlisten] Assertion: 28595:1: Operation not permitted src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 416
2018-05-24T12:22:09.402+0200 I STORAGE [initandlisten] exception in initAndListen: Location28595: 1: Operation not permitted, terminating
2018-05-24T12:22:09.402+0200 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2018-05-24T12:22:09.402+0200 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2018-05-24T12:22:09.402+0200 I CONTROL [initandlisten] now exiting
2018-05-24T12:22:09.402+0200 I CONTROL [initandlisten] shutting down with code:100
can anyone tell me what the bug is?

Related

i have install mongodb using tar file as explained in mongo website after all when i run mongod command in my terminal its getting error saying

2020-01-02T13:26:14.121+0530 I CONTROL [main] Automatically
disabling TLS 1.0, to force-enable TLS 1.0 specify
--sslDisabledProtocols 'none'
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] MongoDB
starting : pid=797 port=27017 dbpath=/data/db 64-bit
host=Nayanas-MacBook-Pro.local
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] db version
v4.2.2
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] git version:
a0bbbff6ada159e19298d37946ac8dc4b497eadf
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] allocator:
system
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] modules: none
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] build
environment:
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] distarch:
x86_64
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten]
target_arch: x86_64
2020-01-02T13:26:14.137+0530 I CONTROL [initandlisten] options: {}
2020-01-02T13:26:14.145+0530 I STORAGE [initandlisten] exception in
initAndListen: NonExistentPath: Data directory /data/db not found.,
terminating
2020-01-02T13:26:14.146+0530 I NETWORK [initandlisten] shutdown:
going to close listening sockets...
2020-01-02T13:26:14.146+0530 I NETWORK [initandlisten] removing
socket file: /tmp/mongodb-27017.sock
2020-01-02T13:26:14.147+0530 I - [initandlisten] Stopping
further Flow Control ticket acquisitions.
2020-01-02T13:26:14.148+0530 I CONTROL [initandlisten] now exiting
2020-01-02T13:26:14.148+0530 I CONTROL [initandlisten] shutting down
with code:100

MongoDB cannot start WiredTiger

Afer an automatic update on GKE, recreation of a pod with MongoDB image fails.
Stack trace follows:
2019-09-23T09:13:30.430+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=mongod-0
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] db version v3.6.14
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] git version: cbef87692475857c7ee6e764c8f5104b39c342a1
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] allocator: tcmalloc
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] modules: none
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] build environment:
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] distmod: ubuntu1604
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] distarch: x86_64
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] target_arch: x86_64
2019-09-23T09:13:30.431+0000 I CONTROL [initandlisten] options: { net: { bindIp: "0.0.0.0" }, replication: { replSet: "MainRepSet" }, security: { authorization: "enabled", clusterAuthMode: "keyFile", keyFile: "/etc/secrets-volume/mongodb-auth-keyfile" }, setParameter: { authenticationMechanisms: "SCRAM-SHA-1" } }
2019-09-23T09:13:30.431+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-09-23T09:13:30.431+0000 I STORAGE [initandlisten]
2019-09-23T09:13:30.431+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-09-23T09:13:30.431+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-09-23T09:13:30.431+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=2723M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2019-09-23T09:13:31.115+0000 E STORAGE [initandlisten] WiredTiger error (95) [1569230011:115812][1:0x7f9d4b73aa40], wiredtiger_open: __wt_conn_compat_config, 226: Version incompatibility detected: required max of 3.0cannot be larger than saved release 3.1: Operation not supported
2019-09-23T09:13:31.116+0000 E - [initandlisten] Assertion: 28595:95: Operation not supported src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 486
2019-09-23T09:13:31.116+0000 I STORAGE [initandlisten] exception in initAndListen: Location28595: 95: Operation not supported, terminating
2019-09-23T09:13:31.116+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2019-09-23T09:13:31.116+0000 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2019-09-23T09:13:31.116+0000 I CONTROL [initandlisten] now exiting
2019-09-23T09:13:31.116+0000 I CONTROL [initandlisten] shutting down with code:100

mongo: “exception: connect failed”

I am trying to connect to the mongo server, using the "mongo" command in the command prompt and this error is showing: "exception: connect failed"
Here is how I am trying to do it:
enter image description here
This is the mongodb.log
2018-03-27T14:00:19.299+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2018-03-27T14:00:19.647+0800 I CONTROL [main] Trying to start Windows service 'MongoDB'
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] MongoDB starting : pid=10480 port=27017 dbpath=d:\mongodbData\db 64-bit host=DESKTOP-KEA31I3
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] db version v3.6.3
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips 22 Sep 2016
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] allocator: tcmalloc
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] modules: none
2018-03-27T14:00:19.648+0800 I CONTROL [initandlisten] build environment:
2018-03-27T14:00:19.649+0800 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-03-27T14:00:19.649+0800 I CONTROL [initandlisten] distarch: x86_64
2018-03-27T14:00:19.649+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-03-27T14:00:19.649+0800 I CONTROL [initandlisten] options: { service: true, storage: { dbPath: "d:\mongodbData\db" }, systemLog: { destination: "file", logAppend: true, path: "d:\mongodbData\log\mongodb.log" } }
2018-03-27T14:00:19.651+0800 I - [initandlisten] Detected data files in d:\mongodbData\db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-03-27T14:00:19.651+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7632M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-03-27T14:00:19.834+0800 I STORAGE [initandlisten] WiredTiger message [1522130419:833660][10480:140722874245456], txn-recover: Main recovery loop: starting at 4/6272
2018-03-27T14:00:19.970+0800 I STORAGE [initandlisten] WiredTiger message [1522130419:970024][10480:140722874245456], txn-recover: Recovering log 4 through 5
2018-03-27T14:00:20.046+0800 I STORAGE [initandlisten] WiredTiger message [1522130420:46191][10480:140722874245456], txn-recover: Recovering log 5 through 5
2018-03-27T14:00:20.172+0800 I CONTROL [initandlisten]
2018-03-27T14:00:20.172+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-03-27T14:00:20.172+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-03-27T14:00:20.172+0800 I CONTROL [initandlisten]
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten]
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten]
2018-03-27T14:00:20.173+0800 I CONTROL [initandlisten] ** WARNING: The file system cache of this machine is configured to be greater than 40% of the total memory. This can lead to increased memory pressure and poor performance.
2018-03-27T14:00:20.174+0800 I CONTROL [initandlisten] See http://dochub.mongodb.org/core/wt-windows-system-file-cache
2018-03-27T14:00:20.174+0800 I CONTROL [initandlisten]
2018-03-27T14:00:20.402+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'd:/mongodbData/db/diagnostic.data'
2018-03-27T14:00:20.404+0800 I NETWORK [initandlisten] waiting for connections on port 27017
2018-03-27T14:00:20.404+0800 I STORAGE [initandlisten] Service running
Please help me. How to fix it
Run this following command :
sudo service mongodb stop
sudo rm /var/lib/mongodb/mongod.lock
sudo service mongod restart
mongo

mongodb can't start with Assertion: No such file or directory

my instance running in docker. after close it uncleanly, it can't be started. with log below
I CONTROL [initandlisten] MongoDB starting : pid=13 port=27017
dbpath=/data/db 64-bit host=94a9490feef9ce51e9e55af47ab5c357-a0000
I CONTROL [initandlisten] db version v3.2.6
I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
I CONTROL [initandlisten] allocator: tcmalloc
I CONTROL [initandlisten] modules: none
I CONTROL [initandlisten] build environment:
I CONTROL [initandlisten] distmod: debian71
I CONTROL [initandlisten] distarch: x86_64
I CONTROL [initandlisten] target_arch: x86_64
I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { port: 27017 }, security: { authorization: "disabled" }, storage: { dbPath: "/data/db", directoryPerDB: true, journal: { enabled: true } } }
I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=150G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
I - [initandlisten] Assertion: 28595:2: No such file or directory
I STORAGE [initandlisten] exception in initAndListen: 28595 2: No such file or directory, terminating
I CONTROL [initandlisten] dbexit: rc: 100
which file can't be found is not show, how to deal next?

Trouble Starting MongoDB (Mac) - Code: 100

I installed MongoDB via Homebrew and seem to be having some trouble starting when I run the mongod command. I have tried setting a up the data/db directory correctly and viewed a few other answers on stackoverflow, but haven't been able to figure this out. Here is what I keep getting (sorry I am new to this):
2017-01-02T23:45:53.444-0500 I CONTROL [initandlisten] MongoDB starting : pid=1419 port=27017 dbpath=/data/db 64-bit host=Johns-MacBook-Pro-3.local
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] db version v3.4.0
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] git version: f4240c60f005be757399042dc12f6addbc3170c1
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] allocator: system
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] modules: none
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] build environment:
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] distarch: x86_64
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] target_arch: x86_64
2017-01-02T23:45:53.445-0500 I CONTROL [initandlisten] options: {}
2017-01-02T23:45:53.446-0500 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7680M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2017-01-02T23:45:53.447-0500 E STORAGE [initandlisten] WiredTiger error (2) [1483418753:447985][1419:0x7fffe84c03c0], file:WiredTiger.wt, connection: /data/db/WiredTiger.wt: handle-open: open: No such file or directory
2017-01-02T23:45:53.457-0500 I - [initandlisten] Assertion: 28595:2: No such file or directory src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267
2017-01-02T23:45:53.458-0500 I STORAGE [initandlisten] exception in initAndListen: 28595 2: No such file or directory, terminating
2017-01-02T23:45:53.458-0500 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2017-01-02T23:45:53.458-0500 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2017-01-02T23:45:53.458-0500 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2017-01-02T23:45:53.458-0500 I CONTROL [initandlisten] now exiting
2017-01-02T23:45:53.458-0500 I CONTROL [initandlisten] shutting down with code:100
Just create directory - /data/db/ on system hdd
This worked for me: sudo mongod --dbpath ~/data/db