javaremedy

Which port to use to connect to Remedy AR System Server?


I'm trying to test a connection to Remedy using the Java API, i.e. arapi7604_build002.jar.

According to the documentation, 4100 is a common AR System server port: https://docs.bmc.com/docs/display/public/itsm81/Port+information, but this isn't working for me:

private ARServerUser server;

private RemedyJavaAPITest() {
    server = new ARServerUser();
    server.setServer("fqd.com");
    server.setUser("userName");
    server.setPassword("pass123");
    server.setPort(???);
}

public static void main(String[] args) {

    RemedyJavaAPITest test = new RemedyJavaAPITest();
    test.connect();
    test.cleanup();

}

Error:

Connecting to AR Server...
ERROR (90): Cannot establish a network connection to the AR System server; Connection timed out: connect fqdn.com:4100
    at com.bmc.arsys.apitransport.ApiProxyJRpcBase.connectionTry(Unknown Source)
    at com.bmc.arsys.api.ProxyJRpc.getRpcClient(Unknown Source)
    at com.bmc.arsys.api.ProxyJRpc.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.bmc.arsys.apitransport.connection.b.a(Unknown Source)
    at com.bmc.arsys.apitransport.connection.b.createProxy(Unknown Source)
    at com.bmc.arsys.api.ProxyManager.createProxy(Unknown Source)
    at com.bmc.arsys.api.ProxyPool.createProxy(Unknown Source)
    at com.bmc.arsys.apitransport.connection.a.get(Unknown Source)
    at com.bmc.arsys.apitransport.connection.c.getProxy(Unknown Source)
    at com.bmc.arsys.api.PoolingProxyManager.getProxy(Unknown Source)
    at com.bmc.arsys.apitransport.connection.c.getProxy(Unknown Source)
    at com.bmc.arsys.api.ARServerUser.verifyUser(Unknown Source)
    at RemedyJavaAPITest.connect(RemedyJavaAPITest.java:37)
    at RemedyJavaAPITest.main(RemedyJavaAPITest.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Solution

  • Usually the port in which AR Server is listening for incoming connections can be configured. Please get it confirmed with your Remedy Administrators/Developers Below are some of the points you should take care while doing this.

    1. Make sure that the machine where AR server is installed is reachable from the machine where you are running your java program.
    2. setServer() required hostname(anything) which will connect to your target machine(hostname should be a resolvable one)
    3. If you are able to connect to host machine and port number is wrong, you would getting an error message which says 'Connection Refused'. But you are getting 'timed out', which usually means your connection request is not received any reply from the network. So confirm your host name.
    4. 3700 is also commonly used for AR Servers.