使用哪个端口连接到Remedy AR System Server?

时间:2017-06-29 12:52:19

标签: java remedy

我正在尝试使用Java API测试与Remedy的连接,即arapi7604_build002.jar

根据文档,4100是一个常见的AR系统服务器端口:https://docs.bmc.com/docs/display/public/itsm81/Port+information,但这对我不起作用:

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();

}

错误:

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)

1 个答案:

答案 0 :(得分:1)

通常可以配置AR Server正在侦听传入连接的端口。请与您的补救管理员/开发人员确认以下是您在执行此操作时应注意的一些要点。

  1. 确保可以从运行java程序的计算机访问安装了AR服务器的计算机。
  2. setServer()需要连接到目标计算机的主机名(任何内容)(主机名应该是可解析的主机名)
  3. 如果您能够连接到主机并且端口号错误,则会收到错误消息“拒绝连接”。但是你正在“超时”,这通常意味着你的连接请求没有收到来自网络的任何回复。请确认您的主机名。
  4. 3700也常用于AR服务器。