db2 hangs when connecting with jdbc

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Heiko W. Rupp

    db2 hangs when connecting with jdbc

    Hi,

    I am a newbie to db2, but the local experts can't help me ..

    I have a db2 v8.1 on linux with a db 'foo' and a listener for
    foo on port 50001. The listener appears in netstat -an, waiting
    for connections.

    Now when I connect with the COM.ibm.db2.jdb c.net.DB2Driver
    I see the connection in netstat, but the connection hangs
    forever.

    db2jstrt has been issued.

    Any ideas?

    Thanks in advance an happy x-mas

    Heiko

    --
    Heiko W. Rupp hwr@pilhuhn.de hwr@netbsd.org
    See http://www.netbsd.org/ for a c001 OS :)
    http://mcntp.sf.net/ -- Multicast Netnews Distribution.
    http://www.jboss.org/ -- The application server

  • Ian

    #2
    Re: db2 hangs when connecting with jdbc

    Heiko W. Rupp wrote:
    [color=blue]
    > Hi,
    >
    > I am a newbie to db2, but the local experts can't help me ..
    >
    > I have a db2 v8.1 on linux with a db 'foo' and a listener for
    > foo on port 50001. The listener appears in netstat -an, waiting
    > for connections.
    >
    > Now when I connect with the COM.ibm.db2.jdb c.net.DB2Driver
    > I see the connection in netstat, but the connection hangs
    > forever.
    >
    > db2jstrt has been issued.[/color]

    Since you're using the Type 3 (net) JDBC driver, are you trying
    to connect to the instance listener (port 50001), or the JDBC
    listener (probably port 6789, but it might be different if you
    did db2jstrt <port>) ?

    Your connection URL for JDBC should be using the Java listener
    port.


    Good luck,






    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

    Comment

    • Sathyaram

      #3
      Re: db2 hangs when connecting with jdbc

      Heiko,

      The db2 instance listens at port 50001 whereas the db2 applet server
      (started using db2jstrt) listens at port 6790, by default ... The
      instance and applet server are two different processes ....

      Hence, your netdriver port should be 6790 and not 50001 ... If you
      wish to use a different port number for your net driver, you can issue
      db2jstrt <portnum> ...

      BTW, the AFAIK, support for Net Driver will be withdrawn shortly and
      hence it is prudent to 'migrate' your code to use type-2 or type-4
      driver, type-4 being a better choice

      HTH

      Sathyaram


      "Heiko W. Rupp" <hwr@pilhuhn.de > wrote in message news:<bsbrlg$bv kn7$1@ID-120258.news.uni-berlin.de>...[color=blue]
      > Hi,
      >
      > I am a newbie to db2, but the local experts can't help me ..
      >
      > I have a db2 v8.1 on linux with a db 'foo' and a listener for
      > foo on port 50001. The listener appears in netstat -an, waiting
      > for connections.
      >
      > Now when I connect with the COM.ibm.db2.jdb c.net.DB2Driver
      > I see the connection in netstat, but the connection hangs
      > forever.
      >
      > db2jstrt has been issued.
      >
      > Any ideas?
      >
      > Thanks in advance an happy x-mas
      >
      > Heiko[/color]

      Comment

      • Heiko W. Rupp

        #4
        Re: db2 hangs when connecting with jdbc

        Ian wrote:[color=blue]
        > Since you're using the Type 3 (net) JDBC driver, are you trying
        > to connect to the instance listener (port 50001), or the JDBC
        > listener (probably port 6789, but it might be different if you[/color]

        This did help. Thank you very much.

        --
        Heiko W. Rupp hwr@pilhuhn.de hwr@netbsd.org
        See http://www.netbsd.org/ for a c001 OS :)
        http://mcntp.sf.net/ -- Multicast Netnews Distribution.
        http://www.jboss.org/ -- The application server

        Comment

        Working...