Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade

From: Ben Madin <ben(at)ausvet(dot)com(dot)au>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: 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 09:48:19
Message-ID: CA+weYr1+5e1FqnB_MZqeEz6AwokaJq90+z72=TUBBi2TyrCC-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)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(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-inst
> all-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
>
>

--

Dr Ben Madin
Managing Director

m : +61 448 887 220

e : ben(at)ausvet(dot)com(dot)au

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvar C.H. Freude 2018-03-29 10:50:25 Re: Question about buffers_alloc in pg_stat_bgwriter view for monitoring
Previous Message Gunnar "Nick" Bluth 2018-03-29 08:30:34 Re: Question about buffers_alloc in pg_stat_bgwriter view for monitoring