Ports closure

6 views
Skip to first unread message

Julien Dumont

unread,
Mar 15, 2012, 10:30:26 AM3/15/12
to SpoVNet
Hi dear spoVnet team,

I have some troubles with port listening in using ariba.

Let me explain, imagine that a user initiates a spoVnet and to do so,
opens the port 2500 (endpoints).
So, if I check on my Linux console by execute nstat -tulpn, the port
2500 is listened.

Now, the same user quits the spoVnet by using the shutdown function
(with all necessary deletion),
if I check again, the port 2500 is still listened.

So if a second user joins the spoVnet created by the first one, they
cannot communicate with MCPO.

What I need to do to close the port and reopen it ?

Thanks a lot,

Bye

omn...@mario.n-ten.de

unread,
Mar 15, 2012, 12:56:35 PM3/15/12
to SpoVNet
Hi Julien,

can you please try if you're having the same issue with the PingPong
example?

If not, please compare your shutdown function with the one from the
PingPong example. (http://ariba-underlay.org/wiki/Documentation/
Tutorial/PingPong)

I don't have this issue here, so I assume it's in your shutdown
routine.

Best, Mario

Jean-Baptiste

unread,
Mar 16, 2012, 3:30:16 AM3/16/12
to SpoVNet
Hi Mario,

I'm working with Julien and I think I managed to reproduce the error
with the Ping Pong.
Actually in the Pinp Pong example, after the shutdown process you
close the application and therefore the computer frees all ports the
application was using.

In the shutdown process I added a sleep of 5 seconds after delete
ariba. In a Linux console I do a netstat -tulpn during these 5 seconds
and I see that the port is still listening. So the shutdown process
doesn't close the port. Can you tell me if you get the same result?

In our application we can shut the network without closing the
application and therefore the port is still listening. To solve this
problem I added :
close(poll_fd.fd);
after //end while(!terminate)
in TPoverTCP::master_listener_thread_starter(void *argp) in
tp_over_tcp.cpp

Regards,
JB

On Mar 15, 5:56 pm, "omni...@mario.n-ten.de" <omni...@mario.n-ten.de>
wrote:

Roland Bless

unread,
Mar 16, 2012, 3:56:53 AM3/16/12
to spo...@googlegroups.com, Jean-Baptiste
Hi Jean-Baptiste,

Am 16.03.2012 08:30, schrieb Jean-Baptiste:
> In our application we can shut the network without closing the
> application and therefore the port is still listening. To solve this
> problem I added :
> close(poll_fd.fd);
> after //end while(!terminate)
> in TPoverTCP::master_listener_thread_starter(void *argp) in
> tp_over_tcp.cpp

Yes, I guess you actually catched a bug!
I'll add a
close(master_listener_socket);
in the trunk.

Thanks,
Roland

Reply all
Reply to author
Forward
0 new messages