RMI-NAT Problem with random ports

Hi,
I had a RMI server in a machine with the private IP 10.XX.XX.XX and a firewall with the public IP 196.XX.XX.XX
I am using the property: java.rmi.server.hostname to 196.XX.XX.XX and a small test application. The server is behind the firewall/NAT machine with a limited set of open ports (including the non standard 8001 port that I am using instead 1099)
1. The server start perfectly
2. The client can connect to the server and execute the method Naming.list() successfully
3. At the moment that the client attempt to perform the bind, the client hang up for almost 7 minutes and finally throws and exception due time-outs.
According a "strace" and "netstat" commands under Linux and also the flag: java.rmi.server.logCalls we obtain the next data:
1. The server open the port 8001 (PERFECT)
2. But also open a random port and the client -at the bind moment- use that port (in the range 34000-35000). And of course our firewall block all the ports except 8001.
So, is that the expect behaviour? If that is true then RMI is not functional under NAT/Firewall.
Am I missing something?
Thanks!!
Gerardo

Hello,
Let me see if I got it right:
1. You're starting the registry (programatically) in port 8001.
2. You're creating a server implementation object.
3. Next you bind/rebind your server to this registry.
4. Your client hangs at Naming.lookup().
If this is the problem then that random port you mentioned is the server's attributed port (a ServerSocket that is hanging on accept) at the time of creation. You can avoid this by instead of using the super() call in you serverimpl constructor using the UnicastRemoteObject constructor that specifies a port (check the interface). That way you can configure your firewall to allow traffic through that port too.
However, what puzzles me is the fact that it hangs on step 4 instead of in a subsequent remote call. step 4 should be using port 8001. Can you confirm that it's hanging in Naming.lookup ?
(two other sources of data you may find usefull are the Firewall logs and a tcpdump analisys of the traffic between the firewall and the server machine)
Nuno

