Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade - Mailing list pgsql-general

From Ben Madin
Subject Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade
Date
Msg-id CA+weYr1+5e1FqnB_MZqeEz6AwokaJq90+z72=TUBBi2TyrCC-A@mail.gmail.com
Whole thread Raw
In response to Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Not to come in too late, but have you tried the non-ubuntu:

sudo su
su -m postgres
pg_ctl -D /var/lib/postgresql/9.3/main start


cheers

Ben



On 29 March 2018 at 12:20, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 03/28/2018 07:29 PM, Ken Beck wrote:

Comments in line.

The current log is 0 length, and indeed empty.

I just tried 'sudo pg_ctlcluster 9.3 main start'  and got the following
error:

Error: Config owner (kcb:1000) and data owner (postgres:116) do not
match, and config owner is not root

So why is your config owned by you and the data owned by postgres?

Your configuration files should be under:

/etc/postgresql/9.3/main/

and on my Ubuntu setups anyway is owned by postgres.


Changed to user postgres, tried again and go >
Warning: the cluster will not be running as a systemd service. Consider
using systemctl:
   sudo systemctl start postgresql@9.3-main
Removed stale pid file.

Next tried the suggestion:

sudo systemctl start postgresql@9.3-main, but the system failed to
accept the password for user postgres. That is NOT something I changed

My experience with Ubuntu is that the postgres system user does not have a password. So where you using the database postgres user password? For more detail see here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04

during the Ubuntu upgrade process, so that has been a puzzle as well. My
main login, user kcb is OK, password still works.

So I change back to user kcb and try the suggestion again:

kcb: jobs(0)$ sudo systemctl start postgresql@9.3-main
Job for postgresql@9.3-main.service failed because the control process
exited with error code. See "systemctl status
postgresql@9.3-main.service" and "journalctl -xe" for details.
kcb: jobs(0)$ systemctl status postgresql@9.3-main.service
● postgresql@9.3-main.service - PostgreSQL Cluster 9.3-main
    Loaded: loaded (/lib/systemd/system/postgresql@.service; disabled;
vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2018-03-28 19:51:50 MDT;
47s ago
   Process: 2960 ExecStart=postgresql@%i --skip-systemctl-redirect %i
start (code=exited, status=

Mar 28 19:51:50 kcb-VirtualBox systemd[1]: Starting PostgreSQL Cluster
9.3-main...
Mar 28 19:51:50 kcb-VirtualBox postgresql@9.3-main[2960]: Error: Config
owner (kcb:1000) and dat

Again the error with the config owner being you. Seems it would help to track down what copies of the conf files are installed on your machine.


Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
Control process exited,
Mar 28 19:51:50 kcb-VirtualBox systemd[1]: Failed to start PostgreSQL
Cluster 9.3-main.
Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
Unit entered failed stat
Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql@9.3-main.service:
Failed with result 'exit

Is it possible a big problem is that the password for user postgres not
longer works for some reason, not sure why. It appears the password can
not be rest or changed without knowing the original, and what I thought
was the original no longer works.

Remember there are two postgres users in play here, the system user and the database one. Which one are you referring to?




--
Adrian Klaver
adrian.klaver@aklaver.com




--

Dr Ben Madin
Managing Director



m : +61 448 887 220


5 Shuffrey Street, Fremantle
Western Australia

on the web: www.ausvet.com.au


This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please delete it and notify the sender. The contents of this email are the opinion of the writer only and are not endorsed by Ausvet unless expressly stated otherwise. Although Ausvet uses virus scanning software we do not accept liability for viruses or similar in any attachments. 

pgsql-general by date:

Previous
From: "Gunnar \"Nick\" Bluth"
Date:
Subject: Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring
Next
From: "Alvar C.H. Freude"
Date:
Subject: Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring