36 dukes dollars !!!! : socket disconnects itself on the internet

Hi all,
It's not very nice, but I have all these dukes to give to the persons that want to help me. I have a problem I'm working on for weeks, making me mad.
Here are the dukes I'll distibute (I swear I will if responses that help me, even a little).
http://forum.java.sun.com/thread.jsp?forum=4&thread=302722
http://forum.java.sun.com/thread.jsp?forum=31&thread=269487
http://forum.java.sun.com/thread.jsp?forum=57&thread=291727
Now, here is my problem :
I have created a server using the nio package. Each client connects to the server, and the socket isn't closed until the client asks for it. The connection could exist for ages.
On my local network, this works perfect. But, when I install my server on the internet (on a professionnal computer with fix IP), and that I connect one or more clients, the connections never stay alive more than 30mn. They disconnect by themselves. I have watched the packets received and sent by the client. The client doesn't send or receive any packet (as he is connected to the server), and still doesn't receive or send any packet as the server has already seen that the socket was closed (The server received a -1. Notice that I don't know where this -1 comes from, and that it is what I want to know).
On my local network, my server is installed on a red-hat 7.3.
On the internet, my server is installed on a Slackware 7.
If you have any idea, thank you very much for helping. I'm not shure it is a java problem, but anyway, I post my question here ! If it is a basic network problem, socket configuration on the server, security problem on Linux, or else, help is still accepted and rewarded.
Thank you.
Greg.

Your observation regarding Timeouts and socket connections
being open (outside your intranet) is correct.
As another person has pointed out you may extend this time
limit by setting the SO timeout value - but this needs
to be done at both client and server sides.
Do you think it would be reasonable to expect your client
software users to tinker with their IP param values on
their server - in order to use your software?
You might want to look into an alternate approach - like
opening another socket connection from the client if the
present connection is already closed. Just so you can
circumvent the timeout issue.
George

Similar Messages

  • My Macbook keeps disconnecting itself from the internet

    Recently, I bought a Macbook Pro in September and ever since I got it, the connection with the internet have been weird. It keeps disconnecting itself from the internet. I know it's not my router or home internet because my Touch and other laptops have a consistent connection. The Airport icon has a full bar. I can reconnect, but I have to go to Network Diagnostics constantly to connect back to the internet, only to be disconnected 10 seconds later.
    Out of desperation, I figured I do a clean install of Snow Leopard (why not since my Macbook is new anyways)! The problem is still there, the Macbook is updated to Version 10.6.1. Can someone help please? Is it my network settings? Is anyone else having this problem? Ahhhh

    Same problem, however my internet tends only to disconnect upon awakening after an extended period of sleep or after several hours of use. The problem does not occur when I connect to my schools network. I'm not sure whether the problem lies with my airport extreme - it works fine with other computers and registers with a green light even when faulty on my MBP. Also, simply turning the airport on and off does not always work for me - at some stages I have had to reset it - still to no avail. Connecting the base station to my computer by the ethernet connection does however re-establish the wireless connection on occasion. Also, I find after long periods of use my usually full airport connection drops a few bars and the internet slows down. Restarting the computer fixes this! Anyone got any idea where the problem lies??

  • N85- keeps connecting itself to the Internet

    Hello!
    My phone (N85) keeps connecting itself to the internet every minute or so.
    This is driving me crazy cause I don't have a data plan.
    So I had to check my phone every minute and disconnected the Internet.
    Now I'm back home and it keeps connecting itself to WLAN.
    What should I do?!
    'Thanks in advance! :'(
    Solved!
    Go to Solution.

    Actually, if you just remove the mobile network access point your phone will only be able to connect to WLAN and so no connection when out of range from your network at home.
    First select the offline profile, then delete the mobile data access point in Tools > Settings > Connection > Destinations
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

  • WRT54G V8 Just disconnects me from the internet

    HI Everyone,
         I am new to the forums so please forgive me
           I have a WRT56G V8 that I got maybe a year or two ago, because my last Linksys router V6 just bricked on me after I did a software update.. It said it was rebooting the router but never came back, the lights just kept flashing on it and that was all she wrote.
         So I did a RMA back to linksys, and they sent me this VERSION 8....
             Well I have CABLE INTERNET, and I leave everything pluged in and turned on all the time, I was told by my ISP to stop turning off the router and modem at night about a 2 years ago, so I leave everything connected and turned on and pluged into my UPS, so if the power goes out, I am connected still if I need the internet.
           Well, as of a couple days ago, I can just be sitting here typing away and talking to someone and all of a sudden, everything just disconnects.. Xchat, AIM, MSN, Email client, gtalk and then instantly reconnects like 5 sec later.
              I have been calling my ISP and griping to them about this and they after the 4th time this happened last week and I got tired of calling in, they said ok try your internet connection WITHOUT your router for 4 days and see if it disconnects again.
          Ok, well this has been 4 days and my internet is going strong and HAS NOT disconnected...
             I was using opendns at that time and thought that was it, so I went in and eraced the settings by using the DEFAULT SETTINGS button inside the router control panel because, for some reason, holding the RESET BUTTON in the back DOES NOT default back to the ADMIN ADMIN password and log on it retained all my settings.
           Anyways, after defaulting back to nomal settings unpluged it from the back and then back in just to make sure everything was reset,  and reset the router up, I did an upgrade of the firmware and it has the latest firmware.
    BOOM IT HAPPENED AGAIN!
    So I am here to find out WHY it is happening and if my router is salvageable? I havent used it in 4 days, I am directly plugged in.
    Thanks,
    Christopher
    ~~ Christopher ~~
    Check out my blog:
    http://life-accordingtochristopher.blogspot.com/

    After a firmware upgrade, you must reset the router to factory defaults, then setup the router again from scratch.  If you have not done this since your last firmware upgrade, please do this now and see if it corrects your problem.  If you saved a router configuration file, DO NOT use it.
    To reset the router press and hold the reset button for 45 seconds...Release the reset button...Unplug the power cable from your router, wait for 45 seconds and re-connect the power cable...Now re-configure your router and see if this fixes your problem...

  • HT201415 My new i pad keeps disconnecting me from the internet not sure why.

    Recently purchased the i pad and keeps disconnecting from the internet? Not sure why?
    Shaun

    MacBook Pro (Late 2008 and 2009) forums are here:
    http://discussions.apple.com/category.jspa?categoryID=251

  • IChat disconnects me from the internet every 30 mins....why?

    I'm running 10.5.6 but this was going on during 10.5.5 as well: When I launch iChat (4.07) my airport goes out and/or I'm disconnected from the internet for about 30 seconds after which everything reconnects. Then, about every 30 minutes it does the same thing - even while video chatting. I thought it may be my router because this does NOT happen at my brother's - but Adium and Skype w/ Video do NOT disconnect me or themselves when I'm connected to my router -- so I'm at a loss. Any ideas?

    iChat does tend to show up a lot more minor glitches with the Internet connection than other apps.
    Obviously a Mail app only uses it now and then as does a Web Browser.
    A download or Video Stream would show something more regular with pauses and slowdowns or stuttering.
    A WiFi Connection would be likely to be influenced by external factors like power surges in cabling, Microwaves the other side of walls (General Electro Magnetic Stuff) going on around, either near either Router of computer or in between.
    10:30 PM Saturday; January 3, 2009

  • IChat disconnects me from the internet every 30 mins....

    I'm running 10.5.6 but this was going on during 10.5.5 as well: When I launch iChat (4.07) my airport goes out and/or I'm disconnected from the internet for about 30 seconds after which everything reconnects. Then, about every 30 minutes it does the same thing - even while video chatting. I thought it may be my router because this does NOT happen at my brother's. Adium and Skype w/ Video do NOT disconnect me or themselves when I'm connected to MY router -- so I'm at a loss. Any ideas?

    iChat does tend to show up a lot more minor glitches with the Internet connection than other apps.
    Obviously a Mail app only uses it now and then as does a Web Browser.
    A download or Video Stream would show something more regular with pauses and slowdowns or stuttering.
    A WiFi Connection would be likely to be influenced by external factors like power surges in cabling, Microwaves the other side of walls (General Electro Magnetic Stuff) going on around, either near either Router of computer or in between.
    10:30 PM Saturday; January 3, 2009

  • Why does my ipod disconnect me from the internet at a certain time every night?

    Every night at 9 pm my Ipod disconnects me from every app that requires internet. It says I am still connected to the internet but I still can't access my apps. I'm not sure what time it reconnects me in the morning. My Ipod had not been doing this until I got the latest update. I'm not sure if there is anything I can do to change this but if there is I would like to. I have gone through my Ipod and there are no restrictions set that I have noticed.

    Maybe your Internet Service Provider shuts down some server at 9pm every day.

  • I have an iMac OS X 10.6.8 and have problems with the backup Disk for Time Machine disconnecting itself with the message that I ejected it improperly.. It ejected itself - why?

    I have an iMac OS X 10.6.8 and have problems with the backup drive to Time Machine ejecting itself and so does not automatically backup the way it is meant to do. It is connected with an USB cable to my iMac. What could cause this - malfuntioning drive?

    The "iLife" apps are not part of any Mac operating system install and are a separate purchase.
    Once you get past 10.6.6 you can purchase and download iPhoto, GarageBand and iMovie. iWeb and iDVD have been discontinued.
    Snow Leopard 10.6.6 and higher include the App Store application which is what you use to purchase Lion.

  • My modem works just fine, but my airport extreme refuses to connect to the internet.  I even reset it more than once, changed the DNS servers and still nothing.  Help

    Ok so recently we were having problems with our phone.  We had to disconnect our modem in order to fix the phone lines and when that happened, our airpot extreme disconnected itself from the internet.  No matter what I did i could not get it to connect back.  I would power down the modem, I would reset the AE and nothing would happen.
    I tried changing the DNS server and nothing happened.  I always get the same messages in the airport utility app: No internet connection and no DNS server
    Nothing I seem to do works.  I do know for a fact though, that the problem is not the modem.  I have connected it through ethernet to other devices and the internet has worked just fine. 
    Please please please if anybody sees this help me out!!

    Since you feel good about having internet access up to your Airport, I would suggest as a next step checking your Airport's status light to see if it is giving any clues as to what may be going on. Below is some info on what the light can indicate
    AirPort Express Status light sequences and what they indicate.
    No light (Off) - AirPort Express is unplugged
    Solid green - AirPort Express is on and working properly.
    Flashing amber - AirPort Express is not set up or cannot establish a connection to the network or
    the Internet. Use AirPort Utility to find out the cause. See “If Your AirPort Express
    Status Light Flashes Amber” on page 20.
    Solid amber - AirPort Express is starting up.
    Flashing amber and green - There may be a problem starting up. AirPort Express will restart

  • Ipod disconnects itself

    hi guys, my i-pod mini 'disconnects' itself from the PC. i plug it in the USB, it says 'Do Not Disconnect' as expected, then after a few moments, it sort of disconnects itself - the PC can't see the i-pod anymore and the i-pod is already displaying the main menu...
    how does one solve this? i read about reformatting the i-pod, but i think the i-pod has to stay connected to the PC if i'll run the software update, is this correct? so that's not an option for me i think...
    thank you in advance!

    It seems like your iPods dead; they're really is hardly anything you can do to fix it.
    If you want to buy a new one and make some money from the old iPod check out www.ipodresq.com

  • Why does my iPad keep disconnecting itself from my Wi-Fi

    A couple of weeks ago I noticed my iPad had disconnected itself from Wi-Fi, so reconnected and thought nothing of it. The next time I turned it on, it had disconnected again (Wi-Fi was still on though) so I clicked in to settings again and back onto my network. All works fine - good - but then the NEXT time I turned it on (from sleep, not fully off) it had disconnected AGAIN.
    This has now become the norm for my iPad. Constantly disconnecting itself from the network and doesn't reconnect automatically when I fire it back up.
    Can anyone think what might be causing this, it's pretty annoying.
    (I've tried switching it off fully and back on. No dice...)

    Hi,
    Try changing your security options on your router to WPA-PSK [TKIP] + WPA2-PSK [AES].  You will need to log into your wireless router to change this.
    It worked for me.  Before it was dropping frequently and after the change, it is still connected over a day later.
    Paul

  • Solution for Ipod disconnecting itself.

    I've been stressing over my video ipod disconnecting itself from the usb port for awhile now. Just the other day i went out and got a new usb2.0 pci card, and it works like it should/used to.
    Hope this helps someone

    If the ipod is set to "Auto Update" then thats what its suppose to do

  • ISight voluntarily disconnects itself

    Hi,
    I'm using MacBook Pro 15" 4,1 version. I'm using Hardware Growler, so I'm notified when a device is connected/disconnected from my Mac.
    After updating to 10.6.3 my internal iSight started disconnecting itself on regular bases. It's more probable when I'm using it, for example with flash youtube video recorder (stable version of flash player and the new RC version as well). Sometimes it happens even when I'm not using the iSight at all.
    It disconnects, connects, disconnects, connects and sometimes it ends on disconnecting itself and the only way to reconnect it is to reboot, but sometimes it ends on connecting itself and it works fine for a few hours and then the whole process happens again.
    No, it is not showing up in System Profiler when it's "disconnected". I even disassembled my Mac to reconnect the cable, but this was not effective.
    Any ideas ?
    Thanks in advance.

    hl2run1 wrote:
    Hi,
    I'm using MacBook Pro 15" 4,1 version. I'm using Hardware Growler, so I'm notified when a device is connected/disconnected from my Mac.
    After updating to 10.6.3 my internal iSight started disconnecting itself on regular bases. It's more probable when I'm using it, for example with flash youtube video recorder (stable version of flash player and the new RC version as well). Sometimes it happens even when I'm not using the iSight at all.
    You've never had the issue before?
    It disconnects, connects, disconnects, connects and sometimes it ends on disconnecting itself and the only way to reconnect it is to reboot, but sometimes it ends on connecting itself and it works fine for a few hours and then the whole process happens again.
    If you keep a program like Photo Booth open for a while, do you still get disconnects?
    No, it is not showing up in System Profiler when it's "disconnected". I even disassembled my Mac to reconnect the cable, but this was not effective.
    You've voided any warranty coverage you may've been entitled to.
    Any ideas ?
    Thanks in advance.

  • Connecting out to the Internet using Sockets

    Hi,
    My project is an Internet Connection Sharing project where a no of clients try to access the Internet through a single connection (d main server). I've got a basic Java Browser that simply sends on the URL address ("www.java.sun.com") typed into a textfield by the user to a Server when a button is clicked. This is done thru basic read & write methods using an ObjectInput & ObjectOutputStreams. I've also created a socket connection out to the Internet by passing in the URL on port 80, thus establishing a connection... here's the code:
    inet_SockCon = new Socket( InetAddress.getByName( str_Buffer ), 80 );
    System.out.println( "Connected to: " +
    inet_SockCon.getInetAddress().getHostName() );
    The next step is trying to get the URL page requested back to the server and from there to the client browser where it will be displayed. I'm using a JEditorPane() on my Browser which formats the HTML data. If anyone has any ideas as to how i can do this it would be gratefully appreciated.
    Thank you.

    Use a HttpURLConnection.

Maybe you are looking for