View Issue Details

IDProjectCategoryView StatusLast Update
0000554Pgpool-IIBugpublic2019-10-21 17:06
ReporternglpAssigned Topengbo 
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionopen 
Product Version4.0.4 
Target VersionFixed in Version 
Summary0000554: stale socket files after system crash
DescriptionHi,

We've detected pgpool doesnt start after a system crash (ex: electrical outage), because socket files on socket_dir/pcp_socket_dir/wd_ipc_socket_dir

Socket files are:
.s.PGPOOLWD_CMD.9000
.s.PGSQL.9898
.s.PGSQL.9999

Our environment:
PGPool 4.0.4 with attached config
Redhat 7.6

We've workaround this issue with this commands on systemd file (if anyone has this issue, it can help you meanwhile):
ExecStartPre=/bin/bash -c "{ /usr/bin/test -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep --pidfile /run/pgpool/pgpool.pid; } || { /usr/bin/test ! -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep pgpool; } && { /usr/bin/test -S /tmp/.s.PGPOOLWD_CMD.9000 && /bin/rm -f /tmp/.s.PGPOOLWD_CMD.9000; } || /usr/bin/test ! -S /tmp/.s.PGPOOLWD_CMD.9000"
ExecStartPre=/bin/bash -c "{ /usr/bin/test -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep --pidfile /run/pgpool/pgpool.pid; } || { /usr/bin/test ! -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep pgpool; } && { /usr/bin/test -S /tmp/.s.PGSQL.9898 && /bin/rm -f /tmp/.s.PGSQL.9898; } || /usr/bin/test ! -S /tmp/.s.PGSQL.9898"
ExecStartPre=/bin/bash -c "{ /usr/bin/test -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep --pidfile /run/pgpool/pgpool.pid; } || { /usr/bin/test ! -s /run/pgpool/pgpool.pid && ! /usr/bin/pgrep pgpool; } && { /usr/bin/test -S /tmp/.s.PGSQL.9999 && /bin/rm -f /tmp/.s.PGSQL.9999; } || /usr/bin/test ! -S /tmp/.s.PGSQL.9999"

Any question we will be happy to answer

Thanks, Guille
Steps To Reproduce* start pgpool (with start on boot enabled)
* kill machine (ex kill virtual machine, remove power, force panic, etc)
* pgpool doesnt start automatically because that files, failing until manual deletion
TagsNo tags attached.

Activities

nglp

2019-10-16 18:14

reporter  

pgpool.conf (4,479 bytes)

pengbo

2019-10-17 10:27

developer   ~0002931

Yes.
If the socket left, Pgpool-II startup will fail.
So far, you need to manually remove socket files before starting Pgpool-II.

nglp

2019-10-17 15:16

reporter   ~0002932

Hi pengbo,

So its a normal behaviour, could i ask you why? i mean, what is the reason for that

We will go ahead with our workaround

Thanks for your response

Best regards, Guille

pengbo

2019-10-21 16:49

developer   ~0002934

> So its a normal behaviour, could i ask you why? i mean, what is the reason for that

Because at startup Pgpool-II doesn't check if the PID or socket files exist.
So, we would like to improve the startup process.

Thank you for your comment.

nglp

2019-10-21 17:03

reporter   ~0002935

Then, check is going to be implemented in code?

If not, please feel free to close this issue

Many thanks, Guille

pengbo

2019-10-21 17:06

developer   ~0002936

> Then, check is going to be implemented in code?

Yes. It will be implemented in the next major release.

Issue History

Date Modified Username Field Change
2019-10-16 18:14 nglp New Issue
2019-10-16 18:14 nglp File Added: pgpool.conf
2019-10-17 10:27 pengbo Note Added: 0002931
2019-10-17 15:16 nglp Note Added: 0002932
2019-10-21 16:49 pengbo Note Added: 0002934
2019-10-21 17:03 nglp Note Added: 0002935
2019-10-21 17:06 pengbo Note Added: 0002936
2019-10-21 17:06 pengbo Assigned To => pengbo
2019-10-21 17:06 pengbo Status new => resolved