RMI SERVER behind the router....!!!!!!!!!!!!

Hi I am new here...And Have a problem regarding to java RMI...
I have a uni assignment which asks us to write an online tic tac toe game using RMI..well assigment only request if it can be run on the same machine and I finished..
But now I am trying to config it to real life with internet instead of LAN.
Basically I have one static IP assigned by my ISP... and I have local IP addresses on my machines. The addresses will be translated by my router to the public one...
My server is running on port 8081 of my server computer with an local IP addresses... and I did port forwarding in my router to forward all the 8081 request to this server...
And the the client use the public IP to locate my server they can acctually connect to my server and get the stub or ref to it...But when they acctually trying to call a method on
the server side, I realised they actually using the local IP addresses of my server machine instead of the public one..so i think the stub acctually bind the machine IP and ask client to use this IP to communicate.
This obviously not going to work...And In the API it seems like I can not acctually do anything about IP address when create the Registry..
Any clue on this Thank you.......

No, the stub consists of a single Java object which contains the IP address and port number of the host from which the remote object was exported. The client knows the initial lookup address for the Registry but it performs all subsequent communications via the information embedded in the stub.
@OP: you need to export your remote object on a fixed port, have the router forward that port, and set the system property java.rmi.server.hostname in the server JVM to the external IP address of the router.

