Db2

 View Only
  • 1.  DB2 dev on AWS JDBC connection timeout ERRORCODE=-4499, SQLSTATE=08001

    Posted Wed December 18, 2019 10:26 AM
    i have the db2 on AWS marketplace https://aws.amazon.com/marketplace/server/fulfillment?deliveryMethod=6f78a70b-aaea-470e-b778-bfa56d5985f4&productId=6f78a70b-aaea-470e-b778-bfa56d5985f4&region=us-east-1&version=a2f4cbee-0b50-4076-a2af-cda7c7cddf1a&ami=ami-0ae3da3a77e1ca658&ref_=cfg_full_continue working with ssh and have been through all the tutorial materials.  I also followed the document associated with it.  I can telnet and ssh on port 22 from my pc.  telnet to 50000 doesn't connect nor does jdbc connection.  I temporarily opened the security group to all traffic from anywhere and that didn't fix it either but i know it isn't the SG.   Any suggestion on how to get remote JDBC connection to the DB2 database working.

    in the doc they provided command below which i tried but failed to connect

    java -cp db2jcc4.jar com.ibm.db2.jcc.DB2Jcc -url jdbc:db2://ec2-#########.compute-1.amazonaws.com:50000/SAMPLE -user db2inst1 -password #######

    [jcc][10512][13714]Failed to create connection.
    SQLCODE: -4499
    SQLSTATE: 08001
    Message: [jcc][t4][2043][11550][4.26.14] Exception java.net.ConnectException: Error opening socket to server ec2-########-45.compute-1.amazonaws.com/#######.45 on port 50,000 with message: Connection timed out: connect. ERRORCODE=-4499, SQLSTATE=08001​
    i ran netstat an i can see
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 0.0.0.0:50000 0.0.0.0:* LISTEN

    but i don't see it listening on public ip.  appreciate any thoughts

    ------------------------------
    d g
    ------------------------------

    #Db2


  • 2.  RE: DB2 dev on AWS JDBC connection timeout ERRORCODE=-4499, SQLSTATE=08001

    Posted Wed December 18, 2019 10:40 AM
    I was trying to access this via the public ip on the ec2 instance when i got the error.  However i spun up a box in the same vpc and using the local ip of the ec2 instance i was able to connect via jdbc from the other box.   This means the DB2 service is listening on the private ip of the ec2 instance but not the public.    Can the DB2 database listener service listen on both IPs private and public ips of the instance?  if so how can i set that up

    ------------------------------
    d g
    ------------------------------