Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
Register Now.

Home > Success Center > Storage Manager (STM) > Upgrading Storage Manager (STM) when MariaDB is installed on another server

Upgrading Storage Manager (STM) when MariaDB is installed on another server

Table of contents
No headers
Created by Interspire Import, last modified by MindTouch on Jun 23, 2016

Views: 37 Votes: 0 Revisions: 9

STM setup 1:

Storage Manager is on one server and the database server is installed on a second server minus STM.

 

Note: Perform a full backup of your database before proceeding with any of the steps below.

1. On the server hosting Storage Manager (STM), make sure there are no database (DB) services installed and also make sure the dependencies (see Reference section of this KB for information on removing dependencies) for Storage Manager have been removed from the database service before upgrading. If the database setup is present on the server hosting Storage Manager perform the steps below, otherwise go to step 2:

 

  1. Open a command prompt as administrator for windows 8 (windows + X u will get a menu with one options as 'Command Prompt(Admin)'), for lower versions of windows just open command prompt with administrator privileges.
  2. Use the command 'sc delete <servicename style="font-size: 10px;">'(Enter the serviceName of the DB)</servicename>
  3. Remove the dependencies from other STM services by editing their registry files. Refer to the Reference section of this KB for steps on removing dependencies.


2.  Double click on the installation file of the newer version of STM and allow it to upgrade STM. This will upgrade STM with the newer version and a new DB will be installed.

3.  
Stop all the STM services and delete the DB service. Next, remove the dependency of DB service from all other services. This will prevent the database services from starting due to dependencies. Refer to the Reference section of this KB for steps on removing dependencies.

4.  Modify the server.properties file to point to the DB on the DB server. The file server.properties can be found in the <stm_installed_path>\webapps\ROOT\bin directory. The fields that need modifying in the server.properties on the STM server are:
</stm_installed_path>

  •  jdbc.host=<ip>   </ip>

 

5. Stop the DB service running on the database server and backup the DB to another location.

6. Copy the jre, webapps, and the new mariaDB folder from the Storage Manager server. The default path will be {STM_INSTALLATION_PATH}\SolarWinds\Storage Manager Server. Place it in the same folder where DB is located on the DB server. 

Example: On the DB server if the database is stored at "C:\Program Files\mariadb" then place jre and webapps folder in the path "C:\Program Files"

7.  Replace the “storage” folder found in the backup up DB into the new DB. The storage folder can be found in {DB_INSTALLATION_PATH}\mariadb\data path.

8.  
Before starting the DB service, verify the my.cnf file contains the correct path for basedir and datadir parameters:

 

  • basedir = {DB_INSTALLATION_PATH}\mariadb
  • datadir = {DB_INSTALLATION_PATH}\mariadb\data
9. Share the DB to the Storage Manager server so that they can communicate. Once done, restart the DB service. Refer to the Reference section of this KB for steps on sharing the DB.

10. Via command prompt go to the DB_INSTALLATION_PATH}\jre\bin directory and execute the following command for upgrading the DB:

 
  • java -Dserver.ipaddress=ENTER_IP_ADDRESS -Dserver.properties=../../webapps/ROOT/bin/server.properties -Dlog4j.configuration=database-log4j.properties -Dlog.dir=../../webapps/ROOT/logs -Dmysql.cmd.path=../../mysql/bin/mysql -jar ../../webapps/ROOT/WEB-INF/lib/profiler-database-5.2.2.jar -u 5.1.2 5.2.2

 

Notes:

  • Set 'ENTER_IP_ADDRESS' to be the IP of the STM server
  • The last two parameters are the old version (current database version) and the version to upgrade to (the version of the 'profiler-database' jar) 
  • Make sure to double check the versions, and that the jar file path is correct. If the DB is mariadb the replace the –Dmysql.cmd.path parameter to ‘’../../mariadb/bin/mysql”
11. Make sure that DB service is running on the DB server. Next go to the Storage Manager server and start the STM services. Cross check if both server and DB has upgraded to the newer versions.

12.  
Check if the Agent Status version and Server Status Version are shown correctly in 'Agent Status Report', and if they are not then execute the following  sql script in the DB server: 

 

 
  • update sys_config_module set scVersion='{Replace with upgraded version Id}';
  • update sys_agent_modstatus set versionId='{Replace with upgraded version Id}';
13. Verify the devices are collecting correctly.
 

STM setup 2:

Steps for transferring the database from Server 2 to Server 1 and then upgrading Storage Manager:

  1. Stop all the STM services on both machines 1 and 2. Next copy the DB folder from machine 2 to machine 1. The default path is  {STM_INSTALLATION_PATH}\SolarWinds\Storage Manager Server\.
  2. Install the newer version of STM. Next stop all the STM services along with DB service.
  3. Copy the upgraded database folder from machine 1 to machine 2 and start the DB service.
  4. Remove the DB dependencies for STM service from machine 1. For steps on removing dependencies, see the Reference section of this KB.
  5. Change the value in server.properties to jdbc.host=<machine> and start the STM services in machine 1.</machine>
  6. Check if the Agent Status version and Server Status Version are shown correctly in 'Agent Status Report', if it is not then execute the below sql script in the Storage DB in machine 2  
  • update sys_config_module set scVersion='{Replace with upgraded version Id}';
  • update sys_agent_modstatus set versionId='{Replace with upgraded version Id}';
       7. Verify the version and see if collection takes place correctly.

 

STM setup 3:

