Error reported after restart of pgpool service or pgpool host
Error:-
pid 28631: FATAL: failed to bind a socket: "/var/run/edb-as/.s.PGSQL.9999"
pid 28631: DETAIL: bind socket failed with error: "No such file or directory"
Solution:-
To resolve this issue change the default directory to some another directory with correct permission
In my case I have modified the location of socket_dir in pgpool.conf file.
1. In pgpool.conf file check the location of socket_dir.
socket_dir = '/var/run/edb-as'
2. The location of socket_dir should not be in in /var/run location. so I have created a file in root directory ahc change the owner to enterprisedb.
root@ip-172-31-80-35:/var/run# mkdir /ahc
root@ip-172-31-80-35:/var/run# chown enterprisedb:enterprisedb /ahc
root@ip-172-31-80-35:/var/run# cd /etc/edb/edb-pgpool42
root@ip-172-31-80-35:/etc/edb/edb-pgpool42# vi pgpool.conf
socket_dir = '/ahc'
Ex. socket_dir = '/var/run/edb-as' to socket_dir = '/ahc'
3. Now you can restart server/Service.
root@ip-172-31-80-35:/etc/edb/edb-pgpool42# systemctl start edb-pgpool42.service
root@ip-172-31-80-35:/etc/edb/edb-pgpool42# systemctl status edb-pgpool42.service
● edb-pgpool42.service - pgpool-II service script for EDB Postgres Advanced Server
Loaded: loaded (/lib/systemd/system/edb-pgpool42.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-12-26 09:06:13 UTC; 6s ago
Process: 1780 ExecStart=/bin/bash -c /usr/edb/pgpool4.2/bin/edb-pgpool42.sh (code=exited, status=0/SUCCESS)
Main PID: 1781 (pgpool)
Tasks: 33 (limit: 1147)
Memory: 143.6M
CGroup: /system.slice/edb-pgpool42.service
├─1781 /usr/edb/pgpool4.2/bin/pgpool -D -f /etc/edb/edb-pgpool42/pgpool.conf -n -F /etc/edb/edb-pgpool42/pcp.conf >
├─1791 pgpool: wait for connection request
├─1792 pgpool: wait for connection request
├─1793 pgpool: wait for connection request
├─1794 pgpool: wait for connection request
├─1795 pgpool: wait for connection request
├─1796 pgpool: wait for connection request
├─1797 pgpool: wait for connection request
├─1798 pgpool: wait for connection request
├─1799 pgpool: wait for connection request
├─1800 pgpool: wait for connection request
├─1801 pgpool: wait for connection request
├─1802 pgpool: wait for connection request
├─1803 pgpool: wait for connection request
├─1804 pgpool: wait for connection request
├─1805 pgpool: wait for connection request
├─1806 pgpool: wait for connection request
├─1807 pgpool: wait for connection request
├─1808 pgpool: wait for connection request
├─1809 pgpool: wait for connection request
├─1810 pgpool: wait for connection request
├─1811 pgpool: wait for connection request
├─1812 pgpool: wait for connection request
├─1813 pgpool: wait for connection request
├─1814 pgpool: wait for connection request
├─1815 pgpool: wait for connection request
├─1816 pgpool: wait for connection request
├─1817 pgpool: wait for connection request
root@ip-172-31-80-35:/etc/edb/edb-pgpool42#
No comments:
Post a Comment