Similar Messages

  • HT204150 I'm having problems with random contacts disappearing from icloud. I have a saved text from a contact that displays her info but when I look for her in contacts it's missing.

    I'm having problems with random contacts disappearing from icloud. I have a saved text from a contact that displays her info but when I look for her in contacts it's missing.

    It is locked to your sisters carrier.
    She would have to ask her carrier if they unlock iPhones and if she qualifies for this service.

  • I have Power Mac G5 1.8 single. I have a problem with ethernet port, before it was working with the internet, but now i shows it is connected even the cable is disconnected. I'm running Leopard 10.5. any help

    I have Power Mac G5 1.8 single. I have a problem with ethernet port, before it was working with the internet, but now i shows it is connected even the cable is disconnected. I'm running Leopard 10.5. any help

    Reset the PRAM.
    http://support.apple.com/kb/HT1379
    If that fails, reset the PMU.
    Scroll down the following page and click the G5 link for instructions:
    http://support.apple.com/kb/ht1939

  • My laptop macbook pro has a problem with usb port they are not working.

    hi there i have a late 2011 mac pro, its been 2 years of purhase however reary used, now it has a problem with usb port are drawing too much power and usb ports are dissabled from the system. now i can not use usb ports. do yo have solution for it??? cheers

    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Best.

  • Open NAT problems with Xbox One .

    When I first got my 1900ac I used Media Priortization to get an open NAT for Call of Duty Advanced Warfare on my Xbox One ; prioritizing the Xbox . It worked fine for about 6 months until I changed cable/net provider to Nextech in Ks. This company uses the 1900ac to hook up it's system for all it's customers ( since I already had one they're using mine ). Unfortunately I'm unable to get an open NAT in this game anymore ; I've tried just about everything , NAT forwarding , triggering , Media Prioritization . Nextech support & Xbox Live support , useless . Tried Portforward . com , nothing . Forwarding port 53 cuts off net connection & doing the static ip change for Xbox didn't help . Almost everything I've looked at seems out of date & I'm at my wits end . It would seem by now Linksys should have solutions available , any ideas ?

    Thank you chin_pamz13 for your response . I tried to check if my modem had a public or private ip address but I'm not sure how to do that ; I've read about double NAT's elsewhere . Regardless , I think I've finally found a solution that seems to be working so far . I went to the website " tech - recipes . com " & found an article , " Xbox One open NAT " by Aaron St. Clair . I tried his first suggestion about port triggering , with extra ports I had'nt seen before . That did not work for me so I followed his instructions for putting the Xbox in the DMZ & it's working ! I think my problems from before were the result of improperly setting up the static ip address for my router & Xbox . Previous instructions had me changing the ip in the console along with the router ; Aaron said not to do so in the Xbox , let the router do the work it's supposed to do & make sure the settings in the console are on automatic . In the router at the DMZ , I was'nt sure how to proceed , but at the bottom is a section labeled DHCP reservations list ; clicked on that , saw XboxOne , clicked on that & it filled out the MAC address above for me . Then I went to the Xbox network settings , advanced settings & clicked " automatic " at ip address , subnet & DNS . I checked mutiplayer connections & did the " hold bumper & trigger buttons " trick & finally got an open NAT ; fired up CoD Advanced Warfare & got the open NAT there also . I may have screwed up when I did the port triggering but since the DMZ fix seems to work I'm going to leave things alone . Hope this helps others with open NAT problems .

  • Problems with USB port and song transferring;

    Hi! I just got an iPod and I am having problems with it. My computer doesn't have a Hi-Speed USB port, even if it's 9 months old. Some of my friends don't have it either but they still are able to transfer songs onto their iPod. For mine, it keeps saying "Do Not Disconnect." I waited for 5 hours last time I got it and it still isn't working.
    I also updated my iPod software today and the iPod icon isn't appearing on the bar to the left in iTunes. I'd really appreciate any help on this! As well as if I really need to do something about the ports or if it could function like this normally.

    Quote from: Svet on 08-December-10, 00:48:07
    Install chipset drivers from MSI web:
    http://eu.msi.com/index.php?func=driverfile&dno=2427&i=0
    +
    NEC USB 3.0 Drivers:
    http://eu.msi.com/index.php?func=driverfile&dno=11189&i=0
    are these the same driver provided with the disc driver? as i already installed both of these..

  • Problems with random shutdown after replacing a swollen battery

    Hello all,
    Perhaps one of you can help with this issue.
    I'm using a Macbook Pro 17" mid-2007 model. A few months ago, the power disconnected from the machine when the battery had already run down and the machine did a hard shutdown. When I booted it back up there were serious problems with the display. Eventually it stopped working altogether. I took it for service and it was determined to by the NVIDIA graphics processor problem, so Apple replaced my motherboard.
    When I got the machine back from servicing, there was a rattle in the right fan that gradually got worse. After a while the touchpad button stopped depressing in the center. I also experienced several random shutdowns while operating on battery power. I learned about the swelling battery issue with macbooks and ordered a replacement. By the time the replacement battery arrived my original battery was quite swollen. I'm concerned that the swelling battery may have warped the case a bit, leading to the fan noise.
    I have now replaced the battery, but I'm still experiencing random shutdowns after 20+ minutes of use on battery power. I have done the RSS tests that were recommended in other forums and there doesn't seem to be any random shutdown problems when I'm plugged in -- only under battery power. My understanding is that a swelling battery can sometimes cause the battery to disengage from the electrical contacts on the MB, causing a sudden shutdown. I'm wondering why the problem is persisting now with a new battery? After one random shutdown, I tried to power up again using the battery, while pushing the battery into place at various angles, but I couldn't find any angle that would give power to the machine. The fan noise is also still present.
    Can anyone offer an explanation or advise on any methods to overcome these random shutdowns? I have checked the console and the machine isn't registering any error when it shuts down, although when it restarts it says "DirectoryService[35] Improper shutdown detected"

    Yep, it is video (or: or audio for video) so unless you're sure you need it (because you work or will work with the DVC Pro HD video/audio codec), you can remove the plug from its' folder and put it in your documents folder (don't trash it, I have no idea if it is necessary for non-DVC Pro HD users to have it installed too).
    The WWW is littered with posts from people encountering bugs and crashreports with DVCPROHDAudio.plugin as the main suspect. Most of those posts seem to be from video people rather than audio folks.
    http://www.google.nl/search?q=DVCPROHDAudio.plugin&ie=utf-8&oe=utf-8&aq=t&rls=or g.mozilla:en-US:official&client=firefox-a
    But, if you get crashes and you see this one mentioned in the report, disable it, restart, and see if the problem's gone.

  • If you're having problems with USB ports, read on...

    i'm reading that alot of people on here are having problems with their front (or top) usb on their cases not working with their k7n2 boards.  i have come across the correct solution to this problem in one of the posts (after having solved the problem on my own), however noone has posted the solution by itself on this forum so everyone can easily see it.
    The trick is to make sure that pin 10 (at least on a K7n2 delta-L), the pin labeled USBOC (USB Open Connection), is wired to NOTHING.  If the connector to your front usb ports is fused into one giant connector and it HAS a wire that will connect to this pin (labeled GND2 or Shield or something), CUT THAT WIRE.  Pin 10 on JUSB2 (at least on a K7n2 delta-L) must be OPEN.  If this pin IS connected to something (even if it is only GND), the motherboard will think something is connected to this usb port and you will get many unknown devices listed in your windows device manager and the rest of your usb ports may or may not work.
    As a general rule of thumb, if a pin on a motherboard is labeled OC for "Open Connection" and you wire something to it, you're asking for trouble.
    If you cannot understand this you should not be attempting to wire a motherboard in the first place. 
    Here is a picture to go along with this discussion.  If you cannot see this picture, I am sorry for it has probably been removed from the place I posted it online as I cannot attach pictures physically to this post.  If someone here has a way to permanently host this picture and post it to this thread permanently, that would be wonderful.
    In summary: all usb ports/headers have only four pins associated with it (VCC, USB+, USB-, GND).  If the connector (whether it's one big connector or individual sockets) to your front/top usb port has 5 sockets, don't connect the 5th socket to anything.  That goes for any case/motherboard combination.  This is what i'm talking about above.  I have no idea why motherboard and case manufacturers have a 5th pin involved in any way on either the pin or socket side.  It is not used for usb.
    EDIT:  I just noticed this has already been discussed in the trouble shooting guide in the above sticky post.  oh well, now we have a pretty picture to go along with it (i hope).

    :-D)Hello guys,
    as promised I come back here to give the results of my tests... and I have to say that you saved my day (even if I had to open back 60 secured cases).
    So the solution was the right one, when I unplugged the "ground" end of the front USB connector cable from the USBOC pin, those connectors finally worked as expected with USB 2.0 compliant devices.
    So thank you really much for this very usefull information !
    And even if maybe it's not only MSI's fault, I still believe that more information on those connectors in the user's manual would be really usefull (who knows what USBOC means except a few people and who could imagine that pluggin on it a "ground" cable would make it unserviceable ??). And who ever saw a user's manual bundled with a case ?? it's pretty unusual  
    Hope that someone at MSI will read that and take it into consideration, not for me (because now I'm aware) but for the thousands other consumers that will feel a little bit "annoyed" with that issue. I don't think that adding one line about it in user's manuals would be so much expensive  
    But I'm quite lucky myself... being able to understand and write english (even if I still have some progress to do  ) gave me the possibility to find the solution... but a lot of my french fellows can't do that... and there's no french forum here... How can they do ? They rely on user's manual
    Best regards,
    Nicolas

  • Problem with random number generation

    hey forum, i wonder if anyone can help me out with a small problem with my university coursework (yep its homework!!!)
    heres my problem, i am writing one of them 8 puzzle problems (the one based around sam lloyds 15 puzzler), i can successfully generate one random sequence of numbers with no duplicates, but whenever i call the random method again it keeps producing the same results
    heres the code
    in my main class file
    if(e.getSource() == randomButton) {
          new RandomPuzzle();
          System.out.println(random.randState);
          //startStateString = new RandomPuzzle();
    }heres my number generator class file
    import java.util.Random;
    import java.io.*;
    public class RandomPuzzle
         /** Base Random number generator */
        Random rn = new Random();
        /** Puzzle holder */
        byte b[];
        long number = 0;
        String randState = "";
        /** Default constructor */
        public RandomPuzzle() {
            rn.setSeed(number);
            b = new byte[9];
            randState = randomString();
        /** Provide range for generation */
        public int rand(int lo, int hi) {
            int n = hi - lo + 1;
            int i = rn.nextInt() % n;
            if (i < 0)
            i = -i;
            return lo + i;
        /** Set size for array */
        public int rand( int hi){
            int n = hi;
                return n;
        /** Check for duplicate values within the same configuration */
        boolean valueExists( byte value ) {
            int i = b.length;
            boolean exists = false;
            for( int j = 0; j < i; j++ ){
                if( b[j] == value )
                    exists = true;
            return exists;
        /** returns the actual string */
        public String randomString(int lo, int hi) {
            int n = rand( 9 );
            //boolean valueEntered = false;
            for (int i = 0; i < 9; i++) {
                boolean valueEntered = false;
                byte temp = (byte)rand('0', '8');
                while( valueEntered == false ) {
                    if( !valueExists( temp ) ) {
                         b[i] = temp;
                         valueEntered = true;
                    else
                        temp = (byte)rand('0', '8');
            return new String(b, 0);
        /** calls above function */
        public String randomString() {
            return randomString(0, 8);
    }i've tried for hours to work this out, but i am stumped. if anyone can point me in the right direction, maybe point out the problem code and give one or two tips i would be forever in your debt
    thanx in advance
    korbitz

    thanx for the help paulcw, but when i removed the seed code it done the same
    but i added this to my main class and now it works fine
    if(e.getSource() == randomButton) {
                   RandomPuzzle temp = new RandomPuzzle();
                   System.out.println(temp.randState);
                   //startStateString = new RandomPuzzle();
              }thanx again for your help

  • Problem with COM port opening

    I made an application using COM port to dialog with a microcontroleur and i have some troubles with the opening of the port. i developed it under window XP pro and labview 6.1 and i have no problem when i launch my application on an XP PC having labview installed or on a window 98 PC without labview (just the runtime engine). But when i launch it on an XP pc with only the runtime engine, it seems to launch correctly but in fact, there is a problem with the COM port opening. The menu allowing to chose the port number is inactive and has no effect, like if the software wouldn't recognize the material port on the PC. And consequently, nothing happens when the dialog should start.
    Thank tou for your precious help
    Julien LEGRAND
    French Natio
    nal Institute for Sea Reseach

    Is the VISA run-time engine installed? I don't understand why it would work on the win98 machine unless you have an older installation of it there.

  • Just purchased Wndows Vista and having problems with the port for Palm 125

    I just purchased a Windows Vista computer and having problems with getting my Palm 125 to sync with the desktop.  I get an error message saying:  "Com1 not available"  What do I do?
    Thanks,
    Frustrated
    Post relates to: Palm m125
    This question was solved.
    View Solution.

    Sorry, that didn't work.  I get no drop down menu from the Hot Sync Manager for the Serial Port.  What comes up often is:  "The selected port, COM1, is not available at this time.  Hot Sync Manager will open the port when it becomes available." 
    Could it be the Norton Antivirus Firewall that is preventing the Hot Sync Manager to open the Serial Port?  Just a thought.  Thanks for your help.
    Post relates to: Palm m125

  • Headphone connection sporadic and must twist to get good connection; is there connection problems with connection port?

    More times than not the headphone i purchased from Apple Store (Nike) and others do not get good connection in port of the nano so cannot play; if i twist it in the port it might hit and get sound but then can loose it with movement and/or get static; any history/problems with ports allowing good connections with headphones; it is surely fully pushed in; thanks

    Thanks for the quick reply.  The use of a heat gun to loosen the adhesive complicates matters, but your point about the 4G's unsoldered jack brings it back into the realm of a possible self-fix.  I've read the notes by other users--some were successful with pipe cleaners or pressurized spray cans or both.  I'll try that first before going for disassembly.
    The first repair place that comes up when I Google "iPod repair" prominently features headphone jacks for the iPod Touch, suggesting it's a pretty popular item.  Maybe the placement of the port, or even its angle, is a receptacle asking for trouble.  If I get it to work again, I'm going to look for a leather, or folio, type of covering that doesn't leave that hole exposed.

  • Is anyone else having terrible problems with random freezing?

    For the most part, Lion runs nicely for me.  It's faster, has some neat features... but that's only when it actually runs.
    I have some terrible problems with freezing, sometimes as early as typing in my password to login to my profile on my MacBook Pro.  Just now it froze twice (after booting up), and both times I had to turn it off and power it back on again.  The first freeze was caused because I moved my mouse a little bit on the screen.
    I understand that new versions of OSs have bugs to iron out, but this seems extremely over the top.  Is anyone else having issues with freezing this bad?  I'm afraid to use any of the cool new features of Lion because my computer has proven it can freeze for the absolute tiniest things.

    Tons of threads like this, the solution is to disable automatic graphic switching.  Personally I'm doing automatic login, allows me to boot in before the freeze occurs when it happens at login.  Crazy.

  • Problem with ethernet port

    So I have a wierd problem.
    Sometimes the ethernet port is working, sometimes not.
    I've tested the ethernet cable and it works perfect with other computerS.
    I've tested my macbook pro with other ethernet cables and the problem still occurs.
    I've tested the ethernet plug (in the wall) and it works pefect with other computerS.
    So only last potential problem : the ethernet plug / card IN my macbook pro.
    It is a 2.8 Ghz Intel Core i7 with 8 Gb of 1067 Mhz DDR3 RAM, and OS X 10.7.4.
    The problem is just random... sometime it works, sometime it doesn't... sometimes it works, and stop working... sometimes it works for days without problems... sometimes it doesn't work for days, with nothing to do.
    Can anyone help? I don't think I'm on the warranty anymore... so before I go drop my MBP at an Apple Store, I want to make sure I've tryed everything.
    Especially for the price I paid for this MBP, can't believe I'm hustling with such a basic feature......
    THANKS FOR THE HELP!!!

    I've used the reset chache solution with mixed success. I finally tripped over something that actually works every time.  The "secret" seems to be getting the apply button active when you are on the "location" where the ethernet connection is configured.  Here is what I did.
    move the ethernet connection configuration to another "location" within network preferences.  I called mine Home Wired.
    When the cable disconnected situation occurs, switch to the location that has wireless and enable wireless. Now turn it back off.
    Switch to the wired location and highlight the wired configuration and click apply.  It goes through the steps of acquiring an IP and then you are connected.
    Easy peezy

  • Split x2 problem with USB ports not working

    My computer is somewhat new and this problem has been happening since I first got it.  I couldn't find anything about this problem here or elsewhere online.
    When I plug anything into either USB port (I've tried my phone and an external harddrive) the computer like sort of recognizes it on and off.  When I plug in my phone the computer beeps at random every several seconds and doesn't recognize it.  The external hard drive was sort of recognized but only on and off and I couldn't move things from it to my computer because it wouldn't stay connected long enough.  It's literally like every 2-3 seconds it recognizes the USB thing, changes it's mind and then recognizes it again, etc. forever.
    I haven't had a chance to test the SD card slot or the HDMI port yet.
    Sometimes the mouse freezes also, I'm not sure if this is the same problem (related to connection between the tablet and the keyboard parts) or if these are separate problems.  It seems to be happening less often and goes away if I wait for a moment.  Still annoying but the USB ports not functioning is a more urgent issue.
    I need help, is there a way to fix this or is something faulty with my computer?

    Hi Purple24,
    I understand you are having issues with USB on your HP SplitX2. Here is a document on general troubleshooting.
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=c03327635
    I would be happy to assist if needed. Please let me know what is your model number? Here is a link that will help you find that out.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00033108
    Please let me know.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

Maybe you are looking for

  • Free Goods Sales Return

    Dear All , I want to configure free Goods ( Exclusive ) Sales Return Process . Pl. Help me out Ex : 10 + 1 Free Goods and Complete sales  is returned with free goods. Thanks in adv Regards

  • Plz help me... Applet error...

    Hi... I have a problem... I don't understand... I thing that right... but... Error #: 360 : unreported exception: java.lang.ClassNotFoundException; must be caught or declared to be thrown at line 191, column 23 --> Class.forName ("net.avenir.jdbc2.Dr

  • How to add a location of face in the new Photo App?

    How to add a location of face in the new Photo App?

  • Manual Backup for MacBook Pro

    I'm a little confused. I've been reading all the comments that suggest one should leave the Time Machine on automatic backup all the time, and that manual backup defeats the purpose. But what if I have to carry my MacBook around all day, and only man

  • AISUSER: Customer Number & S-User identification

    Dear Experts, i have installed a SAP Solution Manager 7.0 (SP15) in a Windows Server 2003 OS System 64 bits with MS SQL in a VM (Virtual Machine). My own goal is to update the Solution Manager at the top of the upgrade (Minimum SP17) with the Mainten