DFIRKuiper / Kuiper

Digital Forensics Investigation Platform
760 stars 111 forks source link

Connection refused #4

Closed fahad4x4 closed 4 years ago

fahad4x4 commented 4 years ago

root@debian:~/saad/Kuiper$ sudo ./kuiper_install.sh -run Running Kuiper! Kuiper can be accessed at http://[configuredIP]:5000 nohup: redirecting stderr to stdout root@debian:~/saad/Kuiper$ Traceback (most recent call last): File "/usr/local/bin/celery", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/celery/__main__.py", line 16, in main _main() File "/usr/local/lib/python2.7/dist-packages/celery/bin/celery.py", line 322, in main cmd.execute_from_commandline(argv) File "/usr/local/lib/python2.7/dist-packages/celery/bin/celery.py", line 496, in execute_from_commandline super(CeleryCommand, self).execute_from_commandline(argv))) File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 288, in execute_from_commandline argv = self.setup_app_from_commandline(argv) File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 502, in setup_app_from_commandline self.app = self.find_app(app) File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 524, in find_app return find_app(app, symbol_by_name=self.symbol_by_name) File "/usr/local/lib/python2.7/dist-packages/celery/app/utils.py", line 368, in find_app sym = symbol_by_name(app, imp=imp) File "/usr/local/lib/python2.7/dist-packages/celery/bin/base.py", line 527, in symbol_by_name return imports.symbol_by_name(name, imp=imp) File "/usr/local/lib/python2.7/dist-packages/kombu/utils/imports.py", line 57, in symbol_by_name module = imp(module_name, package=package, **kwargs) File "/usr/local/lib/python2.7/dist-packages/celery/utils/imports.py", line 111, in import_from_cwd return imp(module, package=package) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/root/saad/Kuiper/app/__init__.py", line 34, in <module> from controllers import case_management,admin_management File "/home/root/saad/Kuiper/app/controllers/case_management.py", line 18, in <module> import parser_management File "/home/root/saad/Kuiper/app/controllers/parser_management.py", line 18, in <module> from app.database.dbstuff import * File "/home/root/saad/Kuiper/app/database/dbstuff.py", line 27, in <module> MClient = MongoClient(DB_IP + ":" + str(DB_PORT) ) File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 377, in __init__ raise ConnectionFailure(str(e)) pymongo.errors.ConnectionFailure: [Errno 111] Connection refused

DFIRKuiper commented 4 years ago

Hi, looks like it failed to connect to MongoDB database, check the following:

fahad4x4 commented 4 years ago

service mongodb status

`sudo service mongodb status ● mongodb.service - MongoDB Database Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: Active: failed (Result: exit-code) since Sun 2019-11-03 19:05:11 +03; 2min 52 Process: 717 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code Main PID: 717 (code=exited, status=217/USER)

Nov 03 19:05:11 Ghathbar systemd[1]: Started MongoDB Database. Nov 03 19:05:11 Ghathbar systemd[717]: mongodb.service: Failed to determine user Nov 03 19:05:11 Ghathbar systemd[717]: mongodb.service: Failed at step USER spaw Nov 03 19:05:11 Ghathbar systemd[1]: mongodb.service: Main process exited, code= Nov 03 19:05:11 Ghathbar systemd[1]: mongodb.service: Failed with result 'exit-c lines 1-11/11 (END)...skipping... ● mongodb.service - MongoDB Database Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2019-11-03 19:05:11 +03; 2min 52s ago Process: 717 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=217/USER) Main PID: 717 (code=exited, status=217/USER)

Nov 03 19:05:11 Ghathbar systemd[1]: Started MongoDB Database. Nov 03 19:05:11 Ghathbar systemd[717]: mongodb.service: Failed to determine user credentials: No such process Nov 03 19:05:11 Ghathbar systemd[717]: mongodb.service: Failed at step USER spawning /usr/bin/mongod: No such process Nov 03 19:05:11 Ghathbar systemd[1]: mongodb.service: Main process exited, code=exited, status=217/USER Nov 03 19:05:11 Ghathbar systemd[1]: mongodb.service: Failed with result 'exit-code'. `

fahad4x4 commented 4 years ago

Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-6-amd64 Architecture: x86-64

DFIRKuiper commented 4 years ago

The only OS we tested on is Ubuntu 16.04 TLS and I highly recommend you to use it.

DFIRKuiper commented 4 years ago

dear Fahad, could you provide the installer log file Kuiper-install.log also the service file /etc/systemd/system/mongodb.service

also try change the owner of the mongodb folder sudo chown -R mongodb:mongodb /var/lib/mongodb/

haythmalshehab commented 4 years ago

Hi,

I had the same issue and reinstalling MongoDB fixed it.

error msg:

Screenshot 2019-11-07 04 49 50

After fixing the isssue:

Screenshot 2019-11-07 04 50 20

Here are the steps you can follow to reinstall MongoDB 4.2 assuming you are running on Ubuntu 18.04:

sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 4B7C549A058F8B6B
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt update
sudo apt install mongodb-org
sudo systemctl start mongodb
sudo systemctl enable mongodb

If you are running on Ubuntu 16.04 just replace the 5th line with:

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list

Good luck!