[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postgresql-problem



Oliver, 

Thanks for your reply.

On Mon, Jun 19, 2000 at 10:53:11PM +0100, Oliver Elphick wrote:
> Johann Spies wrote:
>   >I got this message when my computer rebooted.
>   >
>   >FATAL: StreamServerPort: bind() failed: Permission denied
>   >        Is another postmaster already running on that port?
>   >        If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
>   >/usr/lib/postgresql/bin/postmaster: cannot create UNIX stream port
>   >
>   >But there is no /tmp/.s.PGSQL.5432
>   >
>   >Trying to start postgresql as root gives the same message.
> 
> ...so it is presumably not a permissions problem with /tmp.
> 
> Please run postmaster through strace (add it to the command
> in postgresql-startup) and post the output for a little while before
> the failure (perhaps from the socket() call); that might give some
> clues.

The first reference to socket in the output is in the error message:

open("/etc/init.d/postgresql", O_RDONLY) = 4
lseek(4, 0, SEEK_CUR)                   = 0
read(4, "#! /bin/sh\n#\n# To stop postgre"..., 80) = 80
lseek(4, 0, SEEK_SET)                   = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fcntl(4, F_GETFL)                       = 0 (flags O_RDONLY)
fstat(4, {st_mode=S_IFREG|0755, st_size=911, ...}) = 0
lseek(4, 0, SEEK_CUR)                   = 0

... about 100 lines removed

SYS_175(0, 0xbffff188, 0xbffff108, 0x8, 0) = 0
SYS_175(0x2, 0xbffff108, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff188, 0xbffff108, 0x8, 0) = 0
SYS_175(0x2, 0xbffff108, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff7a4, 0xbffff724, 0x8, 0) = 0
brk(0x80bf000)                          = 0x80bf000
SYS_175(0x2, 0xbffff724, 0, 0x8, 0x2)   = 0
SYS_175(0, 0, 0x80b40a0, 0x8, 0)        = 0
SYS_175(0, 0xbffff680, 0xbffff600, 0x8, 0) = 0
brk(0x80bf800)                          = 0x80bf800
SYS_175(0x2, 0xbffff600, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff6ec, 0xbffff66c, 0x8, 0) = 0
lseek(4, -9, SEEK_CUR)                  = 902
fork()                                  = 1144
SYS_175(0x2, 0xbffff66c, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff79c, 0xbffff71c, 0x8, 0) = 0
SYS_175(0x2, 0xbffff71c, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff79c, 0xbffff71c, 0x8, 0) = 0
SYS_174(0x2, 0xbffff524, 0xbffff498, 0x8, 0x2) = 0
wait4(-1, Starting PostgreSQL postmaster
FATAL: StreamServerPort: bind() failed: Permission denied
	Is another postmaster already running on that port?
	If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
/usr/lib/postgresql/bin/postmaster: cannot create UNIX stream port
[WIFEXITED(s) && WEXITSTATUS(s) == 1], 0, NULL) = 1144
SYS_175(0, 0xbffff678, 0xbffff5f8, 0x8, 0) = 0
SYS_175(0x2, 0xbffff5f8, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff67c, 0xbffff5fc, 0x8, 0) = 0
SYS_175(0x2, 0xbffff5fc, 0, 0x8, 0x2)   = 0
SYS_175(0x2, 0xbffff71c, 0, 0x8, 0x2)   = 0
--- SIGCHLD (Child exited) ---
wait4(-1, 0xbffff5d4, WNOHANG, NULL)    = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
SYS_174(0x2, 0xbffff51c, 0xbffff490, 0x8, 0x2) = 0
SYS_175(0, 0, 0x80b4384, 0x8, 0)        = 0
SYS_175(0, 0xbffff188, 0xbffff108, 0x8, 0) = 0
SYS_175(0x2, 0xbffff108, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff18c, 0xbffff10c, 0x8, 0) = 0
SYS_175(0x2, 0xbffff10c, 0, 0x8, 0x2)   = 0
read(4, "\nexit 0\n\n", 911)            = 9
SYS_175(0, 0, 0x80b4384, 0x8, 0)        = 0
SYS_175(0, 0xbffff188, 0xbffff108, 0x8, 0) = 0
SYS_175(0x2, 0xbffff108, 0, 0x8, 0x2)   = 0
SYS_175(0, 0xbffff18c, 0xbffff10c, 0x8, 0) = 0
SYS_175(0x2, 0xbffff10c, 0, 0x8, 0x2)   = 0
SYS_175(0x2, 0x80b4384, 0, 0x8, 0x2)    = 0

> Please try also `lsof | grep 5432' and see what you get.  (That should
> report any existing use of port 5432.)

lsof reports nothing:

$lsof | grep 5432
$

I do not know enough about strace to find the problem. I hope you can
help.

Regards.
Johann
-- 
J.H. Spies, Hugenotestraat 29, Posbus 80, Franschhoek, 7690, South Africa
Tel/Faks 021-876-2337 Sel/Cell 082 898 1528(Johann) 082 255 2388(Hester)
     "There is therefore now no condemnation to them which 
      are in Christ Jesus, who walk not after the flesh, but
      after the Spirit."              Romans 8:1 



Reply to: