From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | John Iliffe <john(dot)iliffe(at)iliffe(dot)ca> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Unable to start postgresql |
Date: | 2017-03-08 22:11:16 |
Message-ID: | 5929793e-4f21-15dc-22d0-6f0418c97268@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 03/08/2017 02:01 PM, John Iliffe wrote:
Please use Reply All so others get your posts.
Ccing list
> On Wednesday 08 March 2017 16:40:03 you wrote:
>> On 03/08/2017 01:28 PM, John Iliffe wrote:
>>>
>>> -------------------------------
>>> [root(at)prod04 John]# su postgres
>>> [postgres(at)prod04 John]$ pg_ctl start -D /usr/pgsql_tablespaces
>>> could not change directory to "/home/John": Permission denied
>>> server starting
>>
>> This is somewhat suspicious.
>>
For the list the below is from a previous message which I forgot to Cc.
>> What if you shutdown the Postgres server and then su - postgres to and
>> run?:
> I was starting postgres as user postgres; but it was still in my home
> directory. Everything did start but I changed to /usr/pgsql_dataspaces and
> the message went away. Since there is no requirement to actually cd to
> anything the message is a bit of a red herring.
>
> That said, I'm not sure how it will be handled by the system start up task.
> I'll have to check when I add it. These are unusual manual (re)starts.
>>
>> pg_ctl start -D /usr/pgsql_tablespaces
>>
>> Along that line what user 'owns' /usr/pgsql_tablespaces?
>>
> /usr/pgsql_tablespaces is owned by postgres, group postgres, with
> permissions drwe...... on the directory and rw....... on all the files.
> This would seem correct to me.
>
>> Well this indicates the socket is working.
>>
>> What if you do?:
>>
>> psql -U postgres -h ::1
>>
> [root(at)prod04 John]# psql -U postgres -h ::1
> psql (9.6.2)
> Type "help" for help.
So Postgres is binding to IPv6.
>> That is set in pg_hba.conf. The default is:
>>
>> # "local" is for Unix domain socket connections only
>> local all all trust
>>
> Yes, I recall major changes to that file that I did on the current server.
> But that was at least 5 years ago :-(
>
> I have that one fairly tightly locked down since this is a web server.
>
>>>>> lsof says that there is nothing assigned to postmaster at this time.
Given that you can connect I have to believe lsof would show something,
so what options are you using with lsof and what user are you running it as?
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-03-08 22:22:21 | Re: Unable to start postgresql |
Previous Message | John Iliffe | 2017-03-08 21:48:16 | Re: Unable to start postgresql |