New Socket() acting strangely under Windows

Hello,
First a little background:
I have a client application that connects to a server application through a socket. The client first checks to see the server is 'reachable' using the .isReachable() method. If this return true, all is good. If it returns false, the application sets up to use a Microsoft Windows DUN connection and VPN to connect to the server. This is handled through a 3rd party .jar file called jdialup. Oh, one more thing, the client pc is connected to the network through a hub. In other words, the pc is connected to a hub. The hub is connected to the network using it's up-link port... Everything so far is pretty simple enough...
Now the issue:
If I disconnect the network cable from the back of the pc and run my client application, it says that the server is not reachable, which is fine. The application then dials out to our ISP and connects to our VPN. The client application connects to the server application through a socket and sends the request and receives the response. The client then disconnects. Everything is GOOD.
Now, if I disconnect the network cable from the up-link on the hub, thus removing the client pc from the network, this is where the strangeness happens! I run my client application, it again says that the server is not reachable, which is fine. The application again dials out to our ISP and connects to our VPN. This is fine. Now though, when I attempt to make the socket connection to the server, it times out! The actual call to
Socket socket = new Socket(ipaddress, port);times out...
This seems very strange to me... Any ideas?
PS: In both situations when I connect to the VPN, I can ping and telnet to the server. It is the Socket call that is acting strange...
Thanks,

I've been following this and I'm baffled by the
discussion so far. Has the thread been trimmed? I believe we got off on a tangent, but the problem is that in certain circumstances the client application tries to connect to the server application the call the 'new Socket()' times out... You will have to read my original post...
Anyway, I believe that I have figured it out. It was related to the gateway option in the network setup on the client pc.
Originally I had the gateway option set to be an ip address internal to our network. Our network guy said that in this situation, I needed to set the gateway to an ip address outside out network. When I did that, everything now work beautifully. Why? I have no real idea as I am not a network guy, but it work now and I am happy...
Thanks for everyones help and sorry for all the confusion.

