<div dir="ltr">That was the issue, now it's fixed<div>I think I should send a bug report to repo maintainers of pgpool for ubuntu</div><div><br></div><div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 25, 2017 at 2:34 AM, Bo Peng <span dir="ltr"><<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think you should define "ExecStop" to shutdown Pgpool-II.<br>
<br>
If no "ExecStop" is defined in service file,<br>
Systemd will send SIGTERM (smart) to shutdown Pgpool-II.<br>
<br>
If some connection was left, Pgpool-II will wait for all<br>
clients are disconnected until timeout.<br>
When timeout occured, Pgpool-II could not shutdown correctly,<br>
that's the reason why starting Pgpoo-II failed.<br>
<br>
Try to define "ExecStop" in your service file.<br>
<br>
  ExecStop=/usr/sbin/pgpool -m fast stop<br>
<br>
<br>
On Thu, 24 Aug 2017 12:41:36 +0430<br>
<div class="HOEnZb"><div class="h5">Keyvan Hedayati <<a href="mailto:k1.hedayati93@gmail.com">k1.hedayati93@gmail.com</a>> wrote:<br>
<br>
> It's the systemd server file from Ubuntu 16.04:<br>
> [Unit]<br>
> Description=pgpool-II<br>
> Documentation=man:pgpool(8)<br>
> Wants=postgresql.service<br>
><br>
> [Service]<br>
> User=postgres<br>
> ExecStart=/usr/sbin/pgpool -n<br>
> ExecReload=/bin/kill -HUP $MAINPID<br>
> StandardOutput=syslog<br>
> SyslogFacility=local0<br>
><br>
> [Install]<br>
> WantedBy=multi-user.target<br>
><br>
> On Thu, Aug 24, 2017 at 8:07 AM, Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > It looks that pgpool wasn't terminated correctly.<br>
> ><br>
> > Could you show me your service file?<br>
> ><br>
> > On Sun, 20 Aug 2017 15:37:19 +0430<br>
> > Keyvan Hedayati <<a href="mailto:k1.hedayati93@gmail.com">k1.hedayati93@gmail.com</a>> wrote:<br>
> ><br>
> > > Hello,<br>
> > > We use pgpool for load balancing two postgres databases that has<br>
> > replicated<br>
> > > using streaming replication. I've only enabled load balancing feature and<br>
> > > other options are off.<br>
> > > When I'm trying to restart pgpool with systemctl I get an error like<br>
> > this:<br>
> > ><br>
> > > Aug 20 14:34:40 Beta pgpool[16184]:  [16184] [No Connection]@[No<br>
> > > Connection] FATAL:  failed to bind a socket: "/tmp/.s.PGSQL.5432"<br>
> > > Aug 20 14:34:40 Beta pgpool[16184]:  [16184] [No Connection]@[No<br>
> > > Connection] DETAIL:  bind socket failed with error: "Address already in<br>
> > use"<br>
> > ><br>
> > > Seems like pgpool can not delete it's socket files so after being stopped<br>
> > > it can't start. But socket files have full permissions:<br>
> > > srwxrwxrwx 1 postgres postgres 0 Aug 20 14:24 /tmp/.s.PGSQL.5432<br>
> > > srwxrwxrwx 1 postgres postgres 0 Aug 20 14:24 /tmp/.s.PGSQL.9898<br>
> > ><br>
> > > I've attached my configuration file.<br>
> > > This is pgpool version I'm using which latest version if Ubuntu 16.04<br>
> > > apparently.<br>
> > > pgpool-II version 3.4.3 (tataraboshi)<br>
> > ><br>
> > > Have I configured something wrong or I've to install latest version?<br>
> > ><br>
> > > --<br>
> > > Live long and prosper,<br>
> > > K1.H <<a href="http://k1h.ir/" rel="noreferrer" target="_blank">http://k1h.ir/</a>><br>
> ><br>
> ><br>
> > --<br>
> > Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>><br>
> > SRA OSS, Inc. Japan<br>
> ><br>
> ><br>
><br>
><br>
> --<br>
> Live long and prosper,<br>
> K1.H <<a href="http://k1h.ir/" rel="noreferrer" target="_blank">http://k1h.ir/</a>><br>
<br>
<br>
--<br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>><br>
SRA OSS, Inc. Japan<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Live long and prosper,<div><a href="http://k1h.ir/" target="_blank">K1.H</a></div></div></div></div></div>
</div>