If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 on Port number 70000?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-31-06, 06:49
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
DB2 on Port number 70000?

Hi

My client connected the DB2 on port number 70000 using JDBC and got port out of range error. My client confirmed that the DB2 is running in port number 70000.

I checked with my DB2 (on Windows) installation, it used the default port 50000 and it did not allowed me to change the port number to 70000 (or any number greater than 65534).
(I tried this using DB2Control Centre)

I dont know the OS of my client, is it possible to run DB2 on port number 70000 in any OS? If so is it possible to connect using JDBC.

Thanks in advance,
Sn

Last edited by Shefu; 05-31-06 at 07:25.
Reply With Quote
  #2 (permalink)  
Old 05-31-06, 07:42
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
according to my knowleage a valid TCP port number is in the range of 0 to 65534. The default DB2 port on Linux/Unix/Windows is 50000.

On Windows to check a DB2 port number execute command:
db2 get dbm cfg | find "SVCENAME"

The above command will return the servise name then check the file:
C:\WINDOWS\system32\drivers\etc\services

and search the result of above command.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 05-31-06, 08:46
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Hi ,

Thanks for the reply Grofaty,

My error scenario is as follows,

My application connects to DB2 using JDBC, and the connection parameters are obtained from the user. My Client has DB2 Server running on port number 70000,
On trying to connect to DB2 with the parameters following errors are thrown,
Code:
JDBC URL: jdbc:db2://test-server :70000/test_db
Source driver data: DriverName: DB2 - Universal JDBC Driver - Type 4	DriverClasses: [com.ibm.db2.jcc.DB2Driver]	URLs: [jdbc:db2://test_server :70000/test_db]	CLASSPATH: [C:\jdbc\db2jcc.jar, C:\jdbc\db2-license-cu.jar, C:\Program Files\IBM\SQLLIB\java\db2jcc.jar]	Users: [testdemo]

Exception while connecting to source database: java.lang.IllegalArgumentException: port out of range:70000
Could you help me to identify the mistake i am doing here..

Sn
Reply With Quote
  #4 (permalink)  
Old 05-31-06, 10:25
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Arrow Maybe

Try specifying the default port in your connect statement

i.e. :50000
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #5 (permalink)  
Old 06-01-06, 04:12
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Tried with the default port number too.. it throws some error.
Reply With Quote
  #6 (permalink)  
Old 06-01-06, 14:40
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
TCP port is indicated by a 16-bit value and therefore cannot be more than 65534. Although you can specify port 70000 in the instance configuration and try to initiate a connection, the network will not allow you to connect.

I guess you should tell the client's DBA that he (or she) needs to change the port to something that makes sense. I'm sure 70000 is a cool number but it just won't work.
Reply With Quote
  #7 (permalink)  
Old 05-08-08, 12:01
coreyfrankel coreyfrankel is offline
Registered User
 
Join Date: Aug 2005
Posts: 1
Thumbs down We use ports higher than 70000 in AIX DB2 v8 and v9

We use ports higher than 70000 on two DBs in our DW AIX environment.
The reason I saw this was that a DBA got the same out of range error using the cofiguration assistant. Using coomand line there is no problem. We have abinitio, sas, microstrategy and quest connecting no problem. This may be a Java error but it deserves investigation.

This is the catalog node statement we actually use. Our network people want us to use 4-digit range ports as they beleive they are safer, though.

catalog tcpip node edwdb2 remote EDW111 server 71012 remote_instance edwdb2 system EDW111 ostype AIX;
Reply With Quote
  #8 (permalink)  
Old 05-08-08, 12:59
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'd be curious to see the output of netstat -a on the server, along with the relevant entries from /etc/services...

We'll probably see that it is actually running on port 5477 (71012 - 65535).

Last edited by n_i; 05-08-08 at 14:27.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On