Similar Messages

  • T410 - Brand new laptop acting strange

    I got this new laptop yesterday and as soon as I started configuring it and downloading all the Windows updates is started acting strange.  The first issue was that the touchpad would not work - only the red pointing device.  Also, the mouse would slowly move to the upper right of screen all on it's own without touching it.
    It also intermitently freezes where I can move the mouse pointer around but it will not recognize my clicks on anything,  When I forcibly close dwm.exe (which stands for "Desktop Windows Manager" then that solves the problem.
    The other issue is that when I'm tying the cursor will jump around on it's own.  So if I'm typing in my login info, it will either stop typing and jump out of that box or it will jump to the front and I'll end up typing the last part of the login name in the front of the first part.
    Any idea what these buggy things could be?  This is supposed to be brand new from CompUSA.com

    so the trackpad doesn't work? Press Fn + F8 does the trackpad shows as enabled or disabled.
    Under bios there is also option to enable and disable the trackpad, ensure that it is enabled.
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Socket acting strangely

    I have a small chat app using a Flash XMLSocket that connects to a Java server.
    With the new update I know about handling the policy file request but I get the strangest thing happenning here.
    If I immediately send out the policy file right when the new socket is created (on the Java server obviously) everything seems to work fine.
    If I do a readLine from the incoming stream then send the policy file, flash seems to 'freeze'...by that I mean nothing happens...no socket is connected.
    It does attempt a connect twice since I have nothing listening on port 843.
    Here's a bit of code for the Java server:
    clSocket = serverSocket.accept();
    cs = new ClientSocket(clSocket);
    new ClientSocketThread(cs);
    cs.incoming = new BufferedReader(new InputStreamReader(cs.connection.getInputStream()));
       cs.outgoing = new PrintStream(cs.connection.getOutputStream(),true);
       String policy_response = "<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"6000\" secure=\"false\" /></cross-domain-policy>"+ "\0";
       String mes = "";
       if(cs.incoming.ready())
        mes = cs.readln();
       cs.outgoing.println(policy_response);Again...if I have it this way it won't work....flash just seems to sit there.
    If I place the 'send' with the policy response before any readLine then it will work but I it's problematic since I have to assume it's making a policy file request. I would rather do a check on the readLine and make sure.
    Anyone know what could be wrong here? Why can't I read from the socket first?
    Thanks in advance.

    This appears to be a cross-post of what appears in the other thread to be a threading mess of some sort.
    [_http://forum.java.sun.com/thread.jspa?threadID=5308482_|http://forum.java.sun.com/thread.jspa?threadID=5308482]

  • New iphone acting strange

    i set my new iphone to limit adult content under restrictions.
    yesterday it worked fine.
    today however it is blocking everything?
    why?
    i also have a problem where apps sometimes shut me out and return me to the home screen. i just press the apps and go back in like nothing happened.
    this is my first iphone and im frustrated...

    shamguy4 wrote:
    i also have a problem where apps sometimes shut me out and return me to the home screen.
    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

  • Why is Firefox 6.0 very very slow on my new laptop (Asus G74) under Windows 7 x64 ?

    Hello everyone ! Today I've received my new laptop. An powerfull G74. The first thing I have done was to install Microsoft updates. And then, install Firefox. And then.. waited about 20 sec for beeing able to type something in the url bar. Same thing about tabs. Open a new tab take about 10 secs. I Don't know what I need to do to have the same speed as on my old laptop with Firefox... :/

    Hope this helps a bit
    https://support.mozilla.com/en-US/kb/firefox-takes-long-time-start-up?s=slow&r=1&as=s#os=mac&browser=fx8

  • New iPod touch does nothing under Windows XP

    I have been bought a new iPod touch to put all my existing CDs onto. We already have iTunes from a previous iPod, and on connecting the touch to the Windows XP machine, all I got was the "install new hardware" screen, asking for a CD, which of course, Apple dont provide.
    I checked the support pages, and it recommended installing the latest iTunes. I attempted to do this, and it wiped my registry, passwords, and killed the wireless link. After spending a day re-setting all this, and finally installing iTunes again (10.5 I think), the same thing happens - connect the touch via the USB cable, and "install new hardware" appears requesting a driver from the Apple CD.
    Again, been on the support site to find help, and the only article I have found is to use MSCONFIG to turn everything off. I did this, but (surprise, surprise) it doesnt work.
    So I am now stuck with a half dead Windows XP machine that works with the old iPod, and an iPod touch that works with nothing.
    Other than returning the iPod touch to the retailer, what options do I have ?

    Hi lllaass,
    Sorry for the gap in replying.
    Funny you should highlight that link, because it states on it that they dont expect a re-install to work under Windows, and ... you guessed it ... it didnt work !
    I have tried re-installing it again and again, and I gave up. I kept getting a message that the previous install of iTunes failed, and that I had to complete THAT before I could un-install it - useful.
    So, like I said, I gave up. I think re-installing for three weeks is enough.
    Thanks anyway.

  • Strange problem socket programming on different Windows plattform

    Want to connect to site in internet like http://www.google.com. In Eclipse and as .jar.File on my Windows 7 everything runs fine. On Windows 2003 or Vista I cut LAN, so no network and the application response 'ok' and do not throw an Exception, what my Windows 7 and another Windows XP do immediately. New start of application has the same effect. After a time of circa 20 seconds application throws an Exception. Bad surprise. All Windows use java version 1.6.0_21.
    Any ideas, please.
         URL url=null;
                   try{
                             url=new URL("http://www.google.de");
                   }catch(MalformedURLException e){
                        System.err.println("01");
         try {
                   URLConnection con=url.openConnection();
                   con.setConnectTimeout(250);
         }catch(IOException e){
              System.err.println("03");
         InetAddress inetAddress=null;
         try{
                   inetAddress=InetAddress.getByName(url.getHost());
         }catch(UnknownHostException e){
              System.err.println("04");
         SocketAddress socketAddress=new InetSocketAddress(inetAddress,80));      
         Socket clientSocket=new Socket();
         try{
              clientSocket.connect(socketAddress,250);
         }catch(SocketTimeoutException stoe){
              System.err.println("05");
         }catch(IOException ioe){
              System.err.println("06");
         if(clientSocket!=null){
                   if(!clientSocket.isConnected()){
                        System.err.println("07");
                   try{
                             clientSocket.close();
                   }catch(IOException e){}
         }else{
              System.err.println("08");
         }                      

    1. JVM would never get information network is broken.I didn't say anything even remotely resembling that, and I didn't say anything about the JVM at all.
    2. Different hardwareI didn't say anything about hardware either.
    So you haven't 'disproved' anything yet.
    Win XP Pro SP3 on Pentium M and Celeron laptops get information from its hardware.Obviously, and from their TCP/IP stacks.
    JVM get information from OSObviously.
    and put it to cache every definied time as reply a cycle.I can't make much sense of that, but the JVM certainly doesn't maintain TCP reply timers. It relies entirely on the TCP/IP stack for that.
    This unit of time should be set shorter. I think, I have to parameterization JVM to put the information for TCP/IP in shorter time to cache. I would know gladly where this has to define.As this imaginary timer doesn't exist, there is nothing to define. As I already told you, 'there is nothing you can do about it within Java'.
    If the hardware delivers an interrupt to the operating system and the operating system delivers that in some form to the TCP/IP stack and the TCP/IP stack construes it as a cable loss and turns that into a ' connection reset', that's what you will get in your Java code. If all that doesn't happen, you won't.

  • Opening a new browser using Runtime.getRuntime().exec(cmd); under windows

    Can Runtime.getRuntime().exec(cmd); open a URL in to a new browser in wondows OS or ...can we force it to any specific browser insted on OS's default browser...
    It does open a new bowser under MAC but not under windows..
    cmd = "'rundll32 url.dll,FileProtocolHandler"+URL (windows)
    Thanks

    public class WindowsProcess
         public static void main(String[] args)
              throws Exception
              String[] cmd = new String[3];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "start";
              Process process = Runtime.getRuntime().exec( cmd );
              process = Runtime.getRuntime().exec( cmd );
    }When you run the above code you should get two open dos windows.
    Now just just enter some html filename and hit enter in each window. IE should start up separately in each window.
    Thats also what should happen if you specify the html file as the fourth parameter. A new process should be created and two separate windows should open with a browser in each.

  • How to format brand new HD under windows?

    Hello. I have a mac pro intel which I can dual boot to windows XP SP2.
    I just bought a new HD with the following specs:
    Seagate Barracuda SATA2 750GB
    and it is now located at bay 4 on my Mac Pro (bay 2 and 3 already have HFS disks).
    I would like to have it NTFS formated, so I can work on it when I boot on windows.
    The problem is that when I booted on windows it said it found a new hardware, disk drive, etc, but it does not show under windows explorer. That is understandable since it is unformated, but how do I do that if I can't see the drive?
    Thank you for your help,
    Cassiano

    Use Windows management. If you do use Apple Disk Utility and want NTFS, then
    DU Partition... look for "Options..." at the bottom where you can change it from GPL(GUID) to Master Boot Record. That way you can even format and write to it with MacFUSE 3G. I could only create FAT partition with GUID.
    If you format it in DU as GPL/GUID you will see 200MB EFI at the head, and 128MB between partitions.
    And to use it as a normal Windows disk, choose GPL to create partitions.
    http://www.google.com/search?ie=utf8&oe=utf8&q=GPL+GUID

  • Has anyone had a problem with Illustrator lagging behind one letter when you're typing? For example, when I type "apple," the "a" doesn't appear until I type the "p." I only have one window open, and I restarted, but it's still acting strangely.

    For example, when I type "apple," the "a" doesn't appear until I type the "p." I only have one window open, and I restarted, but it's still acting strangely.

    Hi Swampxiix,
    How many programs do you have open while you're working in Illustrator? Do you have a lot of layers or art boards?
    It could be that your computer was being slowed by too many programs, or a complex design file. The age of your computer could also be a culprit.
    If you're on Windows, here are some tricks you can try to speed up your computer:
    Help - 12 Tips to Speed Up Windows 7 Tips, Solutions & How Tos  | PCMag.com
    For Mac:
    Five tips for cleaning and speeding up your Mac - CNET
    Hope this helps!

  • Safari's Tabs Acting Strange After 10.6.4 Update

    Hi guys,
    After the 10.6.4 update Safari's tabs have been acting strangely. Say I have Apple.com open in one tab and I hit Apple-T to open a new tab. It then changes that tab (which Apple.com was loaded on) to the Top Sites, keeps the focus on this tab, then opens a blank tab right next to it. I effectively lose the page I was using and a blank one appears. Any ideas as to how to fix this?
    Thanks for the help!

    HI,
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 7 buttons and click Reset. Relaunch Safari. If you still having problems...
    Go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop.
    Relaunch Safari and see if that makes a difference. If not, move the .plist file back to the Preferences folder. If Safari functions as it should, move that .plist file to the Trash.
    And if you didn't repair disk permissions after you updated Safari, it's a good idea to do that.
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn

  • Mouse acting strange

    If I close the project and open a new one from the File menu than very often my Apple Mighty mouse doesn't act as it supposed to in Logic any more. The "wheel" ( ball ) does not move Logic window up-down and left-right. To get this feature back I always have to restart Logic. This happens also when Logic is running for a while and then I open a project by clicking on icon of a project...
    Finally in Arrange window sometimes track buttons like Mute, Solo (region mute and solo), Record ready are not "clickable". For exanple: I can not make track Record ready with the button visible on each track- have to view channel strip of that track and click on Record button there (under the fader). So I have to restart Logic again... Is that "normal"?

    Thanks for reply. No. I did not add any new device. But I also think that it really is not mighty mouse problem-I checked that at the same time it is not working in Logic it works in other apps like Safari, Preview etc without problem.
    My G5 is acting strange for last 10 days. That's it. I have also big problem with opening Logic-it is very often (90% times) quitting before opening, after 3-5 seconds I doule-click to open a project or Logic app... (I made a separate Topic about it)

  • Premiere Elements 8 under Windows 7: HOW TO DO?

    My system is a MICROSTAR (MEDION) Quadcore 6600(think it's made by MSI) with 4GB memory, 2 x 1TB HD Wetern Digital GREEN (replacing the very poor quality Seagates 2 x 500Gig originaly installed) and running Windows 7 64 and 32 Ultimate. The 32 version was installed especially for PE8
    Why I didn't stay with PE7?
    Strange enough, PE7 worked perfectly under Windows 7 64bit RC and RTM, but with the Official release of Windows 7 32 or 64 Ultimate, it was finished with the Happy Hour, Crash, crash, crash all the time!
    So I downloaded from Adobe a official PE8 and started very happily with it.
    But it was CRASH & GO all the way !!!
    I have send a few messages to Adobe Contact, which deviated me to this forum so I could spit my poison far from their "Ivory Tower" No answers or help from them. PE8 is paid, so go to ...
    I found out immediately that I was one of the many people to regret this "Buy of the Year", but since PE7 didn't work and Windows 7 is so good that I don't want to go back to XP or Vista, I had to find a way to make this SH.. work. Luckily the Forum proposed me a few solutions for which I am very grateful.
    After a few editing's with DV (about 3hours long), I am having a little bit more experience with this PE8-pre-beta-thing.
    First of all I disabled the GPU-thing in the preferences, then I disabled the "Background rendering".
    The  Medion computer has a "diet" Nvidia Geforce 8600 so there are no 3D drivers to disable, neither has Windows 7 this Windows Defender, so that could also not be the problem.
    Anyhow, these few minor changes seem to have solved a lot of crash problems.
    Also, NEVER open a PE7 project in PE8 !!!!! It's really not 100% compatible: no way to render previews and crashes guarantied!
    Be very careful in applying transitions and video effects, especially if you start cumulating them. Maybe they will work in preview, but you never know if you will be able to render a film or DVD from it.
    For example "camera view" + "Soft edge" ( since I have a Dutch version, I don't know if these are the right names) to make a kind of 3D frame around your image. No problem in PE7, but PE8 doesn't digest it! The only way to render this to a film is to import the project in to PrProCS4 and change the other transitions which are not supported by PrPro with similar ones. Or going from New York to Chicago over Mexico City!!
    If you take care of these precautions you can work very satisfactory with PE8, without crashing more then was the case with PE7 (low memory problems)
    This PE8 should have been written for 64 bit, so it would have suffered much less memory problems, then now.
    Some things I like better with PE8, like the ClipArt's, the Menu's and the new Smartmovie themes, which I create and then edit manually.
    Automatic backup creates now 5 instead of one file.
    What I don't like:
    If you capture in scenes, it's still scene 11 coming after scene 109 etc, instead of counting from 001.
    With PE7, you could see in which map the project you wanted to open was situated, here not.
    Place of the Project changed, without reason, change for the fun of change?
    Making "markers" has become more complicated, without improving. Also changed just for the fun of it?
    Can still not capture HDV by scenes, for that I have to use Sony Vegas.
    Until now I didn't try to edit HDV in PE8, because I don't trust PE8.
    What we really need is for Adobe to bring a major update to fix al these annoying misfits and to make a customer's dialog instead of a one way street policy.
    If I find new ways to make work easier and without crashing I will not hesitate to let you know.
    Until then, hope this can help you a little bit!
    Roald

    NO, YOU CANNOT !!!!
    If your project was started in PE7  and you import that project to PE8, you cannot, I REPEAT, you CANNOT render this files to a preview.
    You wil get the render window, but no counter or anything else will move or happen.
    Nothing, rien , nada, niets, nichts!!!!!!
    At least not here on neither of the 3 installations which I did under 3 different Windows 7 !!!!

  • Safari is acting strangely on several counts

    For the last several days, Safari is acting strangely on several counts. I haven't downloaded any updates or plugins recently, and I am not aware of any Safari viruses on Mac OS X, so I'm totally lost here. Please help!
    1. Periodically, Safari will stop loading a page completely. So it will start and then the url bar will be partially blue and the circle will keep circling but nothing will happen. Once it does this on one tab in that window, it will start doing it on all new tabs opened up in that window, but any original tab there might still go through. If I close the window and reopen another window, all sites on all tabs will go right through. I tried disabling DNS prefetching, and that helps Safari behave for a few minutes, then it goes back to such strange behavior. I tested using my wireless and using a different network, and it happens on both, so it's not my router. Sometimes, opening a new window doesn't help. So I shut down Safari and restart. Sometimes that doesn't help either, so I end up having to reset Safari. Obviously, having to reset Safari multiple times a day is neither productive nor ideal.
    2. When it does that url thing, it also seems to become incapable of completing from history or bookmarks. So for example, if I open a tab and type a website name, it won't complete it, even though I have that bookmarked. Generally when that happens on the first tab of a window, I can pull up the site from bookmarks and it will load immediately. But the next tab I open in that window, will do the webpage not loading business I described in #1 above.
    3. A short while ago, i tried resizing a window and it did the strangest thing where it would expand the window space, but just give me a "gray area" rather than expanding the whole web page. I closed the window, opened a new one and resizing worked fine again.
    4. A short while ago, another strange happening: everytime I opened up a new tab in the window and loaded a site, it would merge that tab with my old tab and delete the first tab, so at any given time, it was just a single tab window. I closed the window and reopened, and voila normal tab behavior again.
    Strangely, if I have two windows open - as I often do - only one window will be affected by such strange behavior. The other one will function normally. But such odd behavior is not limited to instances when I have two windows open. It's also happening when there's one window open. For reasons I do not understand, it seems something in the processes of a window gets corrupted after a little while on Safari and that window starts acting strangely.
    Odd and irritating and difficult. I'd greatly appreciate your help!
    I'm using Safari 5.0.6 on OS X 10.5.8... thanks!

    I don't see anything in your post regarding the Safari cache. BTW, a "reset" does not empty the cache.
    From your Safari menu bar click Safari / Empty Cache. Restart your Mac, try Safari.
    If that didn't help, quit Safari if it's open.
    Go to ~/Library/Caches/com.apple.Safari
    Move the Cache.db (or ApplicationCache.db) file from the com.apple.Safari folder to the Trash.
    Try Safari.
    If nothing above helped, make sure there's enough free space on the startup disk.    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure you have a minimum of 15% free disk space.
    If nothing above has helped, try Safari in another user account. If you see the same issues there, log back into your admin account.
    Launch Disk Utility. Select the startup disk in the panel on the left then select the First Aid tab.
    Click:   Verify Disk  (not Verify Disk Permissions)
    If the disk needs repairing follow the instructions for Using Disk Utility to verify or repair disks.

  • ICal Week view acting strange

    Hi. Is is just me or iCal's week view is acting really strange under Snow Leopard? I just upgraded to 10.6.2, and the problem continues, so I decided to post here.
    The problem is the following: when iCal is in Week view, showing 7 days per week (as opposed to 5, workdays), I can scroll just a couple of weeks forward or backwards before it goes crazy. Sometimes it shows 6 or 5 days instead of 7 in the top of the window (but a different number of days in the appointments area itself, so that it appointment is shown between two days), sometimes it stops scrolling, sometimes an appointment appears to be in the wrong date (a birthday in 22-oct appears to be in 21-oct in week view, but appears in the right date in month and day views).
    The problem only manifests itself when preferences are as following:
    - Days per week: 7
    - Start week on: Sunday
    - Scroll in week view by: weeks
    Any other combination makes it work fine (unfortunately this is exactly the way I wanted it to work...)
    I have submitted this problem to Apple as a bug report, but got no answer (not a surprise here...). Is anybody else having the same problem? It is making me crazy not to know whether this is specific to me and my machine or a general bug.
    Please advise!
    Andre Teixeira
    Sao Paulo, Brazil

    i know exactly what you're talking about. I've been having the same exact issues you've listed, plus more. my repeating appointments (my semesters worth of classes) shift an hour back or forwards, but only after certain dates. its a whole bunch of weird stuff and it also only happened after Snow Leopard. i also sync via mobile me to my iphone, and the incorrect times push onto my iphone. anyone heard of this or solutions?

Maybe you are looking for

  • 2.2 SOFTWARE makes iphone worse

    I lose connection 70% of the time, to the point where i have to either turn off and on the phone. MY 3g/E connection, goes away for extensive periods of time. I probably have to reboot my phone 4-5times a day. And i just purchased this 3G Iphone 2wee

  • Can't upgrade an app

    I have installed an app and it was successful. I later upgraded it successfully but now, can't open it? I was told to down load onto my computer as it was a large file, tried this twice, in support, I tried restarting my phone as instructed. The app

  • Attempting to open bookmarks, hangs Safari

    Strange issue. Safari runs fine until I attempt to open the bookmarks. Safari will sit with spinning ball until I force quit. I can add new bookmarks. When I found the bookmarks folder, I can launch to all of the sites by double clicking the entry. I

  • How to add shared content into Dreamwever cs6?

    Hi When I do anything with SPRY in DW CS6, it automatically inserts a SpryAssets folder with some js files. But Spry has more js files like SpryPagedView.js etc. Is there a way to all the spry include files in a shared folder and be able to insert wi

  • PC Suite:Restoring backup to new phone 6280

    I've had a 6280 for ages, using it extensively, it developed a fault and was due to be replaced, so backed up via PC Suite (latest version 6.82). Now won't restore to new 6280 phone, even though it's clearly there as being backed up (approx. 9583kb).