Operating System - HP-UX
1753900 Members
8059 Online
108810 Solutions
New Discussion юеВ

Re: Socket permission issue

 
Laurent Menase
Honored Contributor

Re: Socket permission issue

your program looks ok, so things need to be look on server side,
- tusc from start is probably difficult


Also is it the first time you start your program that it fails or is it after some time?



You would probably gain some time contacting hp support. - some internal private tools can give informations about listening socket status.


Laurent Menase
Honored Contributor

Re: Socket permission issue

in fact it can happen also if the listen queue of the server process is full, or if the server called shutdown() over the listening socket.
Jerome C
Occasional Advisor

Re: Socket permission issue

Thanks Laurent,

there is a part of the tusc as follow, can the unlik be the cause?

[12900] socket(AF_INET, SOCK_STREAM, 0) ............................................................................................................................................. = 11

[12900] setsockopt(11, SOL_SOCKET, SO_REUSEADDR, 0x9fffffffffffe3b0, 4) ............................................................................................................. = 0

*optval: 0x1

[12900] sigvector(SIGPIPE, 0x9fffffffffffe390, 0x9fffffffffffe3a0) .................................................................................................................. = 0

vec.sv_handler: SIG_IGN

vec.sv_mask: EMPTY SET

vec.sv_flags: SV_RESETHAND

ovec.sv_handler: SIG_IGN

ovec.sv_mask: SIGHUP|SIGINT|SIGQUIT|SIGTRAP|SIGEMT|SIGPIPE|SIGALRM|SIGTERM|SIGUSR1|SIGCLD|SIGPWR|SIGVTALRM|SIGPROF|SIGIO|SIGWINCH|SIGTSTP|SIGCONT|SIGTTIN|SIGTTOU|SIGURG|SIGLOST|_SIGDIL

ovec.sv_flags: 0

[12900] bind(11, 0x9fffffffffffe3d0, 16) ............................................................................................................................................ = 0

sin_family: AF_INET

sin_port: 9008

sin_addr.s_addr: 0.0.0.0

[12900] fcntl(11, F_GETFD, 0) ....................................................................................................................................................... = 0

[12900] fcntl(11, F_SETFD, 1) ....................................................................................................................................................... = 0

[12900] fcntl(11, F_GETFL, 0) ....................................................................................................................................................... = 2

[12900] fcntl(11, F_SETFL, 65538) ................................................................................................................................................... = 0

[12900] listen(11, 100) ............................................................................................................................................................. = 0

[12900] socket(AF_UNIX, SOCK_STREAM, 0) ............................................................................................................................................. = 12

[12900] setsockopt(12, SOL_SOCKET, SO_REUSEADDR, 0x9fffffffffffe374, 4) ............................................................................................................. = 0

*optval: 0x1

[12900] sigvector(SIGPIPE, 0x9fffffffffffe350, 0x9fffffffffffe360) .................................................................................................................. = 0

vec.sv_handler: SIG_IGN

vec.sv_mask: EMPTY SET

vec.sv_flags: SV_RESETHAND

ovec.sv_handler: SIG_IGN

ovec.sv_mask: EMPTY SET

ovec.sv_flags: SV_RESETHAND

[12900] unlink("/tmp/SocketStream.9008") ............................................................................................................................................ = 0

[12900] bind(12, 0x9fffffffffffe390, 94) ............................................................................................................................................ = 0

sin_family: AF_UNIX

sun_path: /tmp/SocketStream.9008


Thanks

J.
Laurent Menase
Honored Contributor

Re: Socket permission issue

no the unlink() is there to remove any remaining socket fil before binding and recreate the socket file - else bind would fail

in fact you need to look for syscalls call on fd=12
Laurent Menase
Honored Contributor

Re: Socket permission issue

Finally how did it end up ? Did you find the solution?