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

problem with database #1

Open
shanow7 opened this issue Dec 13, 2020 · 6 comments
Open

problem with database #1

shanow7 opened this issue Dec 13, 2020 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@shanow7
Copy link

shanow7 commented Dec 13, 2020

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/base.py", line 2336, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 364, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 778, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 495, in checkout
rec = pool._do_get()
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/impl.py", line 140, in do_get
self.dec_overflow()
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.raise
(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/compat.py", line 182, in raise

raise exception
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
return self._create_connection()
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 440, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 661, in connect
pool.logger.debug("Error on connect(): %s", e)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.raise
(
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/compat.py", line 182, in raise

raise exception
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/pool/base.py", line 656, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/default.py", line 493, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/lib/python3.9/dist-packages/psycopg2/init.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

@chopicalqui
Copy link
Owner

Hey @shanow7
Looks like PostgreSQL is not running. Did you start the PostgreSQL service via the following command?
sudo service postgresql start
Afterwards, it should work.
Cheers

@shanow7
Copy link
Author

shanow7 commented Dec 15, 2020

sudo /opt/kaliintelsuite/kis/kismanage.py database --setup
[] creating link file for /opt/kaliintelsuite/kis/kiscollect.py
$ ln -sT /opt/kaliintelsuite/kis/kiscollect.py /usr/bin/kiscollect
[e] ln: failed to create symbolic link '/usr/bin/kiscollect': File exists
[
] creating link file for /opt/kaliintelsuite/kis/kismanage.py
$ ln -sT /opt/kaliintelsuite/kis/kismanage.py /usr/bin/kismanage
[e] ln: failed to create symbolic link '/usr/bin/kismanage': File exists
[] creating link file for /opt/kaliintelsuite/kis/kisreport.py
$ ln -sT /opt/kaliintelsuite/kis/kisreport.py /usr/bin/kisreport
[e] ln: failed to create symbolic link '/usr/bin/kisreport': File exists
[
] adding PostgresSql database to auto start
$ update-rc.d postgresql enable
[e] update-rc.d: error: cannot find a LSB script for postgresql

@chopicalqui
Copy link
Owner

Interesting. Can you send me the output of the following command:
uname -a
It looks like that PostgreSQL is not installed on your machine, which is unusual for Kali Linux because it might be used by MSF.

@shanow7
Copy link
Author

shanow7 commented Dec 16, 2020

Linux tlosint 5.9.0-kali4-amd64 #1 SMP Debian 5.9.11-1kali1 (2020-12-01) x86_64 GNU/Linux

@chopicalqui
Copy link
Owner

It looks like your Kali Linux version does not have PostgreSQL installed (which is unusual) and therefore KIS cannot execute the following command:

$ update-rc.d postgresql enable
[e] update-rc.d: error: cannot find a LSB script for postgresql

Are you working on an untested weekly Kali Linux release? The latest available Kali Linux version has the following uname output, which differs from yours (see dates 2020-12-01 and 2020-10-29):

$ uname -a
Linux kali 5.9.0-kali1-amd64 #1 SMP Debian 5.9.1-1kali2 (2020-10-29) x86_64 GNU/Linux

If you are using an unofficial version, I suggest that you run the following command and execute and fix each of the displayed commands manually:

$ sudo kismanage database --setup-dbg                                                                                                                1 ⨯
[*] creating link file for /usr/bin/kiscollect.py
    $ ln -sT /usr/bin/kiscollect.py /usr/bin/kiscollect
[*] creating link file for /usr/bin/kismanage.py
    $ ln -sT /usr/bin/kismanage.py /usr/bin/kismanage
[*] creating link file for /usr/bin/kisreport.py
    $ ln -sT /usr/bin/kisreport.py /usr/bin/kisreport
[...]

@shanow7
Copy link
Author

shanow7 commented Dec 16, 2020

and if you can make a movie with installation and use, it would be easier :)

@chopicalqui chopicalqui added the documentation Improvements or additions to documentation label Dec 16, 2020
@chopicalqui chopicalqui reopened this Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants