Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ken Beck <nekkceb(dot)durfee(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade
Date: 2018-03-29 04:20:48
Message-ID: 5da68044-3c4a-fda3-bb9b-85d8789792e1@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)9(dot)3-main
> Removed stale pid file.
>
> Next tried the suggestion:
>
> sudo systemctl start postgresql(at)9(dot)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(at)9(dot)3-main
> Job for postgresql(at)9(dot)3-main(dot)service failed because the control process
> exited with error code. See "systemctl status
> postgresql(at)9(dot)3-main(dot)service" and "journalctl -xe" for details.
> kcb: jobs(0)$ systemctl status postgresql(at)9(dot)3-main(dot)service
> ● postgresql(at)9(dot)3-main(dot)service - PostgreSQL Cluster 9.3-main
>    Loaded: loaded (/lib/systemd/system/postgresql(at)(dot)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(at)%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(at)9(dot)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(at)9(dot)3-main(dot)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(at)9(dot)3-main(dot)service:
> Unit entered failed stat
> Mar 28 19:51:50 kcb-VirtualBox systemd[1]: postgresql(at)9(dot)3-main(dot)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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cory Tucker 2018-03-29 05:26:24 Bad Query Plans on 10.3 vs 9.6
Previous Message Thiemo Kellner 2018-03-29 03:31:23 Re: Autonomous transaction, background worker