Thread: Address already in use?
Hi Everyone, Alright, I've installed PostgreSQL 7.0.3 succesfully, but I still have a problem. When I try starting the PostgreSQL server, using the following command: /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data I get the following error: FATAL: StreamServerPort: bind() failed: Address already in use Is another postmaster already running on that port? If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. Anyone know how to fix this? Thanks. Sincerely, Justin Stayton CometFly Media, LLC. jstayton@cometfly.com
On Thu, Apr 12, 2001 at 11:20:29PM -0400, Justin S. wrote: > Hi Everyone, > > Alright, I've installed PostgreSQL 7.0.3 succesfully, but I still have a > problem. When I try starting the PostgreSQL server, using the following > command: > > /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > > I get the following error: > > FATAL: StreamServerPort: bind() failed: Address already in use > Is another postmaster already running on that port? > If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. > > Anyone know how to fix this? Thanks. This happens if postgresql was not able to quit the normal way IMO. Delete the socket and run it again. You need to clean /tmp when the system boots. Most system have this option (on FreeBSD put clear_tmp_enable="YES" in /etc/rc.conf). If you can't find it add rm -f /tmp/.s.PGSQL.* somewhere in the boot scripts as a workaround. You can even put it in the PGSQL starting script, but it's not a quite good idea... -- Players win and winners play Have a lucky day
Attachment
Justin S. writes: > /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > > I get the following error: > > FATAL: StreamServerPort: bind() failed: Address already in use > Is another postmaster already running on that port? > If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. > > Anyone know how to fix this? Thanks. Is another postmaster already running on that port? If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. -- Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simply remove /tmp/.s.PGSQL.5432. Its safe to do this in a startup script. Postgres isn't too good about removing its UNIX socket if it has a semi-nonclean shutdown (system reboot among other things). Yann On Thursday 12 April 2001 08:20 pm, Justin S. wrote: > Hi Everyone, > > Alright, I've installed PostgreSQL 7.0.3 succesfully, but I still have a > problem. When I try starting the PostgreSQL server, using the following > command: > > /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data > > I get the following error: > > FATAL: StreamServerPort: bind() failed: Address already in use > Is another postmaster already running on that port? > If not, remove socket node (/tmp/.s.PGSQL.5432) and retry. > > Anyone know how to fix this? Thanks. > > Sincerely, > > Justin Stayton > CometFly Media, LLC. > jstayton@cometfly.com > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html - -- - -------------------------------------------------------------------- Yann Ramin atrus@atrustrivalie.org Atrus Trivalie Productions www.redshift.com/~yramin AIM oddatrus Marina, CA http://profiles.yahoo.com/theatrus IRM/IRT Developer DVfootage.com developer SNTS Developer KLevel Developer When smashing monuments, save the pedstals -- they always come in handy. -- Stanislaw J. Lem, "Unkempt Thoughts" Nothing succeeds like excess. - Winston Churchill Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic. - Muad'Dib (Dune, Frank Herbert) - -------------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE61nN0x6171htvP6YRAt+MAJ4nfA7BLMetP/wGhjtr2XIUZIbNCwCgh9sm 7MeGY/H3AZ4wOITNVaxIlgk= =oeWa -----END PGP SIGNATURE-----
Yann Ramin <atrus@atrustrivalie.org> writes: > Simply remove /tmp/.s.PGSQL.5432. Its safe to do this in a startup script. > Postgres isn't too good about removing its UNIX socket if it has a > semi-nonclean shutdown (system reboot among other things). Although that's been a standard workaround for a long time, I've always considered it fairly dangerous: what if the script is invoked at a time other than system boot? Fortunately, it should no longer be necessary as of Postgres 7.1 --- we now have code to check for and remove a leftover socket file safely. I now recommend removing any automatic socket-file deletion you may have in your startup script. regards, tom lane