• 1 reply
  • Latest Post - ‏2013-06-14T14:25:22Z by Andrew McCarl
Andrew McCarl
Andrew McCarl
73 Posts

Pinned topic Error SQL5043N

‏2013-06-11T18:21:00Z | db2 dbdsupport hivalue technical-article

When an instance is started (db2start), listeners are started to accept the connect request from clients. Sometimes, the listeners may fail to start because the port is being used by a different application. This causes error: SQL5043N. To find which application is using the port, run netstat followed by rmsock on AIX. On Linux and Windows, netstat alone will do.

The db2start command gives a warning, SQL5043N, "Support for one or more communications protocols failed to start successfully. However, core database manager functionality started successfully." The following message is logged in the db2diag.log file.

  • 2007-01-23- LEVEL: Error 
    PID     : 3268824     TID  : 1       PROC : db2sysc 0 
    INSTANCE: db2inst1    NODE : 000 
    FUNCTION: DB2 UDB, common communication, sqlcctcpconnmgr, probe:46 
    MESSAGE : ADM7007E  The SVCENAME DBM configuration parameter, "50000", is configured with a port or a service name.  When it is configured with a service name, the TCP/IP services files is used to map the service name to a port number.  The port specified in this field is being used by another process.  Resolve this problem by either deleting the process using the port or use another port.

The db2diag.log file shows that the TCP/IP listener (db2tcpcm) failed to start because the required port, 50000 in this example, was already being used by another application. The simple resolution is to use a different port for listener. If you must use the port 50000, you should terminate the application that's using it. 

The commands below demonstrate how to determine which application or process is using the port. Please note that SQL5043N can be returned for various reasons. This technote only applies to the case where the port is used by another application.


AIX Command

1. lsof -i :<port number>
- This command must be run as root. lsof executable is available here.

AIX Example

Let's set SVCENAME to 50000, so that the listener will use this port.

$ db2 update dbm cfg using svcename 50000
$ db2start

Then, use the command above to check if the port is indeed being used by DB2 LUW. Run this as root.

$ lsof -i :50000
db2sysc 4128774 db2inst1 5u IPv6 0xf1000e00019f3bb8 0t0 TCP *:50000 (LISTEN)

Please note that this technote previously illustrated the use of rmsock command. However, a recent discovery revealed that rmsock command may exhibit an unstable behaviour. Hence, it was removed from this technote. We apologize for the inconvenience this has caused.

Windows Command

1. netstat -aon | findstr "<port number>"
- This shows if the specified <port number> is being used. The number in the last column is the process id (PID) of the process holding the socket. Once PID is determined, one can refer to "Windows Task Manager" to determine which application corresponds to the PID.

Windows Example

C:\>netstat -aon | findstr "50000"
TCP       LISTENING       2564

C:\>pslist 2564

pslist v1.28 - Sysinternals PsList
Copyright ⌐ 2000-2004 

Process information for MACHINENAME:
Process information for MACHINENAME:

   Name      Pid Pri Thd  Hnd   Priv     CPU Time  Elapsed Time
   db2syscs 2564   8  15  366  30912  0:00:02.859   2:12:08.564

The example above shows the use of pslist to determine the name of the process. Note that pslist is a free command available from Microsoft Sysinternals at .

Linux Command

1. netstat -anp | grep <port number>
- This shows the PID and the program name that uses the port. The command must be run as root.

2. Alternatively, one can also run
fuser -n tcp <port number>

Linux Example

Suppose the port 12345 is being used by someone else. Find out who by running the following.

# netstat -anp | grep 12345
# netstat -anp | grep 12345
tcp    0   0*    LISTEN   6629/ssh
tcp    0   0 ::1:12345              :::*    LISTEN   6629/ssh

ssh with the PID 6629 is using the port. Find more info about it.

# ps -efl | grep 6629
4 S root      6629 29716  0  75   0 -  6976 -      14:05 pts/4    00:00:00 ssh testserver -D 12345 -l db2inst1
0 S root      7648  7302  0  78   0 -   742 pipe_w 14:07 pts/7    00:00:00 grep 6629

In this case, the user db2inst1 is deliberately using the port 12345 by specifying -D option of ssh.


This is also covered by the technical article 1264632,

  • Andrew McCarl
    Andrew McCarl
    73 Posts

    Re: Error SQL5043N

    Hello!  We've had a number of clients respond through feedback to our technical documents indicating that they have further questions or comments that require additional dialogue.  Unfortunately, our feedback is anonymous, so unless an email address or other contact information is included, we have no way to get back in touch with you.
    Within DB2 support, the management team asked if we could somehow link our documents to the forums so that we could invite more discussion - like this!   As a start, we chose about 30 technical articles and "seeded" the forum with initial entries so that we could have a starting place for conversation.  The documents have now been updated with links to the forums as well.  
    Hopefully, we will make DB2 support better by providing more interaction around our technical information!