Postgres startup error
Posted on 2006-05-29
I installed postgres on my RHES a while ago and haven't worked with startup scripts yet, so every time I reboot my server I start postgres manually, changing to user postgres and executing this:
$ postmaster -D /usr/share/pgsql/data
or, in the background:
$ postmaster -D /usr/share/pgsql/data >logfile 2>&1 &
Now when I try starting postgres, I get this error:
LOG: StreamServerPort: bind() failed: Cannot assign requested address
Is another postmaster already running on port 5432?
If not, wait a few seconds and retry.
postmaster: cannot create INET stream port
I've run netstat -a, netstat -an and ps -ef |grep '5432', 'postgres' and 'postmaster'
Nothing is running on port 5432 and postgres isn't running on any port.
The environment variables are probably not the problem, but I've checked them and the paths to postgres, pg_ctl and pgsql files are in /etc/profile and $env confirms the paths are recognized.
/var/log/messages repeats the same error, and postgres doesn't have a log file in /var/log, only an executable. I've checked these pages and the postgres website for clues, no go so far.
Why won't postgres start?