Topic
  • 5 replies
  • Latest Post - ‏2006-11-24T05:41:16Z by SystemAdmin
SystemAdmin
SystemAdmin
17917 Posts

Pinned topic db2 connection hangs tcpip

‏2006-11-22T15:53:08Z |
I have 2 windows machines with Db2 v8.1.12.99 enterprise server installed. One of these machines has also CM installed and I want to be able to access CM box (server, Windows 2003) from the other box (client, Win XP Pro).

So I catalog node and database on the client machine. I can connect to database and disconnect. So far so good. However I cannot issue any statement such as "select" or "describe table". The request just does not return and hangs tcpip until I kill corresponding db2bp.exe process on client.

What it means "hangs tcpip": I cannot run any windows cmd related to network such as "netstat". It will do nothing until I disconnect or (in case I sent a request such as "select" I have no option to disconnect anymore) until I kill the db2 console. I also cannot access server over http. It just hangs until I disconnect from db2.

Moreover I cannot connect from second console neither using the same or other username. The request will time out and I'll get the connection error.

Any ideas how to proceed? If I run on client my code that uses CM Java API the result is similar -- I can connect successfully, but as soon as I try to execute query to obtain some data, the request fails.

I tried this over a pair of different network adapters with the same results. It looks it's db2 related.

