Hello all,
I am back again. Another day, another error I am now working on hello world 3 rmi tutorial. Added the additional services required and created another project for the rmi client java program. But trying to run it, gives me the below error: Hello3Client exception: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect 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.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at java.rmi.Naming.lookup(Unknown Source) at testClientRmi.Hello3Client.main(Hello3Client.java:31) 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.SocksSocketImpl.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) Then i realized, I hadn't made the required changes in rmi-container.xml and ofbiz-container.xml. But on doing that, ofbiz doesn't start at all. Fails with 'cannot start<> org.ofbiz.service.rmi' error. |
Ok I changed the port in the program and the config files from 1099 to 10990, and the conn refused error doesn't come any longer. But now that's been replaced by 'no trusted certification found' error!
|
Hi,
I experienced the similar problem and found that keystore associated with the RMI container is empty (it does not contain any ssl certificates). I changed it to the ssl connector keystore and worked fine for me. Thanks, Raj jaki wrote: > Ok I changed the port in the program and the config files from 1099 to 10990, > and the conn refused error doesn't come any longer. But now that's been > replaced by 'no trusted certification found' error! > > > > jaki wrote: > >> Hello all, >> >> I am back again. Another day, another error :-(( >> >> I am now working on hello world 3 rmi tutorial. Added the additional >> services required and created another project for the rmi client java >> program. But trying to run it, gives me the below error: >> >> Hello3Client exception: Connection refused to host: 127.0.0.1; nested >> exception is: >> java.net.ConnectException: Connection refused: connect >> 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.newCall(Unknown Source) >> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) >> at java.rmi.Naming.lookup(Unknown Source) >> at testClientRmi.Hello3Client.main(Hello3Client.java:31) >> 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.SocksSocketImpl.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) >> >> Then i realized, I hadn't made the required changes in rmi-container.xml >> and ofbiz-container.xml. But on doing that, ofbiz doesn't start at all. >> Fails with 'cannot start<> org.ofbiz.service.rmi' error. >> >> >> >> > > |
Hi Raj, thanks for the reply. Got it solved, but by a different method..
Firstly, replaced the below set of tags: <property name="client-factory" value="org.ofbiz.service.rmi.socket.ssl.SSLClientSocketFactory"/> <property name="server-factory" value="org.ofbiz.service.rmi.socket.ssl.SSLServerSocketFactory"/> <property name="ssl-client-auth" value="true"/> with <property name="client-factory" value="org.ofbiz.service.rmi.socket.zip.CompressionClientSocketFactory"/> <property name="server-factory" value="org.ofbiz.service.rmi.socket.zip.CompressionServerSocketFactory"/> <property name="ssl-client-auth" value="false"/> in ofbiz-container.xml and rmi-container.xml (framework/base/config/). Then got all the java files from the below link: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/zip/?pathrev=451170 and put them in '\framework\service\src\org\ofbiz\service\rmi\socket\zip' and ran 'ant.bat run' again. And it worked! Hope the above will help all future victims of this error
|
Free forum by Nabble | Edit this page |