Postgresql not connecting to Mestaploit - postgresql-9.5

service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; preset: disabled)
Active: active (exited)
msfdb status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; preset: disabled)
Active: active (exited)
msf6 > db_status
[*] postgresql selected, no connection
msf6 >
I need help to be able to connect Posgresql to Mestasploit.
I restarted Postgresql and then started it but it still gives me problems.

Related

Redis Won't Start Scheduled restart job, restart counter is at 5

My working and functional redis server 5.0.7 installation on Ubuntu 20.04, simply refuses to start without any changes having be made to the config file. It is identical to a config on a different different server running redis that starts, therefore I think the error message is systemd related
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-07-30 23:09:49 HKT; 32s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 8141 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
redis-server.service: Control process exited, code=exited, status=1/FAILURE
redis-server.service: Failed with result 'exit-code'.
Failed to start Advanced key-value store.
redis-server.service: Scheduled restart job, restart counter is at 5.
Stopped Advanced key-value store.
redis-server.service: Start request repeated too quickly.
redis-server.service: Failed with result 'exit-code'.
Failed to start Advanced key-value store.
Any ideas?
Thanks

How to restart redis server with authentication?

I am trying to restart a redis server using the following command:
service redis-server restart
And I am getting the error:
Failed to restart redis-server.service: Interactive authentication required.
See system logs and 'systemctl status redis-server.service' for details.
I know the redis password but I am not sure how to pass it in in the line of code that I mentioned.
The recommended logs are like this and not very helpful:
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2022-04-05 13:31:23 UTC; 12min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 358704 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)

How to fix salt-minion service entering "reloading" state after executing apache.modules

Facing a strange issue!
On listing apache modules on minion by executing following command from salt-master,
# salt 'target' apache.modules
on minion, salt-minion service enters "reloading" state.
# systemctl status salt-minion
● salt-minion.service - The Salt Minion
Loaded: loaded (/usr/lib/systemd/system/salt-minion.service; enabled; vendor preset: disabled)
Active: reloading (reload) since Wed 2021-09-29 00:48:29 PDT; 2 weeks 2 days ago
Docs: man:salt-minion(1)
file:///usr/share/doc/salt/html/contents.html
https://docs.saltstack.com/en/latest/contents.html
Main PID: 3582 (salt-minion)
Status: "Reading configuration..."
Few details:
Important to note that previously it was Apache/2.4.6 (CentOS) and this issue started after upgrading to Apache/2.4.48 (IUS)
salt-master and salt-minion both the versions are 3003.1
It is Centos 7 VM
service remains in "reloading" state until restarted
minion logs does not log anything on change of service state

why i get problem while running apache2 in ubuntu?

Here is my details about the apache error, hope you will can find out the problems
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2020-02-25 12:06:14 +0545; 13min ago
Process: 25134 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Please check first : /var/log/apache2/error.log
After you have comprehended which procedure utilizes port 80, you can choose in the event that you need to end it or on the off chance that you have an unsupported setup and can't utilize Apache on port 80
To check for that:- netstat -anp | grep ':80\s'

Celery workers not working with redis

I tried to start the celery which consumes a data from REDIS . It is showing that celery has started (but not sure.. ) but this service could not spawn the workers pools.
Below message showing the status as ACTIVE :-
celeryd.service - LSB: celery task worker daemon Loaded: loaded
(/etc/init.d/celeryd; bad; vendor preset: enabled) Active: active
(exited) since Wed 2017-09-20 13:40:12 UTC; 7min ago
Docs: man:systemd-sysv-generator(8)
But still workers not created. I checked with running processes . Previously it was working fine with the current configuration . That means configuration is correct but when I restarted the application , this issue started to occur.
Second question is what is bad in below highlighted line :-
Loaded: loaded (/etc/init.d/celeryd; ***bad***; vendor preset: enabled)
Please reply with your suggestions/answers . Thanks in advance.