Similar Messages

  • RMI Server behind Router: How to set the right IP?

    Hi, I am having trouble with the Server of an RMI application, the set up is this:
    1. The server is not always running on the same host: it may be a computer with a publicly visible and unique IP, or it may be under a computer behind a router.
    2 . The user that runs the server may not know how to get his IP in the router environment.
    3. The user that runs the server knows sh*t about rmiregistry or how to set a Property to the java interpreter (for example: -Djava.rmi.server.hostname=<host>).
    4. The Server code is this:
    * Represents the Server to the Domination app (including the chat plugin).
    public class Server {
         private static final int PORT_NUM = 1099;
         private static final String CHAT = "chat";
         private static final String DOMINATION_FACTORY = "Domination";
          * Sets the Chat and Application Servers.
          * @param args
          *            Never used.
         public static void main(String[] args) {
              try {
                   Registry registry = LocateRegistry.createRegistry(PORT_NUM);
                   Chat chatObject = new ChatImpl();
                   UnicastRemoteObject.unexportObject(chatObject, true);
                   UnicastRemoteObject.exportObject(chatObject, PORT_NUM);
                   registry.rebind(CHAT, chatObject);
                   System.out.println("Chat ready...");
                   Fabrica fabricaObject = new FabricaImpl();
                   UnicastRemoteObject.unexportObject(fabricaObject, true);
                   UnicastRemoteObject.exportObject(fabricaObject, PORT_NUM);
                   registry.rebind(DOMINATION_FACTORY, fabricaObject);
                            System.out.println("Domination Factory ready...");
                   System.out.println("All systems up and running");          
              } catch (Exception e) {
                   e.printStackTrace();
                   System.exit(1);
    }I wrote the code that way (and not using Naming.rebing("//" + host_name + "/Service", serviceObject)) so the server user won't need to run the rmiregistry (In fact, the Server is deployed via a jar file, so just a happy double-click to the jar will do the work)...
    OK, then the problem is this: The client is always having "connection refused" Exceptions while the server is behind a router and not in the same network of the client.
    The IP that is shown in the exception is always the inner IP of the host (or 10.x.x.x or 192.168.x.x or whatever it may be). So it seems that the registry is always choosing that IP and not the router's.
    I need to know if there is a way to rewrite the Server code so the user just should do the same 'double-click' to run the server and not mess around "investigating" the outer IP. I read some of the RMI specs and it suggest to do IP Tunneling and some other techniques that I don't think may be appropiate to the nature of this "roaming server" application.

    Thanks, but that still doesn't do the work. As I stated in the post, not every user will know how to set java.rmi.server.hostname or even look for an outer IP... I was asking for an "automagical" way to code my server class so it could do some job to do the guessing.
    Even though... I tried both ways at home with the help of a friend as the client, and it seemed to work. The client connected to the server but it was kicked out in less than 30 seconds. Being specific, every client, the ones inside and the ones outside my network. As if the only right way was to let the JVM set the IP (but again, in that way the server is invisible to the clients outside the network).

  • RMI server behind firewall--must use host as name, not IP

    Server is running behind a firewall, which runs such that any machine behind the firewall cannot use the external IP to get back to itself.
    That is:
    - outside IP = 192.171.20.5 (port forwards 1099 to 192.168.1.5:1099)
    - inside IP = 192.168.1.5 (rmi server listens on 1099)
    from the machine inside (192.168.1.5), it is IMPOSSIBLE to create a socket to [outside ip](192.171.20.5), port 1099, and expect it to get back to the machine inside--the firewall prohibits this.
    I -can- use name-based lookups, such that I can edit the hosts file on the inside box to route (myhost.com to 192.168.1.5). So, if everyone's DNS resolves myhost.com -> 192.171.20.5, then clients anywhere can go to myhost.com:1099 and will be redirected to my internal machine (192.168.1.5:1099).
    The problem with this is that the names get translated to IPs and sent back to the client.
    Is there a way to keep the names as names, so that both client (using external real-world DNS entries) and server (using local hosts file) can both resolve to the proper IP addresses?
    I'm starting server, as follows:
    java -Djava.rmi.server.codebase=http://myhost.com/rmi/ -Djava.security.policy=/policypath/policy -Djava.rmi.server.hostname=myhost.com mypkg.myclass
    The client connects and gets this message (from a connection exception):
    java.rmi.ConnectException: Connection refused to host: 192.168.1.5;

    Server is running behind a firewall, which runs such
    that any machine behind the firewall cannot use the
    external IP to get back to itself.I dont really understand this statement.. Machines behind the firewall referring to the external ip would be going to the gateway, not themselves.. Or do you have an internal AND external ip on the machines behind the firewall? Or are we referring to the gateway machine as an internal machine as well as external?
    That is:
    - outside IP = 192.171.20.5 (port forwards 1099 to
    192.168.1.5:1099)
    - inside IP = 192.168.1.5 (rmi server listens on
    1099)looks good, what kinda OS/firewall? If we're talking linux/ipchains (or iptables) with ip masquerading, I may be of some use to you...
    from the machine inside (192.168.1.5), it is
    IMPOSSIBLE to create a socket to [outside
    ip](192.171.20.5), port 1099, and expect it to get
    back to the machine inside--the firewall prohibits
    this.If you're on the internal network, why can't you just go for the internal ip addr? If I'm understanding correctly, you want internal dns requests for myhost.com to resolve to 192.168.1.5, and external dns requests to resolve to 192.171.20.5? That should't be a problem...
    I -can- use name-based lookups, such that I can edit
    the hosts file on the inside box to route (myhost.com
    to 192.168.1.5). So, if everyone's DNS resolves
    myhost.com -> 192.171.20.5, then clients anywhere can
    go to myhost.com:1099 and will be redirected to my
    internal machine (192.168.1.5:1099).the hosts file has nothing to do with routing, it's simply a dns-type thing... If your dns is giving external users a 192.168 address as the ip for myhost.com, they will never get to it. 192.168 is not routable on the internet, i think most inet routes will drop packets from 192.168.x.x or 10.x.x.x.
    Is there a way to keep the names as names, so that
    both client (using external real-world DNS entries)
    and server (using local hosts file) can both resolve
    to the proper IP addresses?As long as your dns is working correctly, java doesn't care if you use ips or host names.. Hostnames are preferable, so when you change your network around, you wont affect your rmi server.
    I'm starting server, as follows:
    java -Djava.rmi.server.codebase=http://myhost.com/rmi/
    -Djava.security.policy=/policypath/policy
    -Djava.rmi.server.hostname=myhost.com mypkg.myclass
    The client connects and gets this message (from a
    connection exception):
    java.rmi.ConnectException: Connection refused to host:
    192.168.1.5;Is your server compiled with the 192.171 ip? That's not gonna work, you have to use the same IP the server is running on. I'm still not clear on your network layout, is 192.171.20.5 and 192.168.1.5 the 2 gateway ip's, or is 192.168.1.5 a physically different machine? I'd be willing to bet that your server is compiled with the external address, and if that's not the same machine, then there's no chance of that working....
    There's more than port forwarding going on.. IIRC, java rmi keeps track of its own ip's.. A client request to an external ip will not connect to a server running on the internal ip, even if you forward the port, rmi itself doesn't recognize the internal as the ip it's trying to get to (even if it is true), so it bombs out.. This can happen if you run the rmi server on a gateway, and compile the server with the external ip, and try to connect to the internal ip.. If you want external machines to connect, you MUST run the server on an external ip.
    Give a little more info, we'll getcha running... I'm also assuming you have full control of your network (ie, firewall/dns)
    doug

  • RMI server behind fire wall

    hi there,
    i have a running application using RMI but the problem is..
    It only run when the server and the client are in the same LAN,But
    when installing the server side on a machine behind a fire wall it gives me this exception
    Connection refused: connect.
    So is there a special technique when dealing with server behind firewalls?
    if exis what should i use????
    Thanks for your time
    Regards
    Soha

    yes and some of the techniques are
    HTTP tunnelling
    Direct forwarding over http
    Indirect forwarding over http
    rmi-cgi scripts etc

  • Client connection to a Server behind a router

    Hello everyone,
    I'm building a client / server application where the server will be my machine that is in residential gateway behind a router. the client will be out of the U.S. completely. On the client side the connection method (connectTo(InetAddress ip)) must know the server IP address in order to connect to it. I've tried configuring port-forwarding on my router to have it forward any connection under port 5555 to my local IP and passing my public IP on the client side to that connection method. Disappointingly, that didn't work. Here is my Code for the server:
    import java.io.*;
    import java.net.*;
    * Server class, to accept concurrent client
    * requests,through accepting socket connection
    * and establishing a new thread to provide the
    * desired service
    * @author True
    * @see source.ServiceProvider
    public class Server {
         * Creates a new instance of source.Server
        public Server(){
            try{
                ServerSocket ss = new ServerSocket(5555);
                while(true){
                    Socket sock = ss.accept();
                    ServiceProvider sp = new ServiceProvider(sock);
                     sp.start();
            catch(IOException x ){
                // handles exception here
         * Main method creates a new instance of Server
         * @param args String [] of parameters at the excusion time
        public static void main(String args[]){
            new Server();
    }And here is my code for the client:
    // irrelevant code here...
    private void connectTo(InetAddress ip){
             try{
                 Socket sock = new Socket(ip, 5555 );
    //           Building Streams
                 OutputStream os = sock.getOutputStream();
                 ObjectOutputStream oos = new ObjectOutputStream(os);
                 InputStream is = sock.getInputStream();
                 ObjectInputStream ois = new ObjectInputStream(is);
                 // more irrelevant code here...
             catch(IOException x){
                 // handle exception here
             catch(ClassNotFoundException x){
                 // handle exception here
    }Any ideas or comments are welcome and highly appreciated.

    true_lover wrote:
    All configuration seem fine. port forwarding is straight forward on the router page. I checked all numbers & values and all seemed fine.Well obviously it's not. Otherwise you wouldn't be getting a connection refused.
    The only other item worth checking is if your ISP is blocking the port. Which may well be happening.
    The other poster was correct, once you have the exception figured out (aka what it is) and it's connection refused this is not actually a Java related problem any more and you should take that question to a general networking forum.
    Edited by: cotton.m on 27-Nov-2008 7:46 PM

  • Can't access locally hosted website from behind the router, but can outside

    Hi, I recently had to be moved from ATT DSL to U-verse. At home I host a small non-commercial website with a domain name registered, listening on port 80.  I can access the website if signed in to my employer's VPN at home, but not from any machine in my home network.  This worked for a few days after switching, but then suddenly stopped working. Any idea what's going on and if it can be fixed? Since I can get to it from VPN, I assume folks outside of U-verse can see it.  How about folks with U-verse as their ISP?  The web site is http://www.jtlanguage.com. Thanks. -John 

    I suspect that the U-Verse RG is smart enough to see that the IP address you are attempting to route to is itself, and it is not applying the port forwarding to traffic coming from internal addresses as it is from external traffic arriving (since the traffic is coming from behind the firewall, not outside it).  If this is the case, you could put a hosts file entry on your local machines to identify the internal IP address rather than the external IP address for the web server, so that the computers go directly to the machine behind the firewall.

  • Setting Up Time Capsule as a DHCP server in the router portion

    Hello
    I have converted my existing wireless router and network hard drive to a single time capsule. My old router was setup as a DHCP server and I had the IP range set to 10.0.0.1 to 10.0.0.50 and had a IMac, Windows PC and Copier connected to the EtherNet ports and my home network ran perfectly but only at 100MPS.
    I bought the time capsule to eliminate the old router and network hard rive to a single unit to free up space, but I can't figure out how to set up the time capsule router as a DHCP server? Every time I try and change the router address range and tell the software to configure the time capsule, I get errors saying my DNS range is not valid and the IP range is conflicting to the Internet settings?
    My old linksys router was so easy to setup, I just selected DHCP, gave it a range and the router took care of the IP address for the Internet. I consider myself a smart guy but apple has made this a little difficult.
    I would also like to setup the time capsule so it show up as an external drive in my mobileme account so I can access my files when I am on the road. HELP!!!
    Ron

    ronbak wrote:
    I have converted my existing wireless router and network hard drive to a single time capsule. My old router was setup as a DHCP server and I had the IP range set to 10.0.0.1 to 10.0.0.50 and had a IMac, Windows PC and Copier connected to the EtherNet ports and my home network ran perfectly but only at 100MPS.
    I bought the time capsule to eliminate the old router and network hard rive to a single unit to free up space, but I can't figure out how to set up the time capsule router as a DHCP server? Every time I try and change the router address range and tell the software to configure the time capsule, I get errors saying my DNS range is not valid and the IP range is conflicting to the Internet settings?
    In the Internet panel and Internet Connection tab of AirPort Utility, do you have "Configure IPv4" set to "Using DHCP" and "Connection Sharing" set to "Share a public IP address"?
    I would also like to setup the time capsule so it show up as an external drive in my mobileme account so I can access my files when I am on the road. HELP!!!
    You can set that in the Advanced panel, MobileMe tab.

  • RMI server causes the system to slow down and crash with socketException

    Hi,
    My RMI server application is a simple rmi server which invokes a JNI method once when I invoke through my client application. Server is left as it is after invoking the JNI method. After around 12 hours, server stops running with the following exception
    ZoneInfo: C:\Program Files\Java\jre1.6.0\lib\zi\ZoneInfoMappi
    ngs (Insufficient system resources exist to complete the requested service)
    ZoneInfo: C:\Program Files\Java\jre1.6.0\lib\zi\ZoneInfoMappings (Insufficient s
    ystem resources exist to complete the requested service)
    Dec 29, 2008 10:09:34 AM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAc
    ceptLoop
    WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,por
    t=0,localport=2161] throws
    java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unkno
    wn Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Dec 29, 2008 10:10:35 AM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAc
    ceptLoop
    WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,por
    t=0,localport=2161] throws
    java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unkno
    wn Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Dec 29, 2008 10:12:36 AM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAc
    ceptLoop
    WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,por
    t=0,localport=2161] throws
    java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unkno
    wn Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Dec 29, 2008 10:15:37 AM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAc
    ceptLoop
    WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,por
    t=0,localport=2161] throws
    java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unkno
    wn Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Dec 29, 2008 10:20:40 AM sun.rmi.transport.tcp.TCPTransport$AcceptLoop executeAc
    ceptLoop
    WARNING: RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,por
    t=0,localport=2161] throws
    java.net.SocketException: socket closed
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(Unkno
    wn Source)
    at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (4D555445583F57494E13120E4350500075), pid=1352, tid=1828
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
    # Can not save log file, dump to screen..
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (4D555445583F57494E13120E4350500075), pid=1352, tid=1828
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    Does anyone has any idea?
    Regards
    Nidhin

    Your RMI server invokes a JNI method as you mentioned. It seems your system resource is become very low as from the exception from "ZoneInfoMappi"
    (Insufficient system resources exist to complete the requested service...I would suggest the following
    1- remove the JNI method invocation and replace by a simple method which does nothing special ( counting etc..)
    2- Run the RMI sever and stress test it again
    If you see the RMI server is working well after 12 hours, then your native method is leaking i.e consuming the system resources ( RAM etc..)
    You should profile the running RMI server using jconsole
    Regards,
    Alan Mehio

  • What to do when Verizon server on the route is almost always timing out?

    Nine times out of ten, the server at the 3rd external hop after the packet leaves my router is timing out, and my surfing speed is not good.  It's a Verizon server, juding by the IP address that appears in this slot on those occasions when it does not time out (130.81.xxx.xxx).
    Is there a way to file a trouble ticket?

    See my other message about timeouts in trace routes often being meaningless.

  • [SOLVED] Remote Access to a home Arch system behind the router.

    Hello,
    I am trying to remotely access my home Arch system from school. I did try doing something and this is what I did:
    1. Used DynDns and NO-IP to setup a free domain, I thought NO-IP script was easy to run so I tested this on NO-IP.
    2. I then installed Openssh.
    3. Then I have setup the Port forwarding on the router to point to my ssh port (change from 22).
    4. I tried to ping, the domain name from NO-IP with no response.
    What I want to ask is... is there any better way of doing this?
    I dont need a desktop access, simple ssh should do for now.
    Thank You
    Gopi
    Last edited by gopichand (2011-11-01 00:50:13)

    OK, I have solved this by this process. Will work only if the router supports the DynDNS. I am assuming that you have created a DynDNS account, its free for 2 domains. I also had to make my computer use STATIC IP from my router, just specify any IP address outside the DHCP range.
    1. On the router, add the details about the DynDNS account. On my Belkin Router, I had to go to Firewall -> DDNS -> DynDNS and give the details and also enable it.
    2. By doing the above step, we don't have to install the client for DynDNS.
    3. On the router again, setup the port forwarding, again (on my Belkin Router) go to Firewall -> Virtual Servers -> Add the IP and the port numbers, I had to use the same number for both the incoming and the private port, though for other routers the number can differ?
    4. On the computer, I installed the openssh and then changed the login port to the one specified in the router for forwarding.
    5. Make the router and ssh logins as safe as possible. I understand that opening the router is not safe so I have to warn you.
    I can now login using my DynDNS domain name from anywhere woohoo!
    Last edited by gopichand (2011-11-01 01:07:23)

  • External ip adress at the server network interface behind the router

    Hello to all!
    I am installing MacOSX Snow Leopard Server and using it behind my AirPort router as a mail and web server. I was setup Airport at the NAT section with 'Enable default host at' option and all services workning well, but one thing that i want to understand is the 'network interfaces' at the 'Server admin' of Leopard Server. There is listed only internal ip adress (10.0.1.2) that use the my server, but there is no my static external ip adress. Is it correct ? Or i should manualy also to add a external ip adress which is now actually used with my AirPort router?
    If i should, so how do it correctly, using virtual interfaces at the network section or somewhere else?

    So, with any Airport routers i can't to route my public static IP adress to the MacOSX Server machine? I need another router device for this, am i right?
    Your Airport uses your public static IP address.
    Your Airport is typically then configured to port-forward inbound traffic along to your server at your own private static IP address via NAT. The mechanism known as port-forwarding is (once it is configured) how traffic routing to your public static IP address gets routed to your private static IP address.
    In general (and unless something like NAT is involved), there's only one host box active at one IP address at a time.
    I am not sure, but i think that at the server network interface i should has a public static IP adress, but with this configuration i can't see it.
    If you would so kind as to tell me what particular part(s) of [this article|http://labs.hoffmanlabs.com/node/275] are confusing and why, and I'll see if I can address the confusion and to update the article.

  • RMI game behind a router

    Hey all,
    I have developed a two player game in Java. I use RMI to run it as a client server game... The problem arises when I try to connect two computers behind different routers. I can manually configure both routers to forward data on port 1099 to each ip... But ip's can change and I can't configure everyones router... Is there a way in Java to accept incoming requests? Really, my question is, how do other online games get through, such as Battlefield 1942? Is there a way to allow access like that??? Or do they "piggy back" on another port? And which port.
    Thanks
    Dave

    Unfortunately for a client-server application you are going to have to do a significant rewrite. Not only that the Server will have to be hosted on a Servlet Container web server application like Tomcat. This server machine needs to be accessible over TCP/IP communication.
    Here is a tutorial on Servlets to get you started.
    I made similar games on this concept and I warn you that it is not easy but extremely rewarding if you can pull it off.
    A servlet just basically 'serves' data. It waits for a request from an application, whether that application be a Java app, an internet browser, whatever... and 'handles' the request, does some processing, and then returns a 'response'.
    In the case of a java app, you can send actual Java objects as a request to the servlet, and have the servlet return Java objects as a response. The servlet would keep track of all information pertaining to a game session. Eg. (client app keeps sending requests to the server to see if it is his turn yet. If true then stop sending requests and begin your turn).
    This is not to say that you need to scrap what you have right now... many games have an online aspect as well as a LAN based network for multiplayer games. Perhaps you can allow the user to select what kind of multiplayer game they wish to play?
    I hope this helps and good luck.

  • RMI server crashing the Virtual Machine

    I am writing an enterprise RMI service at work and it has been crashing at seemingly random points and in-frequently. It is not actually crashing as such, because I have added a shutdown hook and that is getting called before it exits. I know for sure that it is not a system.exit() call because I have prevented all system.exit() calls in the security manager. I also have put in very tight memory management and an extended heap so I don't think its a memory issue either. Frequent calls to freeMemory() show that there is no memory leakage and that everything seems to be being cleaned up correctly.
    I am using the IBM 1.3 virtual machine on a linux box for the server and thus the calls to the garbage collector are working nicely and when requested.
    The crashing is happening at seemingly random points and I have covered all my public methods with try....catch blocks that catch Throwable, and it doesn't seem to be an exception. Code that 19 out of 20 times will run fine, crashes on the 20th run etc.
    What I am wondering is - has anyone had similar problems and do you know how to fix it?
    My other thought is that perhaps it is a problem with the IBM virtual machine, and I am thus going to try running things through the Sun 1.3 virtual machine to see if I get any different results.
    Any insights or help from people developing similar services would be greatly appreciated (this is the first RMI service I have implemented).

    YES!!! I finally solved it..........
    I put the monitoring code into the startup script - incidentally, on linux the shell variable is $? as opposed to $status.
    Then I let it run and this morning it exited again and the error code was 130 - or Control-C.... This made no sense to me as the service was running on a linux box which I was monitoring through a telnet window on my Windows PC. And I know for sure that I wasn't pressing Control-C.
    After talking to someone else at work I found out that they had heaps of problems running a resin server in a similar way (through a telnet window), and in the end it came down to the telnet window was sending things it shouldn't to the resin server and causing all sorts of problems. As soon as they ran it in the background, the problems disappeared.
    So I ran it in the background and the problem has disappeared. Instead, to monitor the service I just did a tail -f on the log file and every half hour or so the tail program running through the telnet window was just dying mysteriously...... ha ha ha ha
    Thanks a lot for your help EJP, I wouldn't have been able to sort it out without your suggestions. And I have learnt a lot more about RMI in tracking this bug down. Only problem is that the clients were here for a demo last week and had it exit once while they were running the client app......arg!!!

  • ALCS server behind the firewall/on-premise?

    I was wondering if there were any plans to offer the capabilities of ALCS as an on-premise solution?    

    Hi Rick,
    Not at this time.  However, we are always looking to shape our roadmap based on feedback.  Any reason why this is a must for your business case?  Or why a single-tenant or a hybrid deployment (on-prem edge to handle auditing, auth, etc., but the core service is still in the cloud) won't suffice?
    Thanks,
    Fang

  • Problem with server behind router

    Hey there,
    I'm working on a small chatting application which performs pretty well when connecting to a server on the same local network, but not-so-well when it's connecting to a server behind a router that's not on the same network.
    Is there any way to get past this problem without using port forwarding? I'd try using that, if it weren't for the fact that the router in question didn't come with any software for configuring it.
    I've looked around for a fix to this problem for a while, but I still haven't managed to find anything. Any ideas?
    The chat program uses ObjectInput/Output streams to send data between the client and server.

    Without port forwarding on the router, your options are a bit limited. You'll probably need a central server to act as a go-between, or at least a rendez-vous point.
    But doesn't your router have an HTML interface? What make and type is it? A manual should be easy to find online, if you don't have a printed version.

Maybe you are looking for

  • Aiptek tablet driver not loading? [Move to Hardware, accidental post]

    After trying to set up my Aiptek tablet again with the current Xorg version...it doesn't work at all. From the log file below, it says that it found the tablet, but isn't loading the driver (even though I have xf86-input-aiptek installed). I set up a

  • Help me choose a 865PE board

    Hi, I need some help in choosing the best(most feature packed, fast etc.) MSI 865PE motherboard. There are two boards that are pretty identical and trying to find the difference between them has been difficult. They are the Neo2-FIS2R and Neo2-PFISR.

  • E-MU 1212m Recording Sys

    I just got the 22m recording system for Christmas, but I am having trouble with volume when trying to record. Is an external amplifier absolutely necessary or is it possible to plug my guitar or mic right into the sound card? I think I've turned up a

  • Mapping issue: link related items together based on a key

    Hi guys, I have a mapping issue. I have a source structure like this: <ad>   <key>   <value1> </ad> <ad>   <key2>   <value2> </ad> <bx>   <key>   <value3> </bx> <bx>   <key2>   <value4> </bx> <bx>   <key2>   <value5> </bx> I need to get this: <kitem>

  • How do I edit suggested email addresses

    When creating a new message Apple Mail suggests an email address as I type even if this email address has changed in Address Book.  How do I edit this suggested list?  I have done it before but can not remember how.