如何从 Bluemix 上部署的应用程序访问本地数据库 DB2?
How can I access from an app deploy on Bluemix to on-premise database DB2?
我配置了一个安全网关,我正在尝试连接到一个内部部署数据库。我收到此错误消息:
[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,
6/3/2016 5:49:31 PM ERR App or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
6/3/2016 5:49:31 PM ERR App [err]
App [err] at com.ibm.db2.jcc.am.hd.a(hd.java:319)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:461)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:456)
App [err] at com.ibm.db2.jcc.t4.z.b(z.java:242)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:268)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:381)
App [err] at com.ibm.db2.jcc.t4.z.v(z.java:1149)
App [err] at com.ibm.db2.jcc.t4.ab.a(ab.java:45)
App [err] at com.ibm.db2.jcc.t4.b.n(b.java:1251)
App [err] at com.ibm.db2.jcc.t4.b.b(b.java:1123)
App [err] at com.ibm.db2.jcc.t4.b.d(b.java:717)
App [err] at com.ibm.db2.jcc.t4.b.c(b.java:703)
App [err] at com.ibm.db2.jcc.t4.b.a(b.java:391)
App [err] at com.ibm.db2.jcc.t4.b.<init>(b.java:320)
App [err] at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:214)
App [err] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:460)
App [err] at java.sql.DriverManager.getConnection(Unknown Source)
App [err] at wasdev.sample.servlet.DBServlet.getTargetDBConnection(DBServlet.java:127)
App [err] at wasdev.sample.servlet.DBServlet.doGet(DBServlet.java:60)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
App [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
App [err] at [internal classes]
App [err] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
App [err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
App [err] at java.lang.Thread.run(Unknown Source)
这并不表示安全网关问题。查看其他人较早遇到的错误实例,要么是
过时的连接问题
https://developer.ibm.com/answers/questions/10120/what-could-cause-a-connection-refused-to-sqldb-db2-after-some-time.html 或
防火墙问题或网络问题,如
DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
I am getting " Operation timed out. ERRORCODE=-4499, SQLSTATE=08001" connecting to remote DB2
我配置了一个安全网关,我正在尝试连接到一个内部部署数据库。我收到此错误消息:
[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,
6/3/2016 5:49:31 PM ERR App or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
6/3/2016 5:49:31 PM ERR App [err]
App [err] at com.ibm.db2.jcc.am.hd.a(hd.java:319)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:461)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:456)
App [err] at com.ibm.db2.jcc.t4.z.b(z.java:242)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:268)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:381)
App [err] at com.ibm.db2.jcc.t4.z.v(z.java:1149)
App [err] at com.ibm.db2.jcc.t4.ab.a(ab.java:45)
App [err] at com.ibm.db2.jcc.t4.b.n(b.java:1251)
App [err] at com.ibm.db2.jcc.t4.b.b(b.java:1123)
App [err] at com.ibm.db2.jcc.t4.b.d(b.java:717)
App [err] at com.ibm.db2.jcc.t4.b.c(b.java:703)
App [err] at com.ibm.db2.jcc.t4.b.a(b.java:391)
App [err] at com.ibm.db2.jcc.t4.b.<init>(b.java:320)
App [err] at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:214)
App [err] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:460)
App [err] at java.sql.DriverManager.getConnection(Unknown Source)
App [err] at wasdev.sample.servlet.DBServlet.getTargetDBConnection(DBServlet.java:127)
App [err] at wasdev.sample.servlet.DBServlet.doGet(DBServlet.java:60)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
App [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
App [err] at [internal classes]
App [err] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
App [err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
App [err] at java.lang.Thread.run(Unknown Source)
这并不表示安全网关问题。查看其他人较早遇到的错误实例,要么是
过时的连接问题
https://developer.ibm.com/answers/questions/10120/what-could-cause-a-connection-refused-to-sqldb-db2-after-some-time.html 或
防火墙问题或网络问题,如
DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
I am getting " Operation timed out. ERRORCODE=-4499, SQLSTATE=08001" connecting to remote DB2