The same operations from the same username work nicely when executed from console on server machine.
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2 connection hangs tcpip

    ‏2006-11-22T17:31:29Z  
    nkalnberzins@bluewin.ch wrote:
    > I have 2 windows machines with Db2 v8.1.12.99 enterprise server installed. One of these machines has also CM installed and I want to be able to access CM box (server, Windows 2003) from the other box (client, Win XP Pro).
    >
    > So I catalog node and database on the client machine. I can connect to database and disconnect. So far so good. However I cannot issue any statement such as "select" or "describe table". The request just does not return and hangs tcpip until I kill corresponding db2bp.exe process on client.
    >
    > What it means "hangs tcpip": I cannot run any windows cmd related to network such as "netstat". It will do nothing until I disconnect or (in case I sent a request such as "select" I have no option to disconnect anymore) until I kill the db2 console. I also cannot access server over http. It just hangs until I disconnect from db2.
    >
    > Moreover I cannot connect from second console neither using the same or other username. The request will time out and I'll get the connection error.
    >
    > Any ideas how to proceed? If I run on client my code that uses CM Java API the result is similar -- I can connect successfully, but as soon as I try to execute query to obtain some data, the request fails.
    >
    > I tried this over a pair of different network adapters with the same results. It looks it's db2 related.
    >
    > The same operations from the same username work nicely when executed from console on server machine.
    >
    Have you followed the instructions on setting up a DB2 client in the
    documentation (Quick Beginnings For DB2 Clients and Installation and
    Configuration Supplement)?

    Larry Edelstein
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2 connection hangs tcpip

    ‏2006-11-22T18:32:39Z  
    nkalnberzins@bluewin.ch wrote:
    > I have 2 windows machines with Db2 v8.1.12.99 enterprise server installed. One of these machines has also CM installed and I want to be able to access CM box (server, Windows 2003) from the other box (client, Win XP Pro).
    >
    > So I catalog node and database on the client machine. I can connect to database and disconnect. So far so good. However I cannot issue any statement such as "select" or "describe table". The request just does not return and hangs tcpip until I kill corresponding db2bp.exe process on client.
    >
    > What it means "hangs tcpip": I cannot run any windows cmd related to network such as "netstat". It will do nothing until I disconnect or (in case I sent a request such as "select" I have no option to disconnect anymore) until I kill the db2 console. I also cannot access server over http. It just hangs until I disconnect from db2.
    >
    > Moreover I cannot connect from second console neither using the same or other username. The request will time out and I'll get the connection error.
    >
    > Any ideas how to proceed? If I run on client my code that uses CM Java API the result is similar -- I can connect successfully, but as soon as I try to execute query to obtain some data, the request fails.
    >
    > I tried this over a pair of different network adapters with the same results. It looks it's db2 related.
    >
    > The same operations from the same username work nicely when executed from console on server machine.
    >
    Have you followed the instructions on setting up a DB2 client in the
    documentation (Quick Beginnings For DB2 Clients and Installation and
    Configuration Supplement)?

    Larry Edelstein
    > Have you followed the instructions on setting up a
    > DB2 client in the
    > documentation (Quick Beginnings For DB2 Clients and
    > Installation and
    > Configuration Supplement)?
    >
    > Larry Edelstein

    Hm, as I mentioned they are both server installations. Initially used separately, though both are development machines itself, and AFAIK were not accessed over the network. I got Win 2003 pre-installed and myself upgraded Win XP machine to the same Db2 level.

    I did not work with the document "Quick Beginnings For DB2 Clients and Installation and Configuration Supplement" for v8, but I followed steps regarding setting up client connection in online documentation -- cataloging etc. And looked at available troubleshooting info that do not seem to solve my problem. In fact I now looked through this doc, but I failed to remark any particular steps that I could have missed.

    I tried to use both manual and CA methods to create remote instance, node & db. With the same results.

    If I do the same procedure other way around, i.e. set up Win 2003 server to access db on Win XP box, it works better, although sometimes it also hangs -- still the hanging one is the Win 2003 box that in this case works as a client.

    Do you have something special in mind that I could have missed?
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2 connection hangs tcpip

    ‏2006-11-22T21:32:13Z  
    > Have you followed the instructions on setting up a
    > DB2 client in the
    > documentation (Quick Beginnings For DB2 Clients and
    > Installation and
    > Configuration Supplement)?
    >
    > Larry Edelstein

    Hm, as I mentioned they are both server installations. Initially used separately, though both are development machines itself, and AFAIK were not accessed over the network. I got Win 2003 pre-installed and myself upgraded Win XP machine to the same Db2 level.

    I did not work with the document "Quick Beginnings For DB2 Clients and Installation and Configuration Supplement" for v8, but I followed steps regarding setting up client connection in online documentation -- cataloging etc. And looked at available troubleshooting info that do not seem to solve my problem. In fact I now looked through this doc, but I failed to remark any particular steps that I could have missed.

    I tried to use both manual and CA methods to create remote instance, node & db. With the same results.

    If I do the same procedure other way around, i.e. set up Win 2003 server to access db on Win XP box, it works better, although sometimes it also hangs -- still the hanging one is the Win 2003 box that in this case works as a client.

    Do you have something special in mind that I could have missed?
    nkalnberzins@bluewin.ch wrote:

    >>Have you followed the instructions on setting up a
    >>DB2 client in the
    >>documentation (Quick Beginnings For DB2 Clients and
    >>Installation and
    >>Configuration Supplement)?
    >>
    >>Larry Edelstein
    >
    >
    > Hm, as I mentioned they are both server installations. Initially used separately, though both are development machines itself, and AFAIK were not accessed over the network. I got Win 2003 pre-installed and myself upgraded Win XP machine to the same Db2 level.
    >
    > I did not work with the document "Quick Beginnings For DB2 Clients and Installation and Configuration Supplement" for v8, but I followed steps regarding setting up client connection in online documentation -- cataloging etc. And looked at available troubleshooting info that do not seem to solve my problem. In fact I now looked through this doc, but I failed to remark any particular steps that I could have missed.
    >
    > I tried to use both manual and CA methods to create remote instance, node & db. With the same results.
    >
    > If I do the same procedure other way around, i.e. set up Win 2003 server to access db on Win XP box, it works better, although sometimes it also hangs -- still the hanging one is the Win 2003 box that in this case works as a client.
    >
    > Do you have something special in mind that I could have missed?
    >
    First, in essence ... if you are connecting from one server to a 2nd,
    the server issuing the connection is acting as a client. So you really
    are using a client.

    Secondly, although I don't remember all of the steps, there are things
    like environment variables (e.g. DB2COMM) and DB2 dbm cfg parms (the
    SVCENAME) that have to be set in a coordinated fashion. I would have
    expected that if you tried the CA, all of this would have been taken
    care of.

    When you attempt a connection and/or the connection hangs, what appears
    at those exact times in the db2diag.log ... both on the client and
    server sides? Any msgs that might provide any insight?

    If everything on the db side has been set up properly, you may have to
    have your network admin take a TCP/IP trace. The other possibility would
    be interference from a firewall possibly?

    Larry Edelstein
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2 connection hangs tcpip

    ‏2006-11-23T13:32:53Z  
    nkalnberzins@bluewin.ch wrote:

    >>Have you followed the instructions on setting up a
    >>DB2 client in the
    >>documentation (Quick Beginnings For DB2 Clients and
    >>Installation and
    >>Configuration Supplement)?
    >>
    >>Larry Edelstein
    >
    >
    > Hm, as I mentioned they are both server installations. Initially used separately, though both are development machines itself, and AFAIK were not accessed over the network. I got Win 2003 pre-installed and myself upgraded Win XP machine to the same Db2 level.
    >
    > I did not work with the document "Quick Beginnings For DB2 Clients and Installation and Configuration Supplement" for v8, but I followed steps regarding setting up client connection in online documentation -- cataloging etc. And looked at available troubleshooting info that do not seem to solve my problem. In fact I now looked through this doc, but I failed to remark any particular steps that I could have missed.
    >
    > I tried to use both manual and CA methods to create remote instance, node & db. With the same results.
    >
    > If I do the same procedure other way around, i.e. set up Win 2003 server to access db on Win XP box, it works better, although sometimes it also hangs -- still the hanging one is the Win 2003 box that in this case works as a client.
    >
    > Do you have something special in mind that I could have missed?
    >
    First, in essence ... if you are connecting from one server to a 2nd,
    the server issuing the connection is acting as a client. So you really
    are using a client.

    Secondly, although I don't remember all of the steps, there are things
    like environment variables (e.g. DB2COMM) and DB2 dbm cfg parms (the
    SVCENAME) that have to be set in a coordinated fashion. I would have
    expected that if you tried the CA, all of this would have been taken
    care of.

    When you attempt a connection and/or the connection hangs, what appears
    at those exact times in the db2diag.log ... both on the client and
    server sides? Any msgs that might provide any insight?

    If everything on the db side has been set up properly, you may have to
    have your network admin take a TCP/IP trace. The other possibility would
    be interference from a firewall possibly?

    Larry Edelstein
    > When you attempt a connection and/or the connection hangs, what appears at those exact times in the db2diag.log ... both on the client and server sides? Any msgs that might provide any insight?
    >
    > If everything on the db side has been set up properly, you may have to have your network admin take a TCP/IP trace. The other possibility would be interference from a firewall possibly?
    >
    > Larry Edelstein

    After some fiddling around -- I do not get hangs anymore -- I disabled a bunch of apps, amazingly I think this was Gadwin Print Screen that somehow interacted with something(?) In fact the hang was rather strange -- not only I could not connect to the server anymore, I also could not even launch any application. Everything waited until I sorted out the mess. And way to sort it out was to unplug the network cable... other way was to kill the remote process that connected (or tried to connect) to db2 server.

    Now however I'm stuck on step 2 as it looks like I can establish only one remote connection. As soon as I need another connection to the same service it fails. I'm not sure if this works as designed. I suspect it is linked to previous problems though.

    In any case if I open 2 consoles i can connect only from one. If I run "connect" from the other console it waits until I disconnect from the first one or it times out.

    Is there a way to restrict remote connections? And/or to modify this setting?

    I'm not sure if I really need 2 connections, but I cannot explain otherwise that my CM code returns an error not during connection (it works fine), but subsequently when it tries to query data. At least it's always "Communication function detecting the error: "connect". Protocol specific error code(s): "10060", "", "". SQLSTATE=08001"; so for me it looks as it internally tries to create a second connection to define a transaction or something like that.

    And the same code runs fine when executed directly on server.

    Also a bit strange is that once I defined connection over one port (say 60000) I cannot subsequently remove the definitions and connect on another port say (50000 or 60001); I have defined DB2COMM=TCPIP and DB2PORTRANGE=60000:60003, AND made sure there are services in "services" file for these ports on server. The CA allows to provide another service name and even "retrieves" the corresponding port number, but connection always fails...

    As for the db2diag.log ; there is nothing on the client and only these entries on server:
    2006-11-23-11.58.07.648000+060 I110623H389 LEVEL: Error
    PID : 1288 TID : 764
    FUNCTION: DB2 Tools, DB2 administration server, MDUtility::connectMD, probe:10
    DATA #1 : Sint32, 4 bytes
    1
    DATA #2 : Sint32, 4 bytes
    -443
    DATA #3 : Sint32, 4 bytes
    38553
    DATA #4 : String, 7 bytes
    TOOLSDB
    DATA #5 : String, 8 bytes
    SYSTOOLS
    DATA #6 : String, 4 bytes
    NULL

    They do not match the problem situations and if I stop the admin server they do not show up anymore. So I do not think they are related...
  • SystemAdmin
    SystemAdmin
    17917 Posts

    Re: db2 connection hangs tcpip

    ‏2006-11-24T05:41:16Z  
    > When you attempt a connection and/or the connection hangs, what appears at those exact times in the db2diag.log ... both on the client and server sides? Any msgs that might provide any insight?
    >
    > If everything on the db side has been set up properly, you may have to have your network admin take a TCP/IP trace. The other possibility would be interference from a firewall possibly?
    >
    > Larry Edelstein

    After some fiddling around -- I do not get hangs anymore -- I disabled a bunch of apps, amazingly I think this was Gadwin Print Screen that somehow interacted with something(?) In fact the hang was rather strange -- not only I could not connect to the server anymore, I also could not even launch any application. Everything waited until I sorted out the mess. And way to sort it out was to unplug the network cable... other way was to kill the remote process that connected (or tried to connect) to db2 server.

    Now however I'm stuck on step 2 as it looks like I can establish only one remote connection. As soon as I need another connection to the same service it fails. I'm not sure if this works as designed. I suspect it is linked to previous problems though.

    In any case if I open 2 consoles i can connect only from one. If I run "connect" from the other console it waits until I disconnect from the first one or it times out.

    Is there a way to restrict remote connections? And/or to modify this setting?

    I'm not sure if I really need 2 connections, but I cannot explain otherwise that my CM code returns an error not during connection (it works fine), but subsequently when it tries to query data. At least it's always "Communication function detecting the error: "connect". Protocol specific error code(s): "10060", "", "". SQLSTATE=08001"; so for me it looks as it internally tries to create a second connection to define a transaction or something like that.

    And the same code runs fine when executed directly on server.

    Also a bit strange is that once I defined connection over one port (say 60000) I cannot subsequently remove the definitions and connect on another port say (50000 or 60001); I have defined DB2COMM=TCPIP and DB2PORTRANGE=60000:60003, AND made sure there are services in "services" file for these ports on server. The CA allows to provide another service name and even "retrieves" the corresponding port number, but connection always fails...

    As for the db2diag.log ; there is nothing on the client and only these entries on server:
    2006-11-23-11.58.07.648000+060 I110623H389 LEVEL: Error
    PID : 1288 TID : 764
    FUNCTION: DB2 Tools, DB2 administration server, MDUtility::connectMD, probe:10
    DATA #1 : Sint32, 4 bytes
    1
    DATA #2 : Sint32, 4 bytes
    -443
    DATA #3 : Sint32, 4 bytes
    38553
    DATA #4 : String, 7 bytes
    TOOLSDB
    DATA #5 : String, 8 bytes
    SYSTOOLS
    DATA #6 : String, 4 bytes
    NULL

    They do not match the problem situations and if I stop the admin server they do not show up anymore. So I do not think they are related...
    nkalnberzins@bluewin.ch wrote:

    >>When you attempt a connection and/or the connection hangs, what appears at those exact times in the db2diag.log ... both on the client and server sides? Any msgs that might provide any insight?
    >>
    >>If everything on the db side has been set up properly, you may have to have your network admin take a TCP/IP trace. The other possibility would be interference from a firewall possibly?
    >>
    >>Larry Edelstein
    >
    >
    > After some fiddling around -- I do not get hangs anymore -- I disabled a bunch of apps, amazingly I think this was Gadwin Print Screen that somehow interacted with something(?) In fact the hang was rather strange -- not only I could not connect to the server anymore, I also could not even launch any application. Everything waited until I sorted out the mess. And way to sort it out was to unplug the network cable... other way was to kill the remote process that connected (or tried to connect) to db2 server.
    >
    > Now however I'm stuck on step 2 as it looks like I can establish only one remote connection. As soon as I need another connection to the same service it fails. I'm not sure if this works as designed. I suspect it is linked to previous problems though.
    >
    > In any case if I open 2 consoles i can connect only from one. If I run "connect" from the other console it waits until I disconnect from the first one or it times out.
    >
    > Is there a way to restrict remote connections? And/or to modify this setting?
    >
    > I'm not sure if I really need 2 connections, but I cannot explain otherwise that my CM code returns an error not during connection (it works fine), but subsequently when it tries to query data. At least it's always "Communication function detecting the error: "connect". Protocol specific error code(s): "10060", "", "". SQLSTATE=08001"; so for me it looks as it internally tries to create a second connection to define a transaction or something like that.
    >
    > And the same code runs fine when executed directly on server.
    >
    > Also a bit strange is that once I defined connection over one port (say 60000) I cannot subsequently remove the definitions and connect on another port say (50000 or 60001); I have defined DB2COMM=TCPIP and DB2PORTRANGE=60000:60003, AND made sure there are services in "services" file for these ports on server. The CA allows to provide another service name and even "retrieves" the corresponding port number, but connection always fails...
    >
    > As for the db2diag.log ; there is nothing on the client and only these entries on server:
    > 2006-11-23-11.58.07.648000+060 I110623H389 LEVEL: Error
    > PID : 1288 TID : 764
    > FUNCTION: DB2 Tools, DB2 administration server, MDUtility::connectMD, probe:10
    > DATA #1 : Sint32, 4 bytes
    > 1
    > DATA #2 : Sint32, 4 bytes
    > -443
    > DATA #3 : Sint32, 4 bytes
    > 38553
    > DATA #4 : String, 7 bytes
    > TOOLSDB
    > DATA #5 : String, 8 bytes
    > SYSTOOLS
    > DATA #6 : String, 4 bytes
    > NULL
    >
    > They do not match the problem situations and if I stop the admin server they do not show up anymore. So I do not think they are related...
    At this point, I'd recommend a PMR with IBM support.

    Larry Edelstein