IBM Support

ibmslapd starts in config-only mode when DB2 servicename is incorrect

Troubleshooting


Problem

This solution shows what can happen when the DB2 services entry is manually created in /etc/services with a service name that's not in the form expected by ITDS.

Symptom

An error like the following will appear in the ibmslapd.log

12/17/07 10:07:04 GLPRDB001E Error code -1 from function:" SQLConnect " ldapdb2b .
12/17/07 10:07:04 GLPRDB004E The directory server is unable to connect to the database.

The error that will appear in the db2cli.log is:

<timestamp> native retcode = -1337; state = "08001"; message = "[IBM][CLI Driver] SQL1337N The service "<servicename>" was not found.

An error like the following should appear in the db2diag.log for the DB2 instance:

<timestamp_line> LEVEL: Error

PID : 630896 TID : 1 PROC : ibmslapd
INSTANCE: <DB2_instance> NODE : 000
FUNCTION: DB2 UDB, common communication, sqlcctcpconnr, probe:33
MESSAGE : DIA3221E The service name "<servicename>" was not found,
TCP/IP function "getaddrinfo" error return code = "8".

Cause

The way that ITDS catalogs a database requires that the servicename created in /etc/services be created in a specific format that looks like this:

<DB2_instance>"svcids"

Diagnosing The Problem

After confirming that the customer had created this manually, we checked other servers where the entry had been created automatically by the ITDS configuration tools. The entry always had the format <DB2_instance>svcids in /etc/services when created by the ITDS config tools.

Resolving The Problem

Changed the entry in /etc/services so that the servicename followed the format described above. Alternatively, one can recatalog the LDAPDB2N node (created during the instance configuration) to agree with the service name in /etc/services. For the server to start properly, the following three things must all agree:

1. Contents of the service name in the 'db2 list node directory' output:



$ db2 list node directory

 Node Directory

 Number of entries in the directory = 2

Node 1 entry:

 Node name                      = IDSINODE
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = LOCAL
 Instance name                  = ldapdb2

Node 2 entry:

 Node name                      = LDAPDB2N
 Comment                        =
 Directory entry type           = LOCAL
 Protocol                       = TCPIP
 Hostname                       = localhost
 Service name                   = ldapdb2svcids

2. Value set for SVCENAME in the database manager configuration ('db2 get dbm cfg | grep SVCENAME'):



$ db2 get dbm cfg | grep SVCENAME
TCP/IP Service name (SVCENAME) = ldapdb2svcids

3. The name of the service in the /etc/services file; for example:



$ grep ldapdb2 /etc/services
DB2_ldapdb2 60008/tcp
DB2_ldapdb2_1 60009/tcp
DB2_ldapdb2_2 60010/tcp
DB2_ldapdb2_END 60011/tcp
ldapdb2svcids 3737/tcp
ldapdb2svcidsi 3766/tcp

It's generally easier to change the /etc/services value to agree with the values set in 1. and 2.

NOTE: this technote was opened only against UNIX/Linux platforms since DB2 works differently in Microsoft Windows environments with respect to services and we don't believe this specific problem can happen on Windows.

[{"Product":{"code":"SSVJJU","label":"IBM Security Directory Server"},"Business Unit":{"code":"BU008","label":"Security"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"6.0;6.1;6.2;6.3;6.3.1;6.4","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Product Synonym

ITDS;TDS;IBM Tivoli Directory Server;Secureway;Tivoli Directory Server;IDS;LDAP

Document Information

Modified date:
16 June 2018

UID

swg21293030