dbTalk Databases Forums  

DB2 client connection setup hesitation

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss DB2 client connection setup hesitation in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Willem Fischer
 
Posts: n/a

Default Re: DB2 client connection setup hesitation - 11-13-2010 , 07:17 AM






On Nov 11, 11:08*pm, Troels Arvin <tro... (AT) arvin (DOT) dk> wrote:
Quote:
Hello,

Setup:
Latest 64-bit Windows client on Windows Server 2008 connecting to a DB2
9.7 server (running on Linux) with latest fixpack. The database being
connected to is activated.

When using the client, connnection setup takes more than 50 seconds.
Sniffing on the network with Wireshark reveals that no outgoing packets
are seen during the first 20 seconds. So, for some reason, the DB2 client
"hesitates" for a rather long while before even trying to connect.

I tried temporarily closing the DB2 server and set up netcat to listen on
port 50000 instead. I then ran netcat in client mode on the Windows-box.
Data were immediately tranferred.

Name resolving doesn't /seem/ to be the culprit: The netcat client has no
trouble quickly initiating a connection. And even if I catalog the DB2
node with IP address instead of a DNS name, the problem prevails.

Why might the DB2 client waiting? Can the client be set in some kind of
debug mode where it tells me what it's doing?

--
Troels
To add to this discussion, I combat similar problems with db2set
DB2_GRP_LOOKUP=local on the client. I heard that creating a local user
with the same id as your network user also helps.

Reply With Quote
  #12  
Old   
Mark A
 
Posts: n/a

Default Re: DB2 client connection setup hesitation - 11-13-2010 , 07:22 AM






"Helmut Tessarek" <tessarek (AT) evermeet (DOT) cx> wrote

Quote:
Ok, if you are not worried about people sniffining within your network,
you
won't need any encryption. I just want to point out that it is a matter of
about 90 seconds to find out your user/pwd. If I get access to the
instance
user...
Do you mean if you get access to instance owner? If that happens, then you
can do anything you want anyway.

Quote:
Anyway, you are probably right. I'm usually not too concerned about
security
within my own network as well, but depending on the system, I would
probably
change my mind.
But just to make a stand, I am using either DATA_ENCRYPT or SSL, when I'm
connecting between WAN's or over the Internet.
All of our sensitive data is encrypted by the application before it even
gets to the database. All connections to our databases occur only from app
servers inside our production firewall. Only instance owner and root can ssh
to the database servers.

Maybe I should be more concerned, but I am also concerned (paranoid) about
performance and high availability. Anyway, I am not claiming to be right (at
least this time) but a little nervous about changing anything.

I tried the new "restrictive" feature when creating a database, and that is
ridiculous since it does not even allow execute on system packages required
to run basic SQL commands. I also got burned (big time) when revoking all
public access to workload manager authority, since access is needed even if
one not even licensed to use workload manager.

Reply With Quote
  #13  
Old   
asierra01
 
Posts: n/a

Default Re: DB2 client connection setup hesitation - 11-14-2010 , 09:04 PM



If you still have this problem , let me know. It just happens I was
trying to play with db2 to allow database users.
I found this sample http://www.ibm.com/developerworks/da.../dm-0512chong/
so I downloaded it and compiled it
64 bit windows. Created the txtserver64.dll and it works, I can
connect to a database and do my own authentication.

DONT DO THIS on a production db2 !

So, what this has to do with your problem, you can compile this code
yourself ( I can send you the VS2005 project+sln ), activate this by

1-
Copy the generated txtserver64.dll to C:\Program Files\IBM\SQLLIB
\security\plugin\IBM\server\txtserver64.dll

2-
db2 update dbm cfg using srvcon_auth server srvcon_pw_plugin
txtserver


and LOG to C:\ProgramData\IBM\DB2\DB2COPY1\DB2\db2diag.log
the code even can use DB2 log facilities
EVERY TIME someone connect to a database and see what are the time
diif, this 50 sec doesn't make any sense.

-->

(logMessage_Fn)(DB2SEC_LOG_WARNING,
"db2secGroupPluginInit successful",
strlen("db2secGroupPluginInit successful"));

-->

(logMessage_Fn)(DB2SEC_LOG_WARNING,
"someone is logging now",
strlen("someone is logging now"));

I was reading my db2diag.log and found this trace with time and
everything, 2010-11-14-21.33.18.493000-300
This can give you an idea of the 50 sec.

2010-11-14-21.33.18.493000-300 I1571584F366 LEVEL: Info
PID : 6716 TID : 5104 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000
EDUID : 5104 EDUNAME: db2sysc 0
FUNCTION: DB2 UDB, bsu security, sqlexLogPluginMessage, probe:20
DATA #1 : String with size, 32 bytes
db2secGroupPluginInit successful
----
----
at some point I will tweak this security plugin to allow, just like
postgres or mysql, connect as a database user ( md5 encrypted
password)
and not as an OS user. Create a database with a user table just for
that purpuse and connect to it using the db2 cli interface, to verify/
authenticate database users.

---
---
I am impress with db2, but still I need to put it under some test.

Reply With Quote
  #14  
Old   
Troels Arvin
 
Posts: n/a

Default Re: DB2 client connection setup hesitation - 01-19-2011 , 08:23 AM



Hello,

On Nov 12, 2010, I wrote (in response to Mark A):
Quote:
Are you cataloguing databases with authentication server?

No: I had cataloged it without specifying authentication (as I usually
do on unix/linux clients).

Setting it explicitly to SERVER made the problem go away (there are some
old clients which also need to connect to the server, so I think I
cannot improve to SERVER_ENCRYPT). Connections are now instantaneous.
It seems I'm not the only one being hit by this. So to make things clear
for others which google themselves to this thread:

When you have cataloged the database, in DB2 Control Center, right-click
on it and choose "Change". Then, in the resulting "Change Database -
<dbname>" dialog box, adjust the value of the "Type" drop-down widget -
most likely from "Value in server's DBM configuration" to "SERVER
ENCRYPT".

See
http://troels.arvin.dk/misc/db2/chan...atalogization/
for screenshots.

--
Troels

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.