0

我已经在 IBM Bluemix 上配置了 Secure Gateway 服务,然后在我的环境中配置了 Secure Gateway 客户端。两者都是连接的。此后,我使用提供的host:port组合从我的云应用程序添加了一个连接调用。应用程序出现错误connection refused

我该如何解决?

4

2 回答 2

0

在大多数情况下,错误是由以下原因之一引起的:

  • 在 Secure Gateway 配置中,您必须向本地数据库提供 IP 地址和端口,从运行 Secure Gateway 客户端的位置可以看出。您是否提供了正确的 IP 地址和端口号?
  • 数据库服务器上的防火墙阻止来自 Secure Gateway 客户端的访问。
  • Secure Gateway 客户端需要一个打开连接的 ACL(访问控制列表)。
  • 您的数据库未配置为从外部访问。你打开端口了吗?
于 2016-06-02T05:40:36.787 回答
0
i changed the db type from DB2 As400 to  normal db2. Now i have this error : 

ERR App [err] com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.12.55] A communication error occurred during operations on the connection's underlying socket, socket input stream,
ERR App or socket output stream.  Error location: Reply.fill() - insufficient data (-1).  Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
ERR App [err]   at com.ibm.db2.jcc.am.hd.a(hd.java:319)
ERR App [err]   at com.ibm.db2.jcc.t4.a.a(a.java:461)
ERR App [err]   at com.ibm.db2.jcc.t4.a.a(a.java:456)
ERR App [err]   at com.ibm.db2.jcc.t4.z.b(z.java:242)
ERR App [err]   at com.ibm.db2.jcc.t4.z.c(z.java:268)
ERR App [err]   at com.ibm.db2.jcc.t4.z.c(z.java:381)
ERR App [err]   at com.ibm.db2.jcc.t4.z.v(z.java:1149)
ERR App [err]   at com.ibm.db2.jcc.t4.ab.a(ab.java:45)
ERR App [err]   at com.ibm.db2.jcc.t4.b.n(b.java:1251)
ERR App [err]   at com.ibm.db2.jcc.t4.b.b(b.java:1123)
ERR App [err]   at com.ibm.db2.jcc.t4.b.d(b.java:717)
ERR App [err]   at com.ibm.db2.jcc.t4.b.c(b.java:703)
ERR App [err]   at com.ibm.db2.jcc.t4.b.a(b.java:391)
ERR App [err]   at com.ibm.db2.jcc.t4.b.<init>(b.java:320)
ERR App [err]   at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:214)
ERR App [err]   at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:460)
ERR App [err]   at java.sql.DriverManager.getConnection(Unknown Source)
ERR App [err]   at java.sql.DriverManager.getConnection(Unknown Source)
ERR App [err]   at wasdev.sample.servlet.DBServlet.getTargetDBConnection(DBServlet.java:136)
ERR App [err]   at wasdev.sample.servlet.DBServlet.doGet(DBServlet.java:57)
ERR App [err]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
ERR App [err]   at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
ERR App [err]   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
ERR App [err]   at [internal classes]
ERR App [err]   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
ERR App [err]   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
ERR App [err]   at java.lang.Thread.run(Unknown Source)
于 2016-06-02T18:11:42.360 回答