Feedback
Did this article resolve your question/issue?

   

Article

DataDirect What does a "socket closed" error mean with an ODBC driver?

« Go Back

Information

 
TitleDataDirect What does a "socket closed" error mean with an ODBC driver?
URL Namewhat-does-a-socket-closed-error-mean-with-a-connect-for-odbc-driver
Article Number000177765
EnvironmentProduct : Connect/Connect64 for ODBC, Progress DataDirect for ODBC
Version : All supported versions
OS : All supported platforms
Database : All supported databases
Application : All supported applications
Question/Problem Description
What does a "socket closed" error mean with a Connect for ODBC driver?
Steps to Reproduce
Clarifying Information
Error Message[DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Socket closed
[DataDirect][ODBC DB2 Wire Protocol driver]Socket closed
Defect Number
Enhancement Number
Cause
Resolution
A "socket closed" error means that the connection has been terminated, however, no specific reason was provided/returned.
The "socket closed" error indicates that the connection was lost outside of the control or awareness of the Driver.

There can be a number of reasons for that, for example:
  • network failure
  • firewall timeout
  • the database unexpectedly terminated the connection
  • account permissions
To determine the exact cause additional information are needed :

A.  An ODBC Trace is needed to see on what ODBC call the 'Socket closed' has been returned.

Trace=1 [Start the trace]
TraceOptions=3 [Thread identification and timestamps information is also present]
ODBCTraceFlush=1 [Helps to write all the content into the file]

For additional information refer to Article: B. Use Snoop, a Java-based utility used to log network packets between a database and driver:

Download Snoop: https://www.progress.com/support/evaluation/download-resources/download-tools  

1.Copy Snoop.class into any location. 

2. Edit the odbc.ini file by creating a DSN for the required database.
Provide 'localhost'/hostname of the machine where the snoop is hosted as HostName and any port number that is not used as PortNumber(9999). 

3.Execute:
java Snoop <DB server_name> <DB port number> -snoopPort <any unused port on your machine>
[The port number should be the same one configured as the portNumber in the odbc.ini file above ] 

Example:
java Snoop 172.22.33.444 3306 -snoopPort 9999 -showTimestamps true -showReadableTimestamps true 

4. Run the application that connects to the database, until the issue is reproduced. 

5. The snoop logs will be in the snoop directory, where snoop class resides.

Example:
0.out,
1.out, 

For additional information refer to Article:
C. Additional tracing of the network may be necessary to determine the cause of connection loss.

3rd party Network Analyzer packages like WireShark could be used to obtain this information.  WireShark can be obtained from: http://www.wireshark.org/.

D. Check to see if database is SSL enabled or not, if database is SSL enabled make sure required SSL connection options are set.

For additional information refer to Article:
Workaround
Notes
Last Modified Date2/25/2021 7:42 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.