On Tue, Mar 17, 2020 at 05:51:18AM -0700, Eugene Jose Espinoza wrote:
> In a clean slate Ubuntu 16.04, with only Apache2, Mysql and Wordpress
> installed, while issuing "createuser -U postgres -d -A -P dspace", I am
> getting the following error:
> createuser: could not connect to database postgres: could not connect to
> server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket
> "/var/run/postgresql/.s.PGSQL.5432"?
>
> Have tried various troubleshooting like following this one:
>
https://askubuntu.com/questions/50621/cannot-connect-to-postgresql-on-port-5432
> but it seems Postgresql is not starting correctly. Any tips on how to go
> about?
You are more likely to get help with PostgreSQL issues in a PostgreSQL
group. But I will ask whether the service logs anything useful when
you try to start it.
Early logging may be going to a file 'postmaster.log' in Pg's 'data'
directory. You should find messages like:
2020-02-24 21:15:12 EST LOG: starting PostgreSQL 12.2 on x86_64-pc-linux-gnu, compiled by x86_64-pc-linux-gnu-gcc (Gentoo 9.2.0-r2 p3) 9.2.0, 64-bit
2020-02-24 21:15:12 EST LOG: listening on IPv6 address "::1", port 5432
2020-02-24 21:15:12 EST LOG: listening on IPv4 address "127.0.0.1", port 5432
2020-02-24 21:15:12 EST LOG: listening on IPv4 address "192.168.101.7", port 5432
2020-02-24 21:15:12 EST LOG: listening on IPv6 address "fec0:0:0:1::7", port 5432
2020-02-24 21:15:12 EST LOG: listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2020-02-24 21:15:12 EST LOG: redirecting log output to logging collector process
2020-02-24 21:15:12 EST HINT: Future log output will appear in directory "/var/log/postgresql".
If you are not getting even that, then you may need to run Pg manually
to see what is failing, using 'pg_ctl' with appropriate options (and I
don't know what would be appropriate -- check the Pg startup script
for clues).
--
Mark H. Wood
Lead Technology Analyst
University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu