The main problem in Mongo database

We have an emergency regarding the website we just launched. We just got hit by a heavy DDoS attack and the servers were overwhelmed with requests. Once the attack stopped, we restarted the server with the database, and we noticed that the WiredTiger.wt file just disappeared and Mongo no longer works. I'm wondering what we can do to restore the database and get Mongo back, given that the WiredTiger.wt file is missing? We have an instance that has MONGO_URL set to another instance where we have a database (here where the DDoS attack happened).

Here are some logs you could check:

  • When I try to connect to the database server to connect "mongo NAME_OF_DATABASE":

MongoDB shell version: 3.2.11 connect to: NAME_OF_DATABASE Failed to connect to 127.0.0.1:27017, reason: errno: 111 Connection refused E QUERY [thread1] Error: Could not connect to server 127.0.0.1:27017, connection attempt failed : connect @ src /mongo/shell/mongo.js: 229: 14 @ (Connection): 1: 6

exception: connection failure

  • When I check the logs "mongo log / var / log / mongodb / mongod.log":

    2017-04-04T11: 05: 18.252 + 0000 i CONTROL [main] ***** SERVER RESTARTED ***** 2017-04-04T11: 05: 18.255 + 0000 i CONTROL [initandlisten] MongoDB start: pid = 2716 port = 27017 dbpath = / var / lib / mongodb 64-bit host = ip-xxx-xxx-xxx-xxx 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] db version v3.2.11 2017-04- 04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g March 1, 2016 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] allocator: tcmalloc 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] modules: no 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] build environment : 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] distmod:ubuntu1604 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] distarch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] target_arch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] options: {config: "/etc/mongod.conf", network: {port: 27017}, security: {authorization: "enabled"}, storage: {dbPath: "/ var / lib / mongodb" , log: {enabled: true}}, systemLog: {destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true}} 2017-04-04T11: 05 : 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04 -04T11: 05: 18.279 + 0000 i - [initandlisten]256 + 0000 i CONTROL [initandlisten] distarch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] target_arch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] options: {config : "/etc/mongod.conf", network: {port: 27017}, security: {authorization: "enabled"}, store: {dbPath: "/ var / lib / mongodb", log: {enabled: true}} , systemLog: {destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]256 + 0000 i CONTROL [initandlisten] distarch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] target_arch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] options: {config : "/etc/mongod.conf", network: {port: 27017}, security: {authorization: "enabled"}, store: {dbPath: "/ var / lib / mongodb", log: {enabled: true}} , systemLog: {destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]256 + 0000 i CONTROL [initandlisten] target_arch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] options: {config: "/etc/mongod.conf", network: {port: 27017}, security : {authorization: "enabled"}, storage: {dbPath: "/ var / lib / mongodb", log: {enabled: true}}, systemLog: {destination: "file", logAppend: true, path: "/ var /log/mongodb/mongod.log ", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Unable to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]256 + 0000 i CONTROL [initandlisten] target_arch: x86_64 2017-04-04T11: 05: 18.256 + 0000 i CONTROL [initandlisten] options: {config: "/etc/mongod.conf", network: {port: 27017}, security : {authorization: "enabled"}, storage: {dbPath: "/ var / lib / mongodb", log: {enabled: true}}, systemLog: {destination: "file", logAppend: true, path: "/ var /log/mongodb/mongod.log ", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Unable to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]conf ", network: {port: 27017}, security: {authorization:" enabled "}, storage: {dbPath:" / var / lib / mongodb ", log: {enabled: true}}, systemLog: {destination:" file ", logAppend: true, path:" /var/log/mongodb/mongod.log ", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]conf ", network: {port: 27017}, security: {authorization:" enabled "}, storage: {dbPath:" / var / lib / mongodb ", log: {enabled: true}}, systemLog: {destination:" file ", logAppend: true, path:" /var/log/mongodb/mongod.log ", quiet: true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]true}} 2017-04-04T11: 05: 18.279 + 0000 E NETWORK [initandlisten] Failed to detach socket file / tmp / mongodb -27017.sock errno: 1 Operation not allowed 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten] Fatal statement 28578 2017-04-04T11: 05: 18.279 + 0000 i - [initandlisten]

  • When I run sudo service mongodb status:

mongodb.service is a high performance schema-free document database Loaded: Loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2017-04- 04 11:51:06 UTC; 8 years ago Process: 1384 ExecStart = / usr / bin / mongod --quiet --config / etc / mongod.conf (code = exited, status = 14) Main PID: 1384 (code = exited, status = 14)

Apr 04 11:51:06 ip-172-31-42-103 systemd [1]: Starter high-performance, schema-free database. Apr 04 11:51:06 ip-172-31-42-103 systemd [1]: mongodb.service: Main process exited, code = exited, status = 14 / n / a Apr 04 11:51:06 ip-172 -31-42-103 systemd [1]: mongodb.service: No entered state entered. Apr 04 11:51:06 ip-172-31-42-103 systemd [1]: mongodb.service: Failed with "exit-code" result.

Thank!

+3


source to share





All Articles