dcsimg
interesting problem: "no such object in table"
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ben_Pryor
Posted On:   Thursday, January 20, 2005 07:27 AM

I'm running into an interesting problem with a pretty vanilla RMI application. The server exports a single remote object using Naming.rebind(), and multiple clients invoke server methods remotely. There are no callbacks involved. The system normally works fine, but intermittently stops working and clients receive a "java.rmi.NoSuchObjectException: no such object in table" when making a remote call. It's interesting because the client's Naming.lookup() succeeds and returns a stub object, but when the client invokes a method on the stub object then the error occurs. Once the server has gotten into this state, it needs to be restarted manually, at which point it works fine again for a while. I turned o   More>>


I'm running into an interesting problem with a pretty vanilla RMI application. The server exports a single remote object using Naming.rebind(), and multiple clients invoke server methods remotely. There are no callbacks involved.


The system normally works fine, but intermittently stops working and clients receive a "java.rmi.NoSuchObjectException: no such object in table" when making a remote call. It's interesting because the client's Naming.lookup() succeeds and returns a stub object, but when the client invokes a method on the stub object then the error occurs. Once the server has gotten into this state, it needs to be restarted manually, at which point it works fine again for a while.


I turned on java.rmi.server.logCalls to try to see what's going on. Here's the important snip from the log that shows the problem:

			
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(6)-192.168.232.21: [192.168.232.21: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(7)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
Jan 19, 2005 4:39:52 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(7)-192.168.232.21: [192.168.232.21: com.mycompany.myserver.myserver[0]: public abstract java.lang.String com.mycompany.myserver.client.Imyserver.ping() throws java.rmi.RemoteException]
Jan 19, 2005 4:39:55 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(8)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)]
Jan 19, 2005 4:51:20 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(9)-192.168.232.21: [192.168.232.21: sun.rmi.registry.RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
Jan 19, 2005 4:51:20 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(10)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
Jan 19, 2005 4:51:20 PM sun.rmi.transport.Transport serviceCall
FINE: RMI TCP Connection(10)-192.168.232.21: [192.168.232.21] exception:
java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.Transport.serviceCall(Transport.java:112)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:554)
Jan 19, 2005 4:51:37 PM sun.rmi.server.UnicastServerRef logCall
FINER: RMI TCP Connection(11)-192.168.232.21: [192.168.232.21: sun.rmi.transport.DGCImpl[0:0:0, 2]: void clean(java.rmi.server.ObjID[], long, java.rmi.dgc.VMID, boolean)]



Interesting to note is that the clean() call shown in the above log only occurs when the problem occurs.
Any tips or advice would be appreciated. Thanks.

   <<Less

Re: interesting problem: "no such object in table"

Posted By:   Jesper_Nielsen  
Posted On:   Tuesday, March 1, 2005 03:57 AM

Having the same problem here. And it does indeed seem to be a timeout of some sort. Works fine for the first few minutes, then getting something similar to the above error. The fact the a function called java.rmi.dgc.Lease dirty(... is actually called on supports this. However, does the server require lease?



My problem is that my client connects every time it's run, so it isn't from the client side the problem appears, but rather between rmiregistry and my server?



I wasn't able to find much regarding this problem anywhere else on the internet..

Re: interesting problem: "no such object in table"

Posted By:   Kevin_Roll  
Posted On:   Thursday, February 24, 2005 09:24 AM

I'm investigating a somewhat similar problem. Although I haven't entirely figured it out, I do see something that may be relevant. I notice that in your log file the time between the first and second group of calls is just over 10 minutes. The default value of the java.rmi.dgc.leaseValue property (http://java.sun.com/j2se/1.4.2/docs/guide/rmi/javarmiproperties.html) is 10 minutes, so perhaps the lease is expiring?
About | Sitemap | Contact