Unable to connect DB2 Zos with bluemix using cloud integaration

387 views Asked by At

We used cloud integration to connect to mainframe DB2 in bluemix, downloaded the secure connector in a Linux OS and configured it with DB2 jars. The status in the BlueMix got changed to "connected" ,but we were unable to proceed further to create an API with the DB2 IP's as endpoints as we are getting an error "Database could be connected and please check your secure connection".But we have checked our secure connection in the terminal which is always in start mode. Could you please provide help on the same.

2

There are 2 answers

0
Bimal Jha On

Are you able to connect to z/OS server without secure connector; using other client?

You can use DB2Jcc - IBM Data Server Driver for JDBC and SQLJ diagnostic utility to test database connectivity and validate DB2 authentication using Java. A sample command and it's output is shown as below:

$ java com.ibm.db2.jcc.DB2Jcc -url jdbc:db2://myhost.ibm.com:446/MYDB -user myuserid -password mydbpasswd

[jcc][10521][13706]Command : java com.ibm.db2.jcc.DB2Jcc -url jdbc:db2://myhost.ibm.com:446/MYDB -user myuserid -password ********

[jcc][10516][13709]Test Connection Successful.

DB product version = DSN11015
DB product name = DB2
DB URL = jdbc:db2://myhost.ibm.com:446/MYDB
DB Drivername = IBM Data Server Driver for JDBC and SQLJ
DB OS Name = Linux
$

If you have access to db2cli executable (sqllib/bin/db2cli), you can run below command to test connectivity and rule out any server side configuration issue:

db2cli validate -database dbname:host_name or ip:port_number -connect -user userid -passwd password

example:

$ db2cli validate -database sample:bimaljha.in.ibm.com:446 -connect -user myuserid -passwd mypasswd
......
===============================================================================
Connection attempt for database "sample:bimaljha.in.ibm.com:446":
===============================================================================

[SUCCESS]

===============================================================================
The validation is completed.
===============================================================================


$

If DB2Jcc or db2cli commands works fine, then it should be a connector issue in bluemix.

0
Anand On

Apart from what Bimal suggested already(workaround to test connector issue),this issue may be hit due to wrong proxy URL or if proxy is down. I suggest you to check your proxy details.It should work after that !!