08S01: Communication link failure. System call recv() failed with OS error 104 ECONNRESET

When attempting to establish a connection to a remote Oracle TimesTen database using ttIsqlCS on Linux you receive the following error.

[orattadmin@ora1 ~]$ ttisqlcs "DSN=odwinsample;UID=odtest;PWD=password"

Copyright (c) 1996-2009, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.



connect "DSN=odwinsample;UID=odtest;PWD=password";
08S01: Communication link failure. System call recv() failed with OS error 104. ECONNRESET: The connection has been broken during a network send or read operation. Probably the server exited unexpectedly.
S1010: Function sequence error
The command failed.
Done.
[orattadmin@ora1 ~]$ 

A common cause of this problem is the use of a client DSN for the value of TTC_Server_DSN in the ODBC definition when a Server DSN is required. Server DSNs are defined in OTT_HOME/< instance name >/info/sys.odbc.ini on Unix systems. For Windows systems, Server DSNs are defined as DSNs that use the TimesTen Data Manager Driver.

Below are the contents of the odbc.ini.

[ODBC Data Sources]
odwinsample=TimesTen 11.2.1 Client Driver

[odwinsample]
TTC_Server=ttODWIN_logical
TTC_Server_DSN=sampledbCS_1121

In the definition above it can be seen that the DSN odwinsample has sampledbCS_1121 set as the value for TTC_Server_DSN. The odwinsample DSN can be found on the logical server ttODWIN_logical. In the absence of a naming convention how could we tell if ttODWIN_logical is a logic server or an actual server? The easiest way is with a ping of the name. If replies are returned from the ping then TTC_Server is a server, if not it is a logical server.

What we have to verify is that sampledbCS_1121 is Server DSN and in order to do that we need to find the physical server name for the logical server ttODWIN_logical.

The definition of logical servers can be found in the ttconnect.ini file. The location and file can be overridden by the environment variable SYSTTCONNECTINI. If SYSTTCONNECTINI is not set then logical server definitions can be found in OTT_HOME/< instance name >/info/sys.ttconnect.ini. Below is the definition for ttODWIN_logical.

[ttODWIN_logical]
Description=TimesTen Server 11.2.1
Network_Address=odwin
TCP_PORT=53385

Here we see that the server hosting the TimesTen database is odwin. In this example odwin is a Windows server so we will need to use the ODBC Data Source Administrator to verify the driver.

Above we see that sampledbCS_1121 is configured to use the TimesTen Client 11.2.1 driver. The DSN that should have been used is sampled_1121 which is a Server DSN. Modifying the value of TTC_Server_DSN to use sampledb_1121 we should be able to connect to the remote database.

Modified contents of the odbc.ini follow:

[ODBC Data Sources]
odwinsample=TimesTen 11.2.1 Client Driver

[odwinsample]
TTC_Server=ttODWIN_logical
TTC_Server_DSN=sampledbCS_1121

With the correct DSN configured we can now connect to the remote TimesTen database.

[orattadmin@ora1 ~]$ ttisqlcs "DSN=odwinsample;UID=odtest;PWD=password"

Copyright (c) 1996-2009, Oracle.  All rights reserved.
Type ? or "help" for help, type "exit" to quit ttIsql.



connect "DSN=odwinsample;UID=odtest;PWD=password";
Connection successful: DSN=odwinsample;TTC_SERVER=ttODWIN_logical;TTC_SERVER_DSN=sampledb_1121;UID=odtest;DATASTORE=C:\app\oracle\product\TimesTen\TT1121~1\DEMODA~1\sampledb_1121;DATABASECHARACTERSET=WE8MSWIN1252;CONNECTIONCHARACTERSET=US7ASCII;PERMSIZE=40;TEMPSIZE=32;TYPEMODE=0;
(Default setting AutoCommit=1)
Command>

Leave a Reply

Your email address will not be published. Required fields are marked *