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

connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused #3

Open
Darkcast opened this issue Jan 27, 2022 · 3 comments

Comments

@Darkcast
Copy link

followed the quick start guide
installed everythig except docker-machine
didnt touch the config.cfg
when I ran it it run perfectly but the page display an error page
image

┌──(kali㉿kali)-[~/Downloads/MultiAV2/multiav]
└─$ sudo python3 scripts/runserver.py
--execute command: whereis docker
--execute command: docker ps
--execute command: ls /tmp/malware
--execute command: mkdir /tmp/malware
Checking if all engines are pulled and pulling them if required...
All engines pulled!
Checking if all docker networks exist and creating them if required...
All networks ok!
http://0.0.0.0:8080/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/web/application.py", line 280, in process
return self.handle()
File "/usr/local/lib/python3.9/dist-packages/web/application.py", line 271, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/local/lib/python3.9/dist-packages/web/application.py", line 517, in _delegate
return handle_class(cls)
File "/usr/local/lib/python3.9/dist-packages/web/application.py", line 495, in handle_class
return tocall(*args)
File "/home/kali/Downloads/MultiAV2/multiav/webapi.py", line 747, in GET
with CDbSamples() as db:
File "/home/kali/Downloads/MultiAV2/multiav/webapi.py", line 100, in init
self.create_schema()
File "/home/kali/Downloads/MultiAV2/multiav/webapi.py", line 110, in create_schema
with self.db.transaction():
File "/usr/local/lib/python3.9/dist-packages/web/db.py", line 1185, in transaction
return Transaction(self.ctx)
File "/usr/local/lib/python3.9/dist-packages/web/db.py", line 683, in _getctx
self._load_context(self._ctx)
File "/usr/local/lib/python3.9/dist-packages/web/db.py", line 695, in _load_context
ctx.db = self._connect(self.keywords)
File "/usr/local/lib/python3.9/dist-packages/web/db.py", line 1232, in _connect
conn = DB._connect(self, keywords)
File "/usr/local/lib/python3.9/dist-packages/web/db.py", line 723, in _connect
return self.db_module.connect(**keywords)
File "/usr/lib/python3/dist-packages/psycopg2/init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?

@sakkiii
Copy link
Owner

sakkiii commented Jan 27, 2022

You need to configure with correct database settings in config.cfg file, database configuration details

@n33lix1337
Copy link

I have got the same Problem ... where do i need to setup database ? Do i need to set it up using docker ? Iam stuck at this ...

@sakkiii
Copy link
Owner

sakkiii commented Mar 18, 2022

@n33lix1337 it's your choice how and where you setup your database but database should be reachable from multiav machine.
Also make sure database port is exposed if you are using containers.

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

3 participants