1

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

根据文档,4100是一个常见的 AR System 服务器端口: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)
4

1 回答 1

1

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

  1. 确保安装 AR 服务器的机器可以从您运行 java 程序的机器访问。
  2. setServer() 需要的主机名(任何东西),它将连接到您的目标机器(主机名应该是可解析的)
  3. 如果您能够连接到主机并且端口号错误,您将收到一条错误消息,显示“连接被拒绝”。但是您正在“超时”,这通常意味着您的连接请求没有收到来自网络的任何回复。所以确认你的主机名。
  4. 3700 也常用于 AR 服务器。
于 2017-06-30T03:57:15.820 回答