> interesting. Firstly, the TServerSocket connects correctly to the
> specified port. What goes wrong is the TServerSocket::GetLocalPort()
> call.
Well, doesn't look like:
lpnp256 ~ /Raid/opt/root/bin/root
[...]
root [0] TServerSocket *ss=new TServerSocket(10005,kTRUE);
lpnp256 ~ lsof -P | grep root.exe | grep LISTEN
root.exe 15571 bertou 11u IPv4 406279 TCP *:5415
(LISTEN)
lpnp256 ~ telnet localhost 10005
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
lpnp256 ~ telnet localhost 5415
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
The service is bound to another port. A strace of the process gives:
bind(4, {sin_family=AF_INET, sin_port=htons(10000), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(635), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(10001), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(636), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(10002), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(637), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(10003), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(638), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(10004), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(639), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(5415), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bind(5, {sin_family=AF_INET, sin_port=htons(640), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
bind(4, {sin_family=AF_INET, sin_port=htons(10006), sin_addr=inet_addr("0.0.0.0")}}, 16) = 0
bind(5, {sin_family=AF_INET, sin_port=htons(641), sin_addr=inet_addr("0.0.0.0")}}, 16) = -1 EACCES (Permission denied)
And BTW, I don't understand what these binds on 635 and higher are
supposed to be, in a code which just does new TServerSocket;delete.
--
Xavier
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:08 MET