Server side does not detect network failure

Hi folks,
I coded a simple chat program. When a client connects to the multi-thread server, server shows newly connected client's IP address. Now, if the connection between client and server is down, client detects and terminates itself but server does not. The server still shows that client as connected. when I traced the server side, I found out that server was waiting at the readObject (client object input stream) line but it didn't throw any IOException. I tried to send some message to all connected client at every 20 seconds, so I expected to catch IOException when the server did not reach the client. Unfortunately, it didn't work. That is my question how can server side detect network failure?
Thanks for help.
Regards
Bulent

That is how TCP works (noting that it has nothing to do with java.)
Your solution is one of the following or some combination...
- If the server does not receive something every X time period then it disconnects.
- If the server has not received something after X time period it sends a keep alive message to the client. If the client does not respond (or the message fails) then the server disconnects.

Similar Messages

  • Windows 7 does not detect network hardware

    Using Boot Camp, I installed Windows 7.
    After restarting the computer it does not detect network hardware.
    So I cannot connect to my Wifi.
    What should I do?

    Did you download and install the Windows Support software? It was the first menu item when you ran Bootcamp Assistant. If not, run Bootcamp Assistant again and select the menu item to download the Windows Support software. Read the Bootcamp Installation Guide. http://www.apple.com/support/bootcamp/

  • TCP Read does not detect network conncetion closed error (66)

    Hi Dear all,
    Instead of LAN i am using WLAN to connect PC and mobile. All communication read and write operations are performing ok. But the only problem i am facing is that once i disconnect network connection from mobile my labview TCP read operation does not detect it and only timesout at its specified interval. Although for Bluetooth network connection if i disconnect from mobile then BT read detects it as network conncetion closed by peer error (66).
    Can someone help me on this.
    Thanks & Regards
    awais qureshi
    Solved!
    Go to Solution.

    Awais Qureshi wrote:
    Hi Dear Norbert,
    I am still waiting for your reply. Whats error you get once you unplug LAN cable? i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.Thanks
    Dear VT Kim,
    I studied your recommended article but which way Labview handles TCP close connection then. i am unable to understand how to detect Disconnection during Read Time out. Kindly help me in this.
    Regards
    awais qureshi
    I have not tested it but more likely than not you would get an error 59 when the network cable is unplugged. Error 66 is for when the network is still up and you attempt to communicate on an established connection that has been closed by the other side. This is not an error that you will se from a TCP read very often.
    Also, please keep you related question in a single thread rather than starting multiple threads for the same topic.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • AirPort does not detect networks, unless another network connection is made

    I've just done a clean install of OS 10.5 to see if this problem was software related, but it persists.
    AirPort does not detect any network the computer is near (tested in various locations) normally, but when connecting to a network via Ethernet or to another Mac via Firewire to use network sharing, it can update and load web pages as normal. A strange quirk I've noticed though, whenever connecting with ethernet or firewire, AirPort will suddenly detect the network! It still can't quite connect to WiFi properly though. While still connected through firewire or ethernet, it will have no connectivity through a self-assigned IP. If it is disconnected from ethernet and firewire again, the wireless network will still show up in a re-scan for networks but it will fail to connect.
    I've opened the computer up to ensure that the airport extreme card is seated properly as well, and that the antenna cable is secured properly.
    Any ideas as to what the issue is? Should I look into replacing the AirPort Extreme card?

    Got no answer on my original post, so I went ahead with ordering a replacement AirPort card on eBay (item #130487488014). Once installed, the iMac was able to detect and connect to networks normally... but was still unable to load any web pages. I tried on secured and unsecured networks as I did previously, and plugging directly into the router and into my Macbook Pro via firewire, with the same results as before. Safari loads pages when connected with an ethernet or firewire cable, but will not load pages on WiFi alone. I can attempt to access a router setup page via WiFi, and am prompted for a username/password, but the page itself never manages to load.
    Any clues as to what may be going on here?!

  • Windows 8 and Server 2012. Not detecting network is a domain.

    Hi Guys,
    I hope I have posted this to the correct forum.
    I have 2 x Windows 8 PCs that do not detect that they are connected to a domain (network location awareness not working). I can join them to the domain but they still don't recognise the network as a domain. Instead they identify it as "private".
    Other PCs on the network (Win XP and Win 7) work prefectly, just the windows 8 machines don't work.
    Also, when I do join them to domain I also receive this message.
    "changing the Primary Domain DNS name of this computer to "" failed. The name will remain xxxx.local. The error was: the specified domain either does not exist or could not be contacted. "
    I have tried the following
     - DHCP and DNS has being tried both as static and dynamic (can ping DNS server which is the domain controller Windows Server 2012) .
     - Updated PC NIC drivers.
     - No AV is installed on either server or PC.
     - Updated PC to windows 8.1.
     - Disabled both server and PC firewalls.
     - Check NLA service and all dependent services are running.
     - Disabled all adapters on server except for one.
    I am really hoping someone can help with this as I would really appreciate it.
    Thanks.
    Shaun

    Hi Guys,
    I managed to find a solution to the problem. I noticed that the DNS server zones did not look quite right. The _msdcs zone was missing the subfolders (dc, domains, gc, pdc).
    To fix this issue: on the NIC adapter I had to tick the box "register this connection's addresses in DNS" (found under TCP/IP v4 > advanced > DNS tab).
    I then had to remove the DNS role, reboot then re-add the role. Problem solved. Hopefully this saves someone else pulling their hair out for an entire day.

  • ITunes does NOT detect network connection when I use a 3G modem

    Hi
    since christmas iTunes has not been able to update when i commute, using a 3G USB modem. Over enabled and live WLAN or Ethernet interfaces everything works fine, but TCPdump does not register any packets at all from iTunes when only the USB 3G modem is up. All other networking activities work in this state, but iTunes erronously thinks there is no network and doesn't even initiate network activity.
    Seems iTunes tries to be smart by detecting "is there network" by asking something in the OS, rather than trying?
    Is this a bug? Am I the only one experiencing this? Is this isolated to my particular 3G modem/ISP? I don't think so...
    thanks for any enlightenment,
    peter

    Hi. Just go a bit further by process of elimination which you've already started. Here's a couple more things you can try.
    1. Different USB cable?
    2. Try plugging into another computer just to see if your iPhone will get recognised then.
    If it still deosn't work then I can only assume that the handset itself has developed some kind of fault, in which case, just book a 'Genius' appointment at your local Apple store asap and get it replaced.

  • Server.app does not authenticate network admin users

    Running fresh installation of Lion Server 10.7.3. I'm logged in as the original, local, administrator.
    I open Server.app and successfully log in to the local machine with the local administrator creditials. I create a networked user allowed to administer the machine. Close Server.app window.
    Attempt to log in as the new networked administrator. I get a message about using the server's self-signed certificate. I click accept, then the log-in shakes it head, won't let network admin log-in. Repeated attempts to log in do not show the certificate warning -- the log-in fails every time, though.
    Attempt to log is as local admin, works OK.
    How to fix?

    Hi Stefan, I have the Server app problem here on my Xserve 2009 and it happened after about 14 days of working correctly. No users or groups(850 network) show in the panes other than the two local admin users on the server. The +/- buttons are greyed out also. If you enter some letters for a search in Users/Groups it will actually display the network users containing the letters and eventually it populates the window with network users up to the usual 500+ limit but refresh and they all disappear again. Thinking back before it happened I used WGM to add a new user instead of Server and it was shortly after when the users "disappeared" and the+- buttons greyed out. I dont have much confidence in Server app at the moment and im just glad WGM/SA is still in operation. I agree with Danny_Sch that Server app starts to act strangely after using WGM
           WGM acts as usual with all my 850 users showing from the OD and Server admin shows all my services running ok. All users can log in and out fortunately at the moment. This happened initially when I migrated to Lion and I had to use my OD archive demoting and promoting to master to get it to work but I dont want to have to rebuild the whole thing again as we have very limited downtime to do it in a big institution etc. I'm trawling the net looking for a fix but no definitive answer. Has anyone reported this as a bug to Apple I wonder?

  • Wifi  does not detect networks

    Hi,
    I have an Iphone and the wifi works fine but i got a second one for my sister and with 5-6 networks in my building it cannot detect them . the "thinking circle" spins and spins and nothing .
    I mentioned i have an iphone to let you know that i know how to use it and i have a wireless network set up in my apt plus other 4 of my neighbors .
    maybe some of you experienced the same thing . i ran out of options ...is it a hardware problem ?
    PS i just upgraded both phones to 2.0
    thank you much

    Try a fresh restore on the phone (do not install a backup) and see if this solves the problem.
    Turn off your phone.
    Restart your router (i.e. turn it off at the mains for 30sec the on).
    Try accessing the network on your sisters phone only.
    Failing that book into a Genius Bar at your local Apple store as this is potentially a hardware issue, due to the fact you have a phone that works fine.

  • Got an (unlocked) iphone 4s from US and tried activating in India but it throws an error saying 'unable to activate bcos the activation server cannot be reached' ..I tried connecting to itunes through my laptop but it does not detect my iphone..pls help

    Got an (unlocked) iphone 4s from US and tried activating in India but it throws an error saying 'unable to activate bcos the activation server cannot be reached' ..I tried connecting to itunes through my laptop but it does not detect my iphone..pls help

    mithaani wrote:
    Got an (unlocked) iphone 4s from US
    As kb1951 states, unless this phone was purchased directly from Apple, it is not officially unlocked. In the US, only Apple sells officially unlocked iPhones. The message you got generally means your phone was hacked to unlock it...jailbroken...Apple's servers have detected such & are preventing your phone from activating...there's nothing wrong with the activation servers.
    You'll need a sim card from the carrier your phone is locked to in order to activate it. If you don't know what carrier, you'll have to call AppleCare in the US to determine this info. Be aware, US carriers will not authorize official unlocking unless you are a customer that used the phone on their network. Thus, there is most likely no way for you to get this phone officially unlocked.
    Good luck.

  • Hello everyone,   I just updated my 3GS from iOS 5.0.0 to 5.0.1   Since the update, Itunes says that no SIM card is detected, and the iPhone says that it cannot be activated. It also obviously does not detect any network.   I tried restarting the phone se

    Hello everyone,
    I just updated my 3GS from iOS 5.0.0 to 5.0.1
    Since the update, Itunes says that no SIM card is detected, and the iPhone says that it cannot be activated. It also obviously does not detect any network.
    I tried restarting the phone several times, removing the SIM card several times, but it did not change anything, the SIM is still not detected.

    You do not need to keep posting the same thing over and over again.
    Look to the right side of this page at "more Like this" or do a forum search.

  • HT4437 hi even when i connect my macbook and apple tv to the same wifi network i cant put on the air play mirroring option.my airplay mirroring option does not detect any device.what can i do for this?

    hi even when i connect my macbook and apple tv to the same wifi network i cant put on the air play mirroring option.my airplay mirroring option does not detect any device.what can i do for this?

    See
    http://support.apple.com/kb/TS4215

  • After installing Mountain Lion, why screen server does not detect photos from iPhoto?

    After installing Mountain Lion, why the screen server does not detect photos from iPhoto?

    I had the same problem and found the solution here:
    https://discussions.apple.com/thread/3189272

  • Satellite Pro C660-1NQ does not detect WLan network

    Hi Guys,
    We have a Toshiba Satellite Pro C660-1NQ here which does not detect the wireless network at all,
    I have checked device manager and the wireless card does not show in here.
    I tried scanning for new hardware,but nothing was found. I tried turning the wireless off/on with the function and F8 keys but still not showing in device manager or finding any new hardware.....
    Any ideas as to what i can try next?
    Cheers,
    Ash

    Hi
    It seems that the notebook would support the Atheros 802.11agn Wlan card.
    Usually the Atheros Wlan card should be listed in device manager under in the menu Network Adapters.
    If its not listed then I recommend installing the WLAN driver which can be downloaded here:
    http://aps2.toshiba-tro.de/wlan/?page=downloads
    Choose the Atheros Wireless LAN Adapter Windows 7 (32/64) 9.2.0.419.0 or newer
    Hope this helps to detect the Wlan chip!!!

  • HP installer will not detect networked LaserJet MFP M1536dnf just on some PCs

    Hello,
    this printer/scanner was working fine (printer still works fine via a Windows print server). Then scanning (via network) stopped working on one PC (Windows 7).
    Tried to uninstall drivers / HP software and reboot. Then tried to install again - HP Installer will not detect printer on the network no matter what. I can ping the IP of this printer, access its web interface without any issues on the same PC. Tried specifying IP address in the installer - does not detect, the same issue with MAC address. 
    Had a Windows 8 machine with drivers / software installed on it, tested - scanning still worked fine on that PC. Tried to remove HP software to see if problem will appear. And it did! I cannot install the same software package which I still had in downloads - it will NOT detect the printer on network.
    Upgraded printer firmware - no change, even though I don't expect this to be a printer issue as it worked fine until I have uninstalled software on this W8 machine.
    Tried using HP Scan & Print doctor. That thing doesn't see printer/scanner installed and only suggest to download and install software which is not helpfull at all.
    I also tried extracting HP installation files and finding *.inf files which could be used to add scanner via Windows directly, but haven't succeded with that (I would also be not sure how to specify network IP address in such a case anyway).
    Any help is MUCH appreciated. We are kind of stuck...
    Thanks!

    Hi,
    Run some diagnostics and see if any issues are discovered.
    There have been reported issues with the NVIDIA 650 with some of the HP PCs. Additionally, most models of the NVIDIA 650 require a 400 watt power supply as the minimum and some models require a PCI six (6) pin power connector which the 300 watt power supply in your PC is not provisioned.
    There is a BIOS update posted for your PC so you might want to consider installing that update.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • JSPM phase error : admin/user/SID does not exist

    Hi ,
    There is an error message while opening the JSPM
    Phase error report:
    "cannot read secure store properties .could not set up secure store.property admin/user/SID does not exist.msg.util.dyn.0003.com.sap.security.core.server.secstore.secstoreFS get string value
    com.sap.security.core.server.secstore.secstoreFS.Not found exception could not find a record key "admin/user/SID" in the store com.sap.security.core.server.secstore.secstorefs"
    checked the config tool secure store and found no entry maintained for /admin/user/SID.
    How to add the new entry in config tool and what is post entry procedure
    Thanks a ton

    Hello Daniel,
    You can maintain the Administrator user in secure storage using the config tool.
    By default, the value for this config tool property is user Administrator. However, when using the ABAP Engine for persistency, this user is J2EE_ADMIN.
    Following are the steps:
           1.      Start the Config Tool.
           2.      Select secure store.
                    The configuration for the secure storage in the file system appears.
           3.      Select the key admin/user/<SID>.
           4.      Enter J2EE_ADMIN in the Value: field and choose Add. 
           5.      Select the key admin/password/<SID>.
           6.      Enter the password for J2EE_ADMIN in the Value: field and choose Add.
           7.      Save the configuration.
    The corresponding link is mentioned below:
    http://help.sap.com/saphelp_nw04/helpdata/en/ae/b7ceff3e40fd42be3a6503236f9746/content.htm

Maybe you are looking for

  • New iTunes, Old iPod

    My iTunes was on an old computer that was cleaned, so all the files were deleted. All my songs are still on my iPod, but the library on the iTunes, which I recently reinstalled, is empty. Is there anything I can do to get the songs from my iPod onto

  • Recieved an error message -50 when trying to download 5.0 to my iphone

    I went to download the new ios 5.0.1 and after tring to process the "back up" on my phone an error message popped up saying error (-50) it couldn't process  the "back up" correctly and that I would lose all the content on my phone if i continued. HEL

  • Issues with trying to Sync of BB Tourch 9800 Organizer with MS Outlook 2010 (64Bit) using BB DM Ver 6.1.0.36 Bundle 38

    I am having ongoing issues with trying to sync contacts, memos calendar etc using the latest version of DM 6. I have uninstalled and reinstalled the DM software. I have tried to "remap" the fields as noted in the error messages only to get other erro

  • Help! Authentication in Solaris 8 to start iplanet server

    Hello, We are using iPlanet Web Server 6.1 in Solaris 8.0 . Now we are stoping and starting the server using the root login. We could not start and stop the server using other login(roles, normal user, etc). I got permission denied error. Which autho

  • Default Settings of LCD

    I have my Apple HD 23" Cinema monitor hooked up to a PC running Windows x64. Two questions: 1. Is there any way to reset the monitor to the original factory settings on the brightness button? When I unplug it from the electricity and turn it back on,