[Gllug] Java-RMI-Linux.Can any one find something fishy in the linux part???
Manjush G. Menon
manjush at lycos.co.uk
Thu Aug 1 06:58:02 UTC 2002
Hi guys,
Any Linuxians see something fishy in the following queries Linux part???? i mean regarding the
permissions, etc...
Plz read on...
I have a * RMI SERVER * application running on my RHLinux with servercode classpath URL as
file:/tmp/dbUtility/ .
In the linux machine, samba is configured so that i can access the path from my Win2k n/w too.
The folder has RWX permission for all (chmod 777 has been set)
The objects are Activatable ones, and their registry entried are as follows
....
Properties props = new Properties();
props.put("java.security.policy", "sf.policy");
ActivationGroupDesc.CommandEnvironment ace = null;
ActivationGroupDesc dbTGroup = new ActivationGroupDesc(props, ace);
ActivationGroupID agi = ActivationGroup.getSystem().registerGroup(dbTGroup);
MarshalledObject data = null;
String location = "file:/tmp/dbUtility";
/*User Management service registration*/
ActivationDesc desc = new ActivationDesc (agi, "sr.tr.server.UMEngine", location, data);
UMInterface uri = (UMInterface)Activatable.register(desc);
System.out.println("Got the stub for the UMInterface");
Naming.rebind("UMEngine", uri);
System.out.println("Exported UMEngine");
Now when i try to run the client on a Win2k machine, i get the following error:::::::::::::
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.server.Activation$ActivatorImpl_Stub.activate(Unknown Source)
at java.rmi.activation.ActivationID.activate(Unknown Source)
at sun.rmi.server.ActivatableRef.activate(Unknown Source)
at sun.rmi.server.ActivatableRef.invoke(Unknown Source)
at sofker.transfer.server.UserManagementEngine_Stub.logIn(Unknown Source)
at sofker.transfer.client.UMClient.init(UMClient.java:28)
at sofker.transfer.client.UMClient.main(UMClient.java:62)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 11 more
But i wonder how the 127.0.0.1 loopback ip comes in the stackTrace!!, when actually I'm
calling the following piece of code
public UMInterface ume;
....
String location = "rmi://192.168.0.63/UMEngine";
rClient sc = new rClient("Admin", "ha", "");
ume = (UMInterface)Naming.lookup(location);
System.out.println("Got a remote reference to the UMEngine.")
The program works fine in a Win2k lan with both server and client application on Win-nodes.
Also, when the client is run on the same RHLinux machine (as i have no other linux machine),
it also works fine. The problem came when accessing the RMI server running on RHLinux from
the Win-client.
If any of you guys can help me, I would be thankfull..
Manjush G. Menon,
Sr Programmer (R&D),
Sofker Solutions Pvt Ltd
43/1494, St Benedict Road,
Ernakulam North,
KERALA, INDIA - 682018.
Ph: +91 484 392868
+91 484 393865
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20020801/1a566596/attachment.html>
More information about the GLLUG
mailing list