Customer installs one instance of STM on one server 1 and then stops the DB service and runs all other STM services in this machine, then installs the STM server on another server and stops all the services except DB. Then points the Storage Manager server (server 1) to the DB server (server 2).

1. On server 1, delete the DB service and remove the dependencies for the STM services before upgrading. If the DB service and dependencies have been removed from server 1 then proceed to step 2, otherwise do the steps below:
 

  1. Open command prompt in administrator mode for windows 8 machine (windows  + X u will get a menu with one options as 'Command Prompt(Admin)'), for lower versions of windows just open command prompt as an administrator.
  2. Use the command 'sc delete <servicename>'(Enter the serviceName of the DB)</servicename>
  3. Remove the dependencies from other STM services by editing their registry files. Refer to the Reference section of this KB for steps on removing dependencies.  

2. Double click on the installation file of the newer version of STM on server 1, and allow it to upgrade STM. This will upgrade STM with the newer version and a new DB will be installed.

3.
Stop all the STM services and delete the DB service. Next, remove the dependency of DB service from all other services. This will prevent the database services from starting due to dependencies. Refer to the Reference section of this KB for steps on removing dependencies.

4. Modify the server.properties file to point to the DB on the DB server. The file server.properties can be found in the <stm_installed_path>\webapps\Root\bin directory. The fields that need modifying in the server.properties on the STM server are:
 
  •  jdbc.host=<ip>   </ip>
5. On server 2, upgrade DB by installing the newer version of STM. Next stop all the STM services on server 2 except the DB service.

6.
On server 2, share the DB with server 1.  Refer to the Reference section of this KB for steps on sharing the DB.

7.
On server 1, start the STM services and verify if the DB and Server versions are correctly showing the upgraded versions.

8.
Check if the Agent Status version and Server Status Version are shown correctly in 'Agent Status Report', if it is not then execute the below sql script in the Storage DB in machine 2:

 
  • update sys_config_module set scVersion='{Replace with upgraded version Id}';
  • update sys_agent_modstatus set versionId='{Replace with upgraded version Id}';
</stm_installed_path>

 
9. 
Verify the devices are collecting correctly.
 

Reference:

How to Remove the DB service dependency from other STM services:

For Windows:

1. Open registry file by following the path Run --> regedit.

2. Goto HKEY_LOCAL_MACHINE -- > SYSTEM -- > CurrentControlSet -- > Services and click on the storage related services, then on the right side right click on the 'Depends on service' parameter and remove the DB service from the dependency, repeat this for all STM related services.

(Note for SolarWinds web service do not remove the TcpIp and afp dependencies from the services, only remove DB service)

3. Repeat the above steps in the following path HKEY_LOCAL_MACHINE -- > SYSTEM -- > ControlSet001 and ControlSet001 as well.

4. Now, restart the windows machine for the registry file modifications to take effect.
 

For Linux:

1. Goto the following path /usr/bin and the open the file storage_manager_server

2. Comment out the check_database line under start_services() function

Ex:

start_services()

{

   if [ -z "$1" ] ;

   then

      handle_service start database

      #check_database

      handle_service start webserver

      handle_service start collector

      handle_service start poller

      handle_service start eventreceiver

      handle_service start maintenance

   else

      if [ "$1" != "database" ] ;

      then

         check_database

      fi

      handle_service start $1

   fi

}

Now when you start the STM services by using the command sh /usr/bin/storage_manager_server start, it will start all the STM services except the DB service.

For installing the DB service you can use the following commands:

In Windows:

{DB_INSTALLATION_PATH}\bin\mysqld --install, service will be installed, then you can normally start or stop the service from services.msc

In Linux:

For Mariadb:

/opt/Storage_Manager_Server/mariadb/bin/mysqld --defaults-file=/opt/Storage_Manager_Server/mariadb/my.cnf --basedir=/opt/Storage_Manager_Server/mariadb --datadir=/opt/Storage_Manager_Server/mariadb/data --plugin-dir=/opt/Storage_Manager_Server/mariadb/lib/plugin --user=mariadb --lc-messages-dir=/opt/Storage_Manager_Server/mariadb/share --innodb=off --log-error=/opt/Storage_Manager_Server/mariadb/data/qa-che-snag-03.err --pid-file=/opt/Storage_Manager_Server/mariadb/data/mariadb.pid --port=3306 &

For MySQL:

/opt/Storage_Manager_Server/mysql/bin/mysqld --basedir=/opt/Storage_Manager_Server/mysql --datadir=/opt/Storage_Manager_Server/mysql/data --plugin-dir=/opt/Storage_Manager_Server/mysql/lib/plugin --user=mysql --log-error=/opt/Storage_Manager_Server/mysql/data/qa-che-snag-03.err --pid-file=/opt/Storage_Manager_Server/mysql/mysql.pid --port=3306

Replace the /opt/Storage_Manager_Server path, if the DB is placed in a different folder.
 

The following steps explain how to share the DB:
1. Login to the database using command prompt using the following commands

   Go to {DB_INSTALLATION_FOLDER}\DB_NAME\bin

     mysql -h 127.0.0.1 -u admin -p

     Enter password: solarwinds
2. change the DB to 'mysql' using command

     use mysql

3. Query the host table using 'select host from user;'

4. If the host is set as 'localhost' then update the host using the command

     update user set host='%';

Start the services in the following order:

check_database

webserver

collector

poller

eventreceiver

maintenance

Stop the services in the following order:

webserver

maintenance

event receiver

poller

collector

database

Last modified
03:49, 23 Jun 2016

Tags

Classifications

Public