<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Re: [pgpool-general: 5608] failed to bind a socket: &quot;/var/run/postgresql/.s.PGSQL.9999&quot;</title>
</head>
<body>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2137675789;
        mso-list-template-ids:-1;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
<div class="WordSection1">
<p class="MsoNormal">It works! Thank you Pavel.</p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:balroga3@yandex.ru">Pavel</a><br>
<b>Sent: </b>Tuesday, July 4, 2017 8:55 PM<br>
<b>To: </b><a href="mailto:hiscal@outlook.com">Yong Zhang</a>; <a href="mailto:pgpool-general@pgpool.net">
pgpool-general@pgpool.net</a><br>
<b>Subject: </b>Re: [pgpool-general: 5608] failed to bind a socket: &quot;/var/run/postgresql/.s.PGSQL.9999&quot;</p>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div><span style=" font-family:'Courier New'; font-size: 10pt;">Hello, Yong.<br>
<br>
Try using the &quot;fast&quot; option for stopping pgpool:<br>
This is how I did this: <br>
cat /etc/systemd/system/pgpool2.service.d/override.conf<br>
[Service]<br>
ExecStart=<br>
ExecStart=/usr/local/bin/pgpool -n -D<br>
ExecStop=/usr/local/bin/pgpool -m fast stop<br>
StandardOutput=syslog<br>
StandardError=syslog<br>
SyslogIdentifier=pgpool2<br>
<br>
<br>
About starting error, I guess socket file was not correctly deleted during previous shutdown. Try deleting it manually and stopping pgpool with &quot;fast&quot; option next time as described above.
<br>
<br>
Hope it helps.<br>
<br>
<br>
You wrote 4 §Ś§š§Ż§ń 2017 §Ō., 14:35:19:<br>
<br>
<a name="divtagdefaultwrapper"></a></span>
<table>
<tbody>
<tr>
<td width="2" bgcolor="#0000ff"><br>
</td>
<td><span style=" font-family:'calibri'; font-size: 12pt;">Does anyone have the same issue with mine?<br>
<br>
OS: Ubuntu16.04<br>
Pgpool2: &nbsp;3.6.4-1.pgdg16.04&#43;1<br>
PostgreSQL: &nbsp;9.6.3-1.pgdg16.04&#43;1<br>
<br>
Pgpool2 service is controlled by systemd.<br>
<br>
Issues:<br>
</span>
<ol style="text-indent: 0px; margin-left: 40px; list-style-position: outside; list-style-type: decimal;">
<li class="rvps0"><span style=" font-family:'calibri'; font-size: 12pt;">”°Systemctl stop pgpool2”± will take a long time and finally will be failed</span>
</li><li class="rvps0"><span style=" font-family:'calibri'; font-size: 12pt;">”°systemctl start pgpool2”± will have below errors in logs:</span>
</li></ol>
<span style=" font-family:'calibri'; font-size: 12pt;">Jul &nbsp;4 16:50:30 pgpoolserver pgpool[2179]: 2017-07-04 16:50:30: pid 2179: FATAL: &nbsp;failed to bind a socket: &quot;/var/run/postgresql/.s.PGSQL.9999&quot;<br>
Jul &nbsp;4 16:50:30 pgpoolserver pgpool[2179]: 2017-07-04 16:50:30: pid 2179: DETAIL: &nbsp;bind socket failed with error: &quot;Address already in use&quot;<br>
Jul &nbsp;4 16:50:30 pgpoolserver systemd[1]: pgpool2.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED<br>
Jul &nbsp;4 16:50:30 pgpoolserver systemd[1]: pgpool2.service: Unit entered failed state.<br>
Jul &nbsp;4 16:50:30 pgpoolserver systemd[1]: pgpool2.service: Failed with result 'exit-code'.<br>
</span></td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<br>
<span style=" font-family:'arial'; color: #c0c0c0;"><i>-- <br>
Best regards,<br>
Pavel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</i></span><a style=" font-family:'arial';" href="mailto:balroga3@yandex.ru">mailto:balroga3@yandex.ru</a>
</div>
</body>
</html>