Consultor Eletrônico



Kbase P127408: sqlexp connection fails with port out of range error 8933
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/17/2008
Status: Unverified

SYMPTOM(s):

sqlexp connection fails with port out of range error 8933

[DataDirect][OpenEdge JDBC Driver]Error establishing socket to host and port: <hostname>:240981. Reason: port out of range:240981. (8933)

database is started with service name

client connections use service name

Can connection 4GL client server using service name

Cannot connect SQL clients using service name

FACT(s) (Environment):

OpenEdge 10.1x
All Supported Operating Systems

CAUSE:

Overflow condition in port number associated with the service name. The port number assigned to the service name in the services file are greater than the RPC standard maximum allowed: 65536

FIX:

Audit the /etc/services file for all service names using the ipv4 protocol that exceed the maximum value 65536. Then restart all databases using these service names in their -S startup parameter.

Workaround:

Find the overflow port number the database is listening on and use this in the connection string instead of the service name. There are a number of ways to achieve this, examples are listed below.

Method#1:

promon dbname
R&D
1. Status Displays ...
3. Servers

The Login broker entry will show both the PID and specifically the Port Number actually used for this service.

Example:
Sv Pend. Cur. Max. Port
No Pid Type Protocol Logins Users Users Users Num
0 717022 Login TCP 0 0 0 5 44373

Method#2: Calculate

a. Find the port number assigned to the service name in /etc/services
bad_port 240981/tcp

b. Subtract the maximum port value 65536 from the port number
240981 - 65536 = 175445

c. Convert the result to HEX
175445 = 002 AD55

d. Take the last 2 bytes and convert these back to DEC
AD55 = 44373

Method#3: Operating system specific utilities

UNIX, lsof utility with the -P parameter to list port numbers not names:

lsof -p 717022 -P
# -P no port names

will show the port number for service name:
_mprosrv 717022 root 32u IPv4 0xf10002000318b398 0t0 TCP *:9105 (LISTEN)

Windows, TCPView