Application Delivery Management

Recover inaccessible NetScaler Console servers

NetScaler Console now provides a database maintenance tool to perform cleanup of the system database. You can now launch the NetScaler Console utility tool to connect to the file system, delete a few components, and make the database accessible. NetScaler Console recovery script is a tool that helps to recover space in the file system by clearing old or unused database tables and files. The tool assists you to navigate through the database tables and files in successive steps and shows the current space occupied on the filesystem by respective items. Once you have selected the database tables and files to be deleted, the tool deletes those from the filesystem after confirmation.

How to Use NetScaler Console Database Recovery Script for a NetScaler Console Standalone Deployment

Use the following procedure in a single server NetScaler Console deployment to connect to the file system, delete a few components, and make the database accessible, and then perform the recovery operations.

  1. Using an SSH client or your hypervisor’s console, logon to NetScaler Console and type the following command: Database-tool1

  2. When the screen displays a caution message for stopping a few NetScaler Console processes, type “y” and press the Enter key.

    The following screen appears while the system determines which components of the database you can delete without affecting the system’s core files.

    Database-tool2

  3. The screen displays the list of files in the database. Type “y” and press the Enter key to begin the cleanup process.

    Database-tool3

  4. You can select the specific database component that needs to be cleaned and type the corresponding number. Press the Enter key.

    For example, to perform System Catalog cleanup, select option 8 in the DB component selection menu and type “y” and press the Enter key to continue with the system catalog clean up.

    Note

    NetScaler Console includes user tables known as system catalog. The system catalog is a location in the NetScaler Console database where a relational database management system stores schema metadata, such as information about tables and columns and internal records. The tables in the system catalog are like regular tables that can accumulate inflated and dead rows over time and therefore, need periodic cleanup for optimal performance. It is a good practice to regularly maintain these tables. The activity not only frees up disk space but also improves the overall performance of the database and therefore of the NetScaler Console.

    Database-tool4

    The cleanup utility gives you an option to clean database components and file components. You can select any file component by typing a number between “1” and “9,” or type “11” and press the Enter key to clean the database component.

    Note

    The number “11” indicates that you have not selected any file component to be cleaned and you are going ahead with cleaning up the earlier database component that you had earlier selected. In this example, it is “system catalog.”

    Database-tool5

  5. Type “y” and press the Enter key again in the final confirmation screen.

    Database-tool6

    The System Catalog is cleaned up, which may take time depending on the size of the table in the System Catalog. After the process is complete, a summary screen is shown.

    Database-tool7

  6. Type “y” and press the Enter key to restart NetScaler Console.

    Ensure you restart NetScaler Console after system clean up. Wait for about 30 minutes for internal database operations to complete after NetScaler Console has restarted. You should then be able to connect to NetScaler Console database. If not, run the recovery script again to free up more space. When NetScaler Console is up and running, it should work as expected.

    Note

    The current size of the system catalog table is never equal to Zero after clean up. This is because only empty rows are removed from the table and the table might have some valid entries even after they are cleaned up.

How to use NetScaler Console database recovery script for a NetScaler Console high availability deployment

The database system for NetScaler Console servers in a high availability deployment is in continuous synchronization mode. While using the new database recovery tool, you do not need to replicate the procedure on both the NetScaler Console servers.

  1. Using an SSH client or hypervisor’s console, log on to the primary node.

  2. Run the following command:

    /mps/mas_recovery/mas_recovery.py

  3. Follow the procedure from step 2 available for NetScaler Console Standalone Deployment Recovery Script

Recover inaccessible NetScaler Console servers