简体   繁体   English

通过Java连接到Remedy时出现错误90(连接被拒绝)

[英]Error 90 (Connection refused) when connecting to Remedy via Java

On my company network we run Remedy 7.64 and want to create Incidents automatically. 在我的公司网络上,我们运行Remedy 7.64并希望自动创建事件。 I setup the development environment using IntelliJ IDEA and the ARAPI-files for my server version. 我使用IntelliJ IDEA和我的服务器版本的ARAPI文件设置开发环境。 We have no administration access to the server to change anything over there. 我们没有管理员访问服务器来更改那里的任何内容。

The error says 错误说

ERROR (90): Can't connect to AR System-Server; 错误(90):无法连接到AR System-Server; Connection refused: connect <host>. 连接被拒绝:连接<host>。

Mysteriously i can connect to the Web-Interface using Chrome, i can ping the host, i can access it via the Driver & the official Remedy Client and the java tool can get the source code of the web-interface of it as well, so it obviously is possible to connect to the host but the difficulty is somewhere else. 神秘地我可以使用Chrome连接到Web界面,我可以ping主机,我可以通过驱动程序和官方Remedy客户端访问它,java工具也可以获取它的Web界面的源代码,所以显然可以连接到主机,但困难在其他地方。

This is my simple demo file 这是我简单的演示文件

import com.bmc.arsys.api.*;
public static void main(String [ ] args)
{
    ARServerUser ctx = new ARServerUser();
    ctx.setServer("<server>");
    ctx.setUser("<user>");
    ctx.setPassword("<pass>");

    try {
        ctx.login();
        System.out.println("works");
    } catch (ARException e) {
        System.out.println(e.getMessage());
        e.printStackTrace();
    }
}

This is the list of dependancies 这是依赖项列表

  • 1.8 (java version "1.8.0_65") 1.8(java版“1.8.0_65”)

  • [Module source ] [模块来源]

  • groovy-2.4.5 Groovy的2.4.5

  • log4j-1.2.14.jar log4j的-1.2.14.jar

  • arapi7604_build002.jar arapi7604_build002.jar

You have to provide port number in which AR server is listening on. 您必须提供AR服务器正在侦听的端口号。 "ERROR (90): Can't connect to AR System-Server; Connection refused: connect ." “ERROR(90):无法连接到AR System-Server;连接被拒绝:连接。” means that the server refused to connect as you haven't mentioned the port number to connect. 表示服务器拒绝连接,因为您没有提到要连接的端口号。 Normally people use 37000 as the AR server port number, but you have to check with your Remedy Admin to know this. 通常人们使用37000作为AR服务器端口号,但您必须与您的Remedy管理员联系以了解这一点。

I just came across the same error. 我刚刚遇到同样的错误。 My issue was that I tried to connect using the full url as <server> (" https://... "). 我的问题是我尝试使用完整的URL连接为<server> (“ https://... ”)。 Using just the name of the server worked. 只使用服务器名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM