17.12.10

SAP Note 14034 - SQL error "INF-908: Attempt to connect...failed."

Symptom:

The connection via the network to the database ('remote connect') can (no longer) be established. The following symptoms can occur:

    1. Starting the R/3 System using 'startsap' terminates with the error message:

R3trans test connect to the database failed
Return code: 12

The explicit checking of the connection to the database using 'R3trans -d' terminates with the error message:

2EETW169 no connect possible: "DBMS = INFORMIX --- ...

In the log file of the R3trans you can find entries of the type:

***LOG (BY2): sql error -908 performing CON
***LOG (BY0): INF-908: Attempt to connect to database server
() failed.

    2. The R/3 processes cannot correctly log on to the database. In the R/3 trace files (2.xy: 'dev_db*'; 3.xy: 'dev_w*') you can find entries of the type:

***LOG (BY2): sql error -908 performing CON
***LOG (BY0): INF-908: Attempt to connect to database server
() failed.

Cause and prerequisites


This error occurs if the combinations of IP address and port number used for the communication by application program ('client') and database ('server') do not correspond to each other.
If the client sends a message to a combination of IP address and port number which is not 'received' by the server, then this message remains unanswered, and the client terminates after some time with the symptom described above.

Solution


To solve the problem you must synchronize the selected IP addresses and port numbers of client and server. The selection is made as follows:

    1. Client

Procedure

      a) First the client interprets the environment variables INFORMIXSERVER and INFORMIXSQLHOSTS and scans the file defined by INFORMIXSQLHOSTS for the first line whose first word corresponds to the value of INFORMIXSERVER. The third word of this line is used as hostname, and the fourth word as servicename.
      b) The client scans the file /etc/hosts for the first line whose second word corresponds to the hostname. The first word of the found line is interpreted as IP address of the server.
      c) The client scans the file /etc/services for the first line whose first word corresponds to the servicename. The second word of the found line is then interpreted as port number of the server followed by the log type.
      d) The client now sends its database requests in accordance with the entered log type to the respective port number of the IP address determined.

Example:

      a) Environment variables

...
INFORMIXSERVER = dbhost01c11tcp
INFORMIXSQLHOSTS = /informix/C11/etc/sqlhosts.soc
...

      b) File /informix/C11/etc/sqlhosts.soc:

...
dbhost01c11tcp onsoctcp dbhost01 sapinfC11
...

      c) File /etc/hosts:

...
123.45.67.89 dbhost01
...

      d) File /etc/services:

...
sapinfC11 3800/tcp
...

Now the client sends its database requests via tcp to the port number 3800 of the IP address 123.45.67.89.

Problems:

If one of the errors described under symptoms occurs, then check the following:

      a) The host name must be unique in the file /etc/hosts. Different IP addresses can only be called via different hostnames.
      b) The service name must be unique in the file /etc/services. Different port numbers can only be called via different service names.
    2. Server

Procedure:

      a) During the start the database server reads the values of parameter DBSERVERNAME and DBSERVERALIASES from the configuration file $INFORMIXDIR/etc/$ONCONFIG. With each of these dbservernames it proceeds in the same way as the client with the INFORMIXSERVER (determination of hostname, service name, IP address and port number).
      b) For every pair of port number and IP address determined this way which want to access via a network protocol (for example tcp), the database server starts a listen thread, which checks the network address assigned to it for incoming database requests and therefore makes communication possible.
      With the command 'onstat -g ntt | grep lst' you can check which combinations of port number and IP address are processed by the database server.
      c) Accesses to the database via different network cards can thus be realized via different dbservernames and corresponding entries in $INFORMIXSQLHOSTS.

Example:

      a) File $INFORMIXDIR/etc/$ONCONFIG:

...
DBSERVERNAME dbhost01c11shm
DBSERVERALIASES dbhost01c11tcp,dbhost02c11tcp
...

      b) Environment variables

...
INFORMIXSQLHOSTS = /informix/C11/etc/sqlhosts.soc
...

      c) File /informix/C11/etc/sqlhosts.soc:

...
dbhost01c11shm onipcshm dbhost01 sapinfC11
dbhost01c11tcp onsoctcp dbhost01 sapinfC11
dbhost02c11tcp onsoctcp dbhost02 sapinfC11
...

      d) File /etc/hosts:

...
123.45.67.89 dbhost01
123.45.67.90 dbhost02
...

      e) File /etc/services:

...
sapinfC11 3800/tcp
...

In each case the server starts a listen thread for the pairs
- Port number 3800 of IP address 123.45.67.89 and
- Port number 3800 of IP address 123.45.67.90
and can thus process database requests of two network cards.

Problems:

If one of the errors described under symptoms occurs, then check the following:

      a) Each hostname used must be unique in file /etc/hosts. Different IP addresses can only be called via different hostnames.
      b) Each service name used must be unique in the file /etc/services. Different port numbers can only be called via different service names.
      c) All combinations of port number and IP address used by clients must be processed by the server. If necessary, extend or modify the file $INFORMIXDIR/etc/$ONCONFIG, $INFORMIXSQLHOSTS, /etc/hosts and /etc/services correspondingly. After a modification of these files you must restart the database so that the changes become active.
      d) The hostname and the corresponding IP address of the client must be known under the same name on the server. Otherwise, the response from server to client cannot be sent and received correctly.

Additional key words


STARTSAP, R3TRANS, CONNECT, INF908, HOSTS, SERVICES, INFORMIXSERVER,
INFORMIXSQLHOSTS, DBSERVERNAME, DBSERVERALIASES, ONCONFIG, INFORMIXDIR



No comments:

Post a Comment