Netscape not closing sockets - reposting

Netscape not closing sockets - reposting

Post by Pekka K. Kurk » Thu, 09 Mar 2000 04:00:00



Hi!

This problem seems  to be as old as Netscape... Netscape obviously does
NOT close open sockets properly. So after connections to some WWW
servers (which also don't seem to close connections after some timeout)
the sockets remain* in states like CLOSE_WAIT or  FIN_WAIT1 for
hours. This did not bother me further but since I am now using an ISDN
router that fires only when traffic comes up this is extremely annoying
and costs a lot of $$$ because the router makes a lot of unnecessary
connects to the ISP.  Is there anything I can do about this? Any chanche
to kick out those sockets even by brute force if not otherwise possible?

Any help will be appreciated!

best regards,
Pekka

--
(Mr.) Pekka K. Kurki
Intellectics GesmbH
Schlossstrasse 59, A-2551 Enzesfeld, Austria
Tel. +43 2256 815811, Fax +43 2256 815819

www: http://www.veryComputer.com/
wap: http://www.veryComputer.com/

 
 
 

Netscape not closing sockets - reposting

Post by Andreas Hoffman » Fri, 10 Mar 2000 04:00:00



> Hi!

> This problem seems  to be as old as Netscape... Netscape obviously does
> NOT close open sockets properly. So after connections to some WWW
> servers (which also don't seem to close connections after some timeout)
> the sockets remain* in states like CLOSE_WAIT or  FIN_WAIT1 for
> hours. This did not bother me further but since I am now using an ISDN
> router that fires only when traffic comes up this is extremely annoying
> and costs a lot of $$$ because the router makes a lot of unnecessary
> connects to the ISP.  Is there anything I can do about this? Any chanche
> to kick out those sockets even by brute force if not otherwise possible?

> Any help will be appreciated!

> best regards,
> Pekka

Normally Netscape shuts down the sockets on exit.
If you have dynamic IP and Dial-On-Demand (e.g. over a ISDN-Router),
Netscape tries to connect and shut down the sockets, but may have a new
IP, so the packets coming back won't find you.
The RST-provoking Patch shifts the IP adresses, so that the sockets can
be closed.
(i.e. The WWW-Server detects that the IPs are no longer valid and
terminates the connection.)

If you wan't to force that no packets are sent when the IP is invalid,
you can use a skript to firewall these out. It can be found at SuSE,
looking for dynamic IPs.

Andreas

 
 
 

Netscape not closing sockets - reposting

Post by netp.. » Fri, 10 Mar 2000 04:00:00


Quote:> This problem seems  to be as old as Netscape... Netscape obviously
> ...
> the sockets remain* in states like CLOSE_WAIT or  FIN_WAIT1 for
> hours. This did not bother me further but since I am now using an ISDN

CLOSE_WAIT implies that the system has recedived a FIN from the other
side, but the application has not yet called close/shutdown. Indeed,
that could be a problem with netscape not paying attention to what the
stack tells it. Or it could be a hole in process termination that leaves
endpoints in CLOSE_WAIT - that would be an os/stack bug.

However, FIN_WAIT_1 is an active retransmit state - one that can only be
entered upon a proper call to close or shutdown. If the FIN the system
has sent has not been ACKed by the remote, it is supposed to retransmit
timeout and go away. Just how long that will take will depend on the
measured round-trip time when the FIN was sent.

rick jones
--
these opinions are mine, all mine; HP might not
want them anyway... :)
feel free to email, or post, but please do not do
both...

Sent via Deja.com http://www.veryComputer.com/
Before you buy.

 
 
 

1. Sockets: close() does not close!?

Hi,

short: close() in a child process does not close the socket. Why?

long:
I have a problem with a server application that I'm writing.
I create a listening socket, wait for connections with select and once
there is an incoming connection I fork() and start exchanging data.

So far no problem. But when I try to close() the socket at the end of the
child process the socket does not really get closed.
close() returns no errors, yet the client application never notices that
the connection has been closed.
I have looked at the tcp/ip packets with tcpdump while debugging the
server/child process - when close() gets called in the child no FIN
packets are sent. I have also noticed that the FIN packets are sent only
once the _parent_ terminates.

To find out where the problem is coming from (threads or sockets) I have
removed the fork() and put the child's code directly into the parent. This
way close() works as it should.

One solution I have found is to use shutdown() instead of close() in the
child. This closes the connection right away as it should.

What I don't understand is why close()ing a socket in a child does not
work, while shutdown() does. Could someone please explain?

I'm writing this code on Linux, kernel 2.4.16 FWIW.

thanks, Max

2. floppy26.fs gets as far as wd3 or hd3 and hangs up?

3. shutdown(s, 2) vs close(s) for closing unix domain sockets

4. unable to unlock my screen

5. Closing sockets and closing connections

6. Booting Linux from Dos, problem with boot disk !

7. socket close doesn't really close

8. How to find library to compile against

9. Netscape 4.72 on Suse 6.4: close window aborts instead of closes

10. Sockets not closing in 1.3.66

11. HP-UX 10.2: Could not close remote socket due to RPC error.

12. RAW sockets not closing

13. JServ 1.1 sockets do not close properly