Re: pgbouncer not finding pidfile

From: Tobias Fielitz <tobias(at)streethawk(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pgbouncer not finding pidfile
Date: 2014-07-31 06:00:27
Message-ID: 53D9DB7B.8070600@streethawk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have played around with it a bit more, it seems adding the pre-start
section works:

pre-start script
if [ -d /var/run/postgresql ]; then
chmod 2775 /var/run/postgresql
else
install -d -m 2775 -o postgres -g postgres /var/run/postgresql
fi
end script

Thanks Adrian!

On 31/07/2014 12:38 am, Adrian Klaver wrote:
> On 07/28/2014 09:33 PM, Tobias Fielitz wrote:
>> Hi,
>>
>> I am trying to start pgbouncer via upstart script. The upstart logs
>> (/var/log/upstart/pgbouncer.log) tell me:
>> /var/run/postgresql/pgbouncer.pid: No such file or directory [2]
>>
>> but when starting pgbouncer from the console with:
>>
>> > sudo service pgbouncer start
>>
>> it works fine and the pidfile is created.
>>
>> Here is the upstart script (/etc/init/pgbouncer.conf):
>>
>> start on (net-device-up and local-filesystems and runlevel [2345])
>> stop on runlevel [016]
>>
>> setuid postgres
>> setgid postgres
>> respawn limit 10 30
>>
>> exec /usr/sbin/pgbouncer /etc/pgbouncer/pgbouncer.ini
>>
>> The permissions for the folder seem ok:
>>
>> > ls -lsah /var/run/ | grep postgresql
>> 0 drwxrwsr-x 2 postgres postgres 100 Jul 29 04:18 postgresql
>>
>> I have no clue whats wrong.
>> Any help would be appreciated.
>
> I am not familiar with upstart, so I searched for some sample scripts:
>
> http://bradleyayers.blogspot.com/2011/10/upstart-job-for-postgresql-91-on-ubuntu.html
>
>
> https://gist.github.com/haad/6020401
>
>
> Hopefully, that will give you some pointers.
>
>> Tobi
>>
>>
>>
>
>

Attachment Content-Type Size
tobias.vcf text/x-vcard 245 bytes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Mackler 2014-07-31 07:18:04 Re: Re: User-defined operator function: what parameter type to use for uncast character string?
Previous Message David G Johnston 2014-07-31 05:59:28 Re: User-defined operator function: what parameter type to use for uncast character string?