IBM Support

Database backup fails with sqlerrmc -50



BACKUP DB fails with error: ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: -50 TSMDBMGR_TSMINST1 reports error: ANS5216E Could not establish a TCP/IP connection with address ''. 'Connection refused' (errno = 111).


There are various reasons for this failure. The -50 indicates a timeout occurred while trying to connect to the Tivoli Storage Manager server through the Application Programming Interface (API).

Diagnosing The Problem

When diagnosing the -50, the settings found in the dsmserv.opt and dsm.sys (UNX) or tsmdbmgr.opt (Windows) file, used for the API, need to be verified. It is also best to start your Tivoli Storage Manager server in the foreground just to verify the initialization of the server. The following outlines the steps for determining the cause of the -50 and the failed BACKUP DB. Only the settings of importance have been pulled from the respective files:
I. Settings in dsmserv.opt

    SHMPort       1510

II. Settings in the API dsm.sys (UNX) or tsmdbmgr.opt (Windows)

      * ------------------------------------------------------------------- *
      * This stanza was added by the TSM Instance Configuration Utility     *
      * ------------------------------------------------------------------- *
      TCPPORT          1500
      PASSWORDACCESS   generate
      NODENAME         $$_TSMDBMGR_$$
      PASSWORDDIR      /home/tsminst1/tsminst1
      ERRORLOGNAME     /home/tsminst1/tsminst1/tsmdbmgr.log

III. Reported error messages in the specified TSMDBMGR_TSMINST1 error log file

    ANS5216E Could not establish a TCP/IP connection with address ''. The TCP/IP error is 'Connection refused' (errno = 111).
    ANS9020E Could not establish a session with a TSM server or client agent.  The TSM return code is -50.

IV. Output from Tivoli Storage Manager started in foreground:
    Tivoli Storage Manager for Linux/x86_64

    Version 6, Release 3, Level 3.100
    Licensed Materials - Property of IBM

    (C) Copyright IBM Corporation 1990, 2011.
    All rights reserved.
    U.S. Government Users Restricted Rights - Use, duplication or disclosure
    restricted by GSA ADP Schedule Contract with IBM Corporation.

    ANR7801I Subsystem process ID is 7084.
    ANR0900I Processing options file /home/tsminst1/tsminst1/dsmserv.opt.
    ANR7814I Using instance directory /home/tsminst1/tsminst1.
    ANR4726I The ICC support module has been loaded.
    ANR0990I Server restart-recovery in progress.
    ANR0152I Database manager successfully started.
    ANR1380I The buffer pool monitor switch is enabled.
    ANR1628I The database manager is using port 51500 for server connections.
    ANR1635I The server machine GUID,, has initialized.
    ANR2100I Activity log process has started.
    ANR4726I The NAS-NDMP support module has been loaded.
    ANR1794W TSM SAN discovery is disabled by options.
    ANR2803I License manager started.
    ANR8285I Shared Memory driver ready for connection with clients on port 1510
    ANR2828I Server is licensed to support Tivoli Storage Manager Extended Edition.

Using the data above, verify how the server was initialized by verifying message ANR8285I. In this case, you see that the server has started the Shared Memory driver and is ready for connections on port 1510. These settings are based on the COMMMETHOD and SHMPORT found in the dsmserv.opt file. If SHMPORT is not defined it will default to 1510.

Next you review the connection settings found in the API settings file. In the example above, you see that the BACKUP DB will connect to the server using TCPIP on port 1500.

Resolving The Problem

For the example above, the Tivoli Storage Manager server is using a COMMMETHOD of SHAREDMEM but the BACKUP DB process is trying to connect to the server using TCPIP. To resolve this, either the COMMMETHOD on the server needs to be changed to TCPIP or the API option files needs to be updated to use a COMMMETHOD of SHAREDMEM. Which ever option is preferred, the appropriate listening port will need to be defined as well.

I. Update the dsmserv.opt as such:

    COMMMethod    TCPIP
    TCPPort       1500

II. Restart the server in the background and try the BACKUP DB again.

If the above is not your issue with the -50 error code, verify IP addresses and that they can be pinged. Also, verify the port is not in use by another application.

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Server","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym


Document Information

Modified date:
17 June 2018