5

I´ve installed postgresql 9.1 on ubuntu 12.04 with pgpoolII-3.3.3 and pgPoolAdmin

If I try to run pgpool from a terminal with sudo pgpool it seems to start. Viewing ubuntu file explorer I can see how a pgpool.pid file is created at /var/run/pgpool/pgpool.id (this is the path in pgpool.conf)

But after one second the file disappears.

I have tried to change the owner of the directory and the directory permissions but nothing seems to fix it.

If after that I try to stop pgpool wiht sudo pgpool -m fast stop I got an error: Error. pid file not found

It seems like the file is created and suddenly destroyed. I´m wondering why.

If I try to run pgpool from pgPoolAdmin I got this error: pgpool start failed. pgpool.pid not found.

Like other times, it´s maybe and stupid issue and I´m not being able to solve it as i don´t have a high level of knowledge on those systems.

Any idea about what to try?

Xrry Christmas

Cesar
  • 131
  • 2
  • 7
  • Maybe is not the pid file being destroyed but that pgpool process starts and is by some reason aborted (and that´s the reason of seeing the file appear and disappear)? – Cesar Dec 26 '14 at 13:22

3 Answers3

3

Solved. I think the problem was caused by a permission problem. After trying

sudo mkdir /var/run/pgpool
sudo chmod 777 /var/run/pgpool
sudo chown postgres/postgres /var/run/pgpool
sudo postgresql service restart

It seems to be working now.

Cesar
  • 131
  • 2
  • 7
3

check the tmp directory using ls -la command and delete the file .s.PGSQL.9999 and .s.PGSQL.9898 and restart the server

Anup Gupta
  • 31
  • 2
1

Upon configuring PgPool-II, I found some documentation explaining that using the default directory /var/run/pgpool for the PID file was a bad idea, for that file could be erased when the service reboots.

The contents of the /var/run directory (including the pgpool directory) may be removed by the operating system during a reboot. The /var/run/pgpool directory should NOT be used as the location for the pgpool.pid file.

The issue seems to occur when using Ubuntu.

So a possible solution would be to store the PID file in a directory named so as to not match the name of a service that could be rebooted. For instance, you could change the pgpool.conf file :

 pid_file_name = '/var/run/pgpool4ever/pgpool.pid'

I could not try it on my own as I do not use Ubuntu, but maybe this could help someone facing a similar problem. Although I am not sure that it is very wise to go past basic Ubuntu way of working....

The Once-ler
  • 220
  • 3
  • 16