Java Web Client fails to Launch with error "Connection refused: connect"

Document ID : KB000095909
Last Modified Date : 15/05/2018
Show Technical Document Details
Issue:
Launching the Java Web Client results in the error "AwE-5009 - RMI connection failure,check if Rmi server is running".

Selecting details button show the error "java.net.ConnectException: Connection refused: connect".

The RmiServer is running with no errors appearing in RMI logs. Below is the full error:

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 com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
    at com.appworx.client.screen.util.ClientSocketManager.A(ClientSocketManager.java:250)
    at com.appworx.client.screen.util.ClientSocketManager.connect(ClientSocketManager.java:315)
    at com.appworx.client.screen.util.Loader.setMaster(Loader.java:936)
    at com.appworx.client.screen.logon.C.Ń(Logon.java:230)
    at com.appworx.client.screen.main.AxMain.A(AxMain.java:2241)
    at com.appworx.client.screen.main.AxMain.main(AxMain.java:2836)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Cause:
There is an issue with the connection from the user's PC to the master
Resolution:
Correct any connection issues by enabling client debug and reviewing the Java console logs created during Java Web Client startup process.

Possible connection issues can occur for the following reasons:
  • Incorrect RMIHostID value in the $AW_HOME/web/classes/Options.properties or %AW_HOME%/web/classes/Options.properties (Windows OS)
  • Incorrect RMIRegistryPortNumber $AW_HOME/web/classes/Options.properties %AW_HOME%/web/classes/Options.properties (Windows OS)
  • Firewall between the User's PC and RMIHostID (make sure you can connect to the master's RMIHostID and RMIRegistryPortNumber using telnet or similar command)
Additional Information:
Client debug can be enabled by following the below procedures:

1. Edit the $AW_HOME/web/Client.jnlp or %AW_HOME%\web\Client.jnlp (Windows OS). Change the below line and save.

from:     
<property name="jnlp.appworx.debug" value="false"/>

to:
<property name="jnlp.appworx.debug" value="true"/>  

2. Open Java control Panel > Select Advanced Tab > Enable tracing, logging, and show console options > Apply.

3. Clear Java cache from from Java Control Panel by selecting > General Tab > Temporary Internet Files Settings > Delete Files > Check all available options > Select OK.

4. Launch New Java Web Client session from Web Browser. A Java console windows should appear and provide additional debug information regarding the Java Web Client session.