2

我有一个简单的 Java 程序(使用 JTOpen)连接到 iSeries 并打开 IFS 文件:

System.out.println("by ipaddress");
AS400 as400 = new AS400("130.3.3.333", "user", "password");
System.out.println("as400 connected? = " + as400.getCcsid());
//handle the exception if the file is null 
IFSFileInputStream as400File = new IFSFileInputStream(as400, "//PDF//00000104.PDF");
System.out.println("is available" + as400File.getPath());
as400File.close();

在 DMZ 中的一台服务器上一切正常,但在不同建筑物(仍在 DMZ 中)的服务器上的(假定相同)VM 映像上,我收到错误:

by ipaddress
as400 connected? = 37
IO security exception
java.net.ConnectException: Connection timed out: 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 java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at com.ibm.as400.access.PortMapper.getServerSocket(PortMapper.java:170)
    at com.ibm.as400.access.AS400ImplRemote.getConnection(AS400ImplRemote.ja
va:975)
    at com.ibm.as400.access.AS400ImplRemote.connect(AS400ImplRemote.java:390
)
    at com.ibm.as400.access.AS400.connectService(AS400.java:870)
    at com.ibm.as400.access.IFSFileInputStream.connectAndOpen(IFSFileInputSt
ream.java:416)
    at com.ibm.as400.access.IFSFileInputStream.<init>(IFSFileInputStream.jav
a:150)
    at com.ibm.as400.access.IFSFileInputStream.<init>(IFSFileInputStream.jav

连接工作正常,但随后出现连接异常。

欢迎任何想法。在 iSeries 的两台服务器之间的防火墙中打开了相同的端口。

4

1 回答 1

2

每个端口上有多个服务,初始连接只打开一个。检查文件服务的jt400 常见问题解答。我希望此端口在防火墙中未打开。

于 2010-11-05T14:31:21.593 回答