I was running Postgresql database v9.6 and I rebooted, but now it will not start. Nothing seems to work. Any idea?
I am trying to run my Django Server:
django.db.utils.OperationalError: 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?
I tried to following commands:
$ sudo /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.6 database server * Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details.
$ sudo service postgresql start
* Starting PostgreSQL 9.6 database server * Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details. [fail]
(env) dominic@dom-Inspiron-7559:~/Desktop/Project
$ systemctl status [email protected]
Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/systemd1/unit/postgresql_409_2e6_2dmain_2eservice
$ pg_config --version
PostgreSQL 11.2 (Ubuntu 11.2-1.pgdg14.04+1)
$ pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
9.6 main 5432 down postgres /var/lib/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log
$ sudo pg_ctlcluster 9.6 main start
Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details.
$ sudo systemctl daemon-reload
EDIT:
$ ps uxa|grep postgres
dominic 13786 0.0 0.0 15952 2304 pts/0 S+ 17:18 0:00 grep --color=auto postgres
/var/log/postgresql$ sudo vim postgresql-9.6-main.log.1
2019-03-16 16:15:26.224 EDT [7265] modadmin@mod LOG: could not receive data from client: Connection reset by peer
2019-03-17 15:08:10.290 EDT [12791] modadmin@mod LOG: could not receive data from client: Connection reset by peer
2019-03-17 15:16:39.060 EDT [17891] modadmin@mod LOG: could not receive data from client: Connection reset by peer
I don't see anything from today..?