| Предупреждение |
|---|
| Before updating TM server to version 6.11 we recommend updating DM server first. |
The update will be done through a console of the server being updated. A console (or a terminal) is a window of a Linux-based operating system where you can type commands in a text form - as strings. Depending on the server type, when started, the console may display general information on the server and an invitation to log in or just an invitation to log in without general information. In any case, you have to enter the user login that will be used for working the console. The console looks as follows: Image Added
To update the System, perform the following steps: - Open the console of the server being updated:
- in the case of a physical server - the console is displayed on the screen of a monitor connected to the server;
- in the case of a virtual server - run Launch Virtual Machine Console command (see an example below).
Image Added A window with the server console will open.
- In the Login as: (or login: - depending on the server type) line, enter root and press Enter.
Image Added In the root@<server_address>'s password: (or Password: - depending on the server type) line, enter a password of the root user (superuser) and press Enter. Please, note that nothing is displayed in the line while typing. Image Added The screen will display the service information and (in the last line) an invitation to enter the command (command line). | Информация |
|---|
| The commands within the console are entered from the keyboard and must be confirmed by pressing Enter. So, if the instruction tells you to enter the command, it means that you should enter the command and then press Enter. Once the command is executed, the invitation is displayed again - it is ended with # or $ (depending on the user who logged in). Before typing the next command, make sure that an invitation is displayed at the command line. If you connect remotely via SSH, it is recommended using the Screen utility. Thus you can avoid problems in case of lost connection with updating server. When disconnecting from the utility, all the processes started are not to be interrupted and you may safely continue the System update. Warning! Using Screen is highly recommended when working with DB and updating DBMS. Basic commands: screen - start the utility;Ctrl+a d - disconnect from screen (to be input within the screen window);screen -ls - display the list of screen running;screen -r - connect to screen again;screen -r name - connect to a specific screen with «name»;exit - exit screen (to be input within the screen window).
|
- Enter the command to call the file manager:
mc
Image Added
The screen will display a window of Midnight Commander file manager where you can view files. You can navigate in the file manager using keyboard arrows and the Enter key or with a mouse. Besides, you can enter commands at the command line which is displayed in the lower part of the screen (for entering commands, no additional actions are required). To go up one level, position the cursor in the /.. field (the first line in the file manager) and press Enter. Go to the /opt/iw/tm5 directory and make sure that it contains iwks_mode file. Image Added | Информация |
|---|
| If iwks_mode file is missing in the directory, you need to create it. For this, enter the command: touch iwks_mode
|
- Position the cursor on the iwks_mode fine and press F3.
Depending on the System edition (Enterprise or Standard) the content of iwks_mode file will be displayed on the screen:
- To see the number of Traffic Monitor version go to
/opt/iw/tm5/version. Depending on Traffic Monitor version that will be updated together with the System, further steps can differ. - To exit the file manager (it is necessary for better commands executing) enter the command:
exit
Depending on how you are going to update the System, choose the instruction:
| Раскрыть |
|---|
| title | Updating the System over the installed one |
|---|
| | Предупреждение |
|---|
| The OS Red Hat Enterprise Linux will be updated up to the 7.x version together with the System. To update the OS, please check the official instruction. We strongly recommend to back up the System, clone it and update on this particular testing computer. If Oracle DBMS is used in the System, before processing the update you should perform a database backup. When Oracle DBMS update is running, changes cannot be rollback. |
To update the System, take the following steps: - Copy files into the
/root directory:
- The files from InfoWatch Traffic Monitor distributive:
iwtm-installer-x.x.x.xxx-rhel7.run (where x.x.x.xxx is a number of build);iwtm-postgresql-9.6.13-x.xx.x.tar.gz;iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;iwtm-adp-x.xx.x.tar.gz.
ISO-image of distributive disc of OS Red Hat Enterprise Linux 7.x. | Информация |
|---|
| To make sure the ISO-image version of OS Red Hat Enterprise Linux 7.x distributive kit is correct, please check on official website the version number the System to be updated. |
Our example: iwtm-installer-6.11.0.839-rhel7.run ;iwtm-postgresql-9.6.13-6.11.0.tar.gz ;iwtm-oracle-12.2.0.1-6.11.0.tar.gz ;iwtm-adp-6.11.0.tar.gz ;rhel-server-7.6-x86_64-dvd.iso .
To make the file iwtm-installer-x.x.x.xxx-rhel7.run executable, enter the command:
chmod u+x /root/iwtm-installer-x.x.x.xxx-rhel7.run Our example command:
chmod u+x /root/iwtm-installer-6.11.0.839-rhel7.run | Информация |
|---|
| If Crawler subsystem is a part of the System, it is required to stop the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed using Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service. |
- Enter commands to stop interceptors:
service iwtm stopwait icap
service iwtm stopwait smtpd
service iwtm stopwait expressd
service iwtm stopwait sniffer
service iwtm stopwait xapi_xapi
service iwtm stopwait xapi_puppy - Enter the command to call the file manager:
mc - Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
/opt/iw/tm5/queue/analysis/.db/
/opt/iw/tm5/queue/analysis/.in/
/opt/iw/tm5/queue/analysis/.out/
/opt/iw/tm5/queue/db/.db/
/opt/iw/tm5/queue/db/.in/
/opt/iw/tm5/queue/db/.out/
/opt/iw/tm5/queue/smtp/.db/
/opt/iw/tm5/queue/smtp/.in/
/opt/iw/tm5/queue/smtp/.out/
/opt/iw/tm5/queue/x2x/.db/
/opt/iw/tm5/queue/x2x/.in/
/opt/iw/tm5/queue/x2x/.out/
When all the events are processed, these directories should be empty. | Предупреждение |
|---|
| To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update. If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System. To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens. |
- To exit the file manager (is required to better control command execution), enter the command:
exit - To stop services of Traffic Monitor server, enter the command:
service iwtm stop && chkconfig iwtm off - Depending on DBMS being used and Traffic Monitor version installed, enter the command to stop the DB:
- For Oracle DBMS:
service oracle stop && chkconfig oracle off
- For PostgreSQL DBMS:
service postgresql-9.4 stop && chkconfig postgresql-9.4 off (Traffic Monitor 6.9.x version)service postgresql-9.6 stop && chkconfig postgresql-9.6 off (Traffic Monitor 6.10.x version)
Depending on Traffic Monitor version installed, enter the command: service php-fpm stop && chkconfig php-fpm off (Traffic Monitor 6.9.x version)service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (Traffic Monitor 6.10.x version)
- Enter commands to stop services:
service redis stop && chkconfig redis off
service nginx stop && chkconfig nginx off
service gearmand stop && chkconfig gearmand off
service nagios stop && chkconfig nagios off - If you have Traffic Monitor 6.10.x version installed, enter the command to stop the service:
service iwtm-consul stop && chkconfig iwtm-consul off To update packages enter the command:
yum upgrade --exclude=nagios | Предупреждение |
|---|
| To run the command at this step you should connect Red Hat Enterprise Linux 6 repositories having the latest updates installed. Find how to work with repository in the guide on Red Hat Enterprise Linux official website. |
The following request will be displayed: Image Added
To continue type Y and press Enter. After packages updating is completed, enter the command to reboot the server:
reboot Wait until the server is loaded and log in again. For this, take the steps 1-3 of the instruction before updating. To install assistive utilities for updating, enter the command: yum -y install yum-utils redhat-upgrade-tool preupgrade-assistant preupgrade-assistant-ui preupgrade-assistant-el6toel7 Wait until the installation is completed. To disconnect repositories run the command:
yum-config-manager --disable \* Enter the command to clear the cash of package manager:
yum clean all Delete or disconnect Red Hat Enterprise Linux 6 repositories: - To delete repositories:
- Enter the command to call file manager:
mc - Go to directory
/etc/yum.repos.d/; - Open configuration files of the Red Hat Enterprise Linux 6 repositories;
The baseurl parameters contain the addresses of directories of local repositories; - Delete these directories and their content, then delete the configuration files in the directory
/etc/yum.repos.d/; - To exit the file manager enter the command:
exit
- To disconnect the repository, take one of the following steps:
- Open for editing the repository configuration file stored in
/etc/yum.repos.d/, in enabled parameter change 1 for 0 and save changes; - Delete repository configuration file from the directory
/etc/yum.repos.d/ .
To run the utility, checking the System before the update, enter the command: preupg –v
The following request will be displayed: Image Added To continue, type Y and press Enter. - Wait until the utility completes the job. The results of checking appear in the report
/root/preupgrade/result.html , created by the utility. Follow the recommendations from the report. For this, check the paragraph 1.1.3.3 of official instruction. Delete the dkms package by running the command: rpm -ev --nodeps dkms
| Предупреждение |
|---|
| Non‐compliance may cause the OS updating error. |
To run the updating utility, enter the command:
redhat-upgrade-tool --iso /root/rhel-server-7.x-x86_64-dvd.iso (where 7.x is an edition of the OS Red Hat Enterprise Linux, up to which the System will be updated) Our example command: redhat-upgrade-tool --iso /root/rhel-server-7.6-x86_64-dvd.iso
The following request will be displayed: Image Added To continue, type Y and press Enter. The following message will be displayed: Image Added | Предупреждение |
|---|
| In case OS Red Hat Enterprise Linux is updated to version following after 7.6, the message as follows can be displayed: Image Added
The message is aimed to inform you about inability of operating system to be updated to the specified version. In this case, use ISO image of OS Red Hat Enterprise Linux distributive kit of the version which was specified in the message final part. |
- Enter the command to restart server:
reboot The updating continues after server is rebooted. - Wait until the updated System is loaded and log in again. For this, take the steps 1-3 of the instruction before updating.
- To update the configuration of Postfix mail server, enter the command:
postfix upgrade-configuration Enter the command to find and display the list of files with .rpmnew extension at the console:
find / -name "*rpmnew*" -print If the files have been found, they should be correctly merged with configuration files (see "Merging configuration files"). | Информация |
|---|
| To merge successfully the configuration files you should read the following articles on official site: |
| Предупреждение |
|---|
| Do not change web.conf, database.conf, consul.json files. It is also recommended not to change the file /etc/nagios/nagios.cfg. |
Before continuing the update, connect the external and internal repositories Red Hat Enterprise Linux 7. You can check the instruction of the local repository setting on Red Hat Enterprise Linux official website. Enter the command to go to the directory containing Traffic Monitor distributives:
cd /root If you are using Oracle DBMS, take the following steps: - Enter the command to stop DBMS Oracle:
service oracle start - Enter the command to run the Oracle update:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade
Our example command: bash ./iwtm-installer-6.11.0.839-rhel7.run -- --oracle-upgrade
After Oracle successful update the following message appears:
Image Added
| Информация |
|---|
| Oracle DBMS upgrade may take a long time. Approximate timing to update 1 TB Oracle database: - DBMS Oracle will be updated in 60 minutes;
- Oracle database scheme will be updated in 50 minutes.
To perform the update, make sure there is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle. The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version. You can remove it only after the System has been upgraded and all checks are completed. Before the removal, be sure to check that: - a new version is not installed in the
/u01/app/oracle/product/db_1 directory; - all services of the System are started and running;
- the System condition tab of the TM Console does not contain errors;
- the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
- the DB receives new events.
To remove the old version, follow commands from the message. |
- To convert password file to Oracle 12 format, please enter the command:
su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"
Enter the command to update Traffic Monitor packages:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run Our example command: bash ./iwtm-installer-6.11.0.839-rhel7.run The installer will check the System before running and in case of non-compliance with requirements, it will interrupt the installation and display an error message. In this case, you need to correct the error and restart the update. In the window that opens informing that an early version of the InfoWatch Traffic Monitor has been found, choose Update and press Enter:
Image Added
If you are using PostgreSQL DBMS, and Traffic Monitor has been updated from the version 6.9.x, do the following: Update PostgreSQL DBMS. - Enter the command to switch to postgres user:
su - postgres Enter the command to run the script (scenario) of the DB update:
bash /opt/iw/tm5/csw/postgres/update.sh
| Информация |
|---|
| Database scheme update may take a long time. Example: a database of size 1 TB will be updated in 95 minutes. To perform the update, make sure there is 12 GB of free space in the root directory. |
Enter the command:
exit
Enter the command to search and display the list of files with.rpmnew extension: find / -name "*rpmnew*" -print
If mentioned files have been found, they should be correctly merged with configuration files ( see "Объединение конфигурационных файлов"). | Предупреждение |
|---|
| Do not change web.conf, database.conf, consul.json files. It is also recommended not to change the file /etc/nagios/nagios.cfg. |
Enter the command to call file manager again:
mc Go to the directory /opt/iw/tm5/etc/scripts/ and make sure that there is a file iwssid.lua.upgrade. The System does not use the file iwssid.lua.update, as it is a backup in case the System is to be customised. The file iwssid.lua should be opt/iw/tm5/etc/scripts/ as well. We recommend to keep it as it is if it has not been edited before update. Otherwise, it should be correctly merged with the configuration file iwssid.lua.rpmnew ( see "Merging configuration files"). - To exit the file manager:
exit Enter the command to reboot server:
reboot Wait until the server is loaded and log in again. For this, take the steps 1-3 of the instruction before the updating. | Предупреждение |
|---|
| After the start, Traffic Monitor connects to the database and loads the configuration file cas_config.xml from there. Depending on configuration size, file loading may take some time. During this loading period, the System may record error messages in log files: | Раскрыть |
|---|
| title | /opt/iw/tm5/log/cas_config_compiler.log |
|---|
| | Блок кода |
|---|
| language | js |
|---|
| title | Запись об ошибке вида |
|---|
| linenumbers | true |
|---|
| 1 2019-10-07 17:00:57.351489 (3936:0x00007f4008de8880) [ERROR ] : <Root> Exception:.
Diagnostic information..
/sandbox/src/cas3/config/details/cas_factory.cpp(233): Throw in function bool cas::CasConfigFactory::LoadXmlConfig(cas::ConfigCreator::Ptr&, const boost::filesystem::path&) const
Dynamic exception type: boost::exception_detail::clone_impl<cas::ExceptionCasConfig> |
|
| Раскрыть |
|---|
| title | /opt/iw/tm5/log/cas.log |
|---|
| | Блок кода |
|---|
| language | js |
|---|
| title | Запись об ошибке вида |
|---|
| linenumbers | true |
|---|
| 1 2019-10-03 17:39:13.348146 (14262:0x00007fe83892ba80) [WARNING] : <Root> Prometheus server is off, therefore the statistics is unavailable. That's what you wanted, isn't it?
2 2019-10-03 17:39:14.364655 (14262:0x00007fe83892ba80) [ERROR ] : <Root> Error when loading config of tech: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml
3 2019-10-03 17:39:14.364856 (14262:0x00007fe83892ba80) [ERROR ] : <Root> failed to initialize thrift server
Diagnostic information.
/sandbox/src/cas3/handler.cpp(682): Throw in function cas::Handler::LoadedConfigData cas::Handler::GetLoadedConfigData(const prop::Property&, const Ptr&)
Dynamic exception type: boost::exception_detail::clone_impl<tech::ExceptionTechLoadConfig>
std::exception::what: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml |
|
After the configuration file has been successfully loaded, the System will stop recording error messages and will work in standard mode. If the System continues to record error messages for a long time, check connection with the database. |
Enter the command to delete Red Hat Enterprise Linux 6 packages: yum remove *.el6*
| Предупреждение |
|---|
| Before the deletion processing on display, you will see the list of packages to be removed and a query for removal. Please carefully check the list for packages starting with "iwtm-". Once you see any package, cancel the deletion and miss this action. |
To delete the displayed list of packages, press Y on the keyboard and press Enter. Enter the command to clear cash of packages manager.
yum clean all Enter the command to clear cash: redis-cli flushall
- Enter the command to check start of processes:
iwtm status The processes and their statuses will be displayed. Usually, the services iw_qmover_client, iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:
Image Added
| Информация |
|---|
| If Crawler subsystem is a part of System, it is required to run the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service. |
Traffic Monitor All-in-one server is updated. The System version shown in the management Console window About the System should be changed accordingly. If you have other systems or subsystems to be updated, check the instructions of the chapter. | Предупреждение |
|---|
| If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually"). |
| Информация |
|---|
| Clear the cash before starting, so the Console can be displayed correctly. Use your browser standard functionalities to perform the action. |
|
| Раскрыть |
|---|
| title | Updating system by reinstalling and restoring data from backup copy |
|---|
| | Предупреждение |
|---|
| We strongly recommend to back up the System, clone it and update on this particular testing machine. If Oracle DBMS is used in the System, before processing the update you should perform a database backup. When Oracle DBMS update is running, changes cannot be rollback. The OS Red Hat Enterprise Linux 7.x will be installed during the System updating. After installing OS Red Hat Enterprise Linux 7.x version, Traffic monitor configuration files should be set up again. We recommend saving them to perform additional configuration after the update. |
During the System update, the following steps will be performed: - DB, indexes and configuration of iw_adlibitum service backup (Preparing for update).
- Installation of the OS Red Hat Enterprise Linux 7.x (The user follows the official instruction to install the OS).
- InfoWatch Traffic Monitor 6.11 installation.
Data backup and DBMS update.
| Информация |
|---|
| If Crawler subsystem is a part of System, it is required to run the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service. |
Enter commands to stop interceptors and iw_indexer:
service iwtm stopwait icap
service iwtm stopwait smtpd
service iwtm stopwait expressd
service iwtm stopwait sniffer
service iwtm stopwait xapi_xapi
service iwtm stopwait xapi_puppy service iwtm stopwait indexer
- Again, enter the command to call the file manager:
mc Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
/opt/iw/tm5/queue/analysis/.db/
/opt/iw/tm5/queue/analysis/.in/
/opt/iw/tm5/queue/analysis/.out/
/opt/iw/tm5/queue/db/.db/
/opt/iw/tm5/queue/db/.in/
/opt/iw/tm5/queue/db/.out/
/opt/iw/tm5/queue/smtp/.db/
/opt/iw/tm5/queue/smtp/.in/
/opt/iw/tm5/queue/smtp/.out/
/opt/iw/tm5/queue/x2x/.db/
/opt/iw/tm5/queue/x2x/.in/
/opt/iw/tm5/queue/x2x/.out/ When all the events are processed, these directories should be empty. | Предупреждение |
|---|
| To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update. If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System. To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens. |
- To exit the file manager (is required to better control command execution), enter the command:
exit - To stop services of Traffic Monitor server, enter the command:
service iwtm stop && chkconfig iwtm off - Depending on Traffic Monitor version, enter the command
:
service php-fpm stop && chkconfig php-fpm off (Traffic Monitor 6.9.x version)service iwtm-php-fpm stop && chkconfig iwtm-php-fpm off (Traffic Monitor 6.10.x version)
Connect to DB and check the number of events it contains: | Раскрыть |
|---|
| To connect to DB server, enter the commands using a console:
su - oracle
sqlplus <scheme_owner_data> where <scheme_owner_data> - login and password of DB scheme owner. Default data are available on the Accounts page. Example:
su - oracle
sqlplus iwtm/xxXX1234 - Then enter the command:
select count(1) from object; To disconnect from DB, enter the command: exit To switch to other user, enter the command:
exit
|
| Раскрыть |
|---|
| To connect to DB server, enter the commands using a console:
su - iwtm
psql postgres iwtm -p 5433 - Then enter the command:
select count(1) from object; To exit, enter the command:
\q Enter the command:
exit
|
To stop searchd processes enter the command: killall searchd To verify, enter the command:
ps -ef | grep searchd | grep -v grep The command should not respond with running processes.
Run backup: | Предупреждение |
|---|
| To back up successfully, you should copy the files with their rights, users and groups saved. To do this, copy files into the Linux file system (ex., Ext4 or XFS). Store backup copies either on a separate section of server or on another server, or on external device. Make sure that the data will not be lost when installing the OS Red Hat Enterprise Linux 7.x. After installation, backup copies should be copied into their original directories, and rights, users and groups should not be changed. |
Depending on DBMS being used and the Traffic Monitor version installed, enter the command to stop the DB: For Oracle DBMS: For PostgreSQL DBMS:
Make DB backup. By default, DB is stored in the directories /u01, /u02 etc. Copy DB into another section of sever or on another server, or on an external device. | Информация |
|---|
| To specify directories keeping DB, check the file: |
- Make indexes backup. To do this:
- Enter the command to call the file manager:
sudo mc - Go to
/opt/iw/tm5/etc directory and open file indexer.conf in view mode. - The path to indexes directory is defined in
"SphinxBaseDir" parameter. A relative path to indexes archive is defined in "ArchiveDir" parameter. Archive path is defined relatively to content of "NookDir" parameter. Copy indexes directories and indexes archive into either other section of server, or other server, or external device.
- Make
iw_adlibitum service configuration backup. To do this, take the following steps:
Go to /opt/iw/tm5/etc directory and open file adlibitum.conf in view mode. A relative path to the directory containing iw_adlibitum service configuration is defined in "ConfigDir" parameter. The path is defined relatively to the content of "NookDir" parameter. Copy configuration directory into either other section of the server, or another server, or external device. To exit the file manager (is required to better control command execution), enter the command:
exit
Install the OS Red Hat Enterprise Linux 7.x on server. To do this, check official instruction. Install Traffic Monitor version 6.11. | Предупреждение |
|---|
| If backup copies are kept on external storages, do not connect them during the installation. It should be done right before DB backup and update. |
- To stop service enter the commands:
iwtm stop service iwtm-php-fpm stop service nagios stop - Depending on DBMS you are using, enter the command to stop the DB:
- To stop
searchd processes, enter the command:
killall searchd To verify, enter the command:
ps -ef | grep searchd | grep -v grep Command response should not have running processes. - Copy DB backup copy that was created at step 9b into the original directory.
- When using Oracle DBMS, please make sure the uid ID (oracle user) and gid ID (oinstall group) have the value equal to 1001:
a. To find out the uid and gid ID values, please run the command:
id oracle b. Check the rights as per /u01 and /u02 directories:
ls -l /u01
ls -l /u02 c. In case the rights are incorrect, search all these rights as per this owner in files and directories and replace it as follows:
find /u01 -uid 501 -exec chown -v -h 1001 '{}' \;
find /u01 -gid 501 -exec chgrp -v 1001 '{}' \;
find /u02 -uid 501 -exec chown -v -h 1001 '{}' \;
find /u02 -gid 501 -exec chgrp -v 1001 '{}' \; - Enter command to shift to Traffic Monitor distributive's directory:
cd /root - Update DBMS:
| Раскрыть |
|---|
| - Enter command to start Oracle:
service oracle start Enter command to start Oracle update:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade Our example command: bash ./iwtm-installer-6.11.0.630-rhel7.run -- --oracle-upgrade
In case of successful update the following message will be displayed:
Image Added
| Информация |
|---|
| Oracle DBMS upgrade may take a long time. Approximate timing to update 1 TB Oracle database: - DBMS Oracle will be updated in 60 minutes;
- The Oracle database scheme will be updated in 50 minutes.
To perform the update, make sure there is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle. The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version. You can remove it only after the System has been upgraded and all checks are completed. Before the removal, be sure to check that: - a new version is not installed in the
/u01/app/oracle/product/db_1 directory; - all services of the System are started and running;
- the System condition tab of the TM Console does not contain errors;
- the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
- the DB receives new events.
To remove the old version, follow commands from the message. |
Enter the command to shift to directory, containing the script (scenario) of DB scheme update.
cd /opt/iw/tm5/csw/oracle Enter the command to run the script:
su --command "/opt/iw/tm5/csw/oracle/update.sh" oracle To convert password file to Oracle 12 format, please enter the command:
su - oracle -c "orapwd file=${ORACLE_HOME}/dbs/orapwiwtm force=y format=12 input_file=${ORACLE_HOME}/dbs/orapwiwtm"
|
| Раскрыть |
|---|
| - If System updates from version 6.9.x:
- Run PostgreSQL DBMS update.
- Enter command to run script (scenario) of the DB scheme update:
su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres
- If System updates from version 6.10.x:
- Enter command to run PostgreSQL:
service postgresql-9.6 start - Run command:
su --command "/usr/pgsql-9.6/bin/psql -d postgres -p 5433 -f /opt/iw/tm5/etc/update_psql_commands" postgres - Enter command to shift to directory containing the script (scenario) of DB scheme update:
cd /opt/iw/tm5/csw/postgres Enter the command to run the script:
su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres | Информация |
|---|
| The database scheme update may take a long time. Example: a database of size 1 TB will be updated in 95 minutes. To perform the update, make sure there is 12 GB of free space in the root directory. |
|
- Perform step 7 of the instruction to compare the number of events in DB before and after update.
Copy backup copies that were created at step 9b and 9c, into original directories and files. If original directory is not a default one, it needs to be indicated in the appropriate sections of configuration files (see steps 10b and 10c). Run the commands: sudo -u iwtm touch /opt/iw/tm5/www/backend/protected/runtime/first_run
iwtm restart kicker Enter command to reboot server: reboot Wait until server loading is completed and log in again by performing steps 1-3 of the instruction before updating.
- Enter command to clear cash:
redis-cli flushall - Enter the command to test processes' start:
iwtm status List of processes and their statuses will be displayed. Usually, the services iw_qmover_client, iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:
Image Added
| Информация |
|---|
| If the Crawler subsystem is a part of the System, it is required to run the services of this subsystem (on Crawler server). This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service. |
Updating Traffic Monitor All-in-one server is complete. The System version in the About the System window of the Management Console will be changed. If the System includes other servers or subsystems to be updated, follow instructions in this section. | Предупреждение |
|---|
| If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually"). |
| Информация |
|---|
| For the Management Console to be displayed correctly, delete the cache in your browser before you start working in the Management Console. This is done with browser standard tools. |
|
| Раскрыть |
|---|
| title | Updating the System from version 6.11.xx to 6.11.yy |
|---|
| | Предупреждение |
|---|
| We strongly recommend to back up the System, clone it and update on this particular testing computer. |
To update the System, take the following steps: - Copy the files from InfoWatch Traffic Monitor distributive into the
/root directory:iwtm-installer-x.x.x.xxx-rhel7.run (where x.x.x.xxx is a number of build);iwtm-postgresql-9.6.13-x.xx.x.tar.gz;iwtm-oracle-12.2.0.1-x.xx.x.tar.gz;iwtm-adp-x.xx.x.tar.gz.
Our example: iwtm-installer-6.11.2.1032-rhel7.run;iwtm-postgresql-9.6.13-6.11.2.tar.gz;iwtm-oracle-12.2.0.1-6.11.2.tar.gz;iwtm-adp-6.11.2.tar.gz.
| Информация |
|---|
| If Crawler subsystem is a part of the System, it is required to stop the services of this subsystem (on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed using Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Stop service. |
- Enter commands to stop interceptors:
iwtm stop icap
iwtm stop smtpd
iwtm stop sniffer
iwtm stop xapi_xapi
iwtm stop xapi_puppy - Enter command to call the file manager:
mc - Wait until all events which are in the queue for processing are processed. Events in the queue are located in the following directories:
/opt/iw/tm5/queue/analysis/.db/
/opt/iw/tm5/queue/analysis/.in/
/opt/iw/tm5/queue/analysis/.out/
/opt/iw/tm5/queue/db/.db/
/opt/iw/tm5/queue/db/.in/
/opt/iw/tm5/queue/db/.out/
/opt/iw/tm5/queue/smtp/.db/
/opt/iw/tm5/queue/smtp/.in/
/opt/iw/tm5/queue/smtp/.out/
/opt/iw/tm5/queue/x2x/.db/
/opt/iw/tm5/queue/x2x/.in/
/opt/iw/tm5/queue/x2x/.out/
When all the events are processed, these directories should be empty. | Предупреждение |
|---|
| To continue the update, make sure that all specified directories are empty. Otherwise, we cannot guarantee that the System will be updated correctly and will operate properly after the update. If for some reason, you cannot wait until the processing is complete, you can delete events from the queue; these events will be completely removed from the System. To delete the event, go to the required directory in the file manager, position the cursor on the event you want to delete and press F8. Then, confirm the deletion by clicking Yes in the confirmation window that opens. |
- To exit the file manager (is required to better control command execution), enter the command:
exit - To stop services of Traffic Monitor server, enter the command:
iwtm stop - Depending on DBMS being used enter the command to stop the DB:
- For Oracle DBMS:
service oracle stop && chkconfig oracle off- For PostgreSQL DBMS:
service postgresql-9. 4 stop && chkconfig postgresql-9.4 off (Traffic Monitor 6.9.x version) service postgresql-9.6 stop && chkconfig postgresql-9.6 off (Traffic Monitor 6.10.x version)
Make DB backup. By default, DB is stored in the directories /u01, /u02 etc. Copy DB into another section of sever or on other server, or on external device. | Информация |
|---|
| To specify directories keeping DB, check the file: |
- Make indexes backup. To do this:
- Enter the command to call the file manager:
sudo mc - Go to
/opt/iw/tm5/etc directory and open file indexer.conf in view mode. - The path to indexes directory is defined in
"SphinxBaseDir" parameter. A relative path to indexes archive is defined in "ArchiveDir" parameter. Archive path is defined relatively to content of "NookDir" parameter. Copy indexes directories and indexes archive into either other section of server, or other server, or external device.
- Make
iw_adlibitum service configuration backup. To do this, take the following steps:
Go to /opt/iw/tm5/etc directory and open file adlibitum.conf in view mode. A relative path to directory containig iw_adlibitum service configuration is defined in "ConfigDir" parameter. The path is defined relatively to content of "NookDir" parameter. Copy configuration directory into either other section of server, or other server, or external device. To exit the file manager (is required to better control command execution), enter the command:
exit
Install the OS Red Hat Enterprise Linux 7.x on server. To do this, check official instruction. Install Traffic Monitor version 6.11. | Предупреждение |
|---|
| If backup copies are kept on external storages, do not connect them during the installation. It should be done right before DB backup and update. |
- To stop service enter the commands:
iwtm stop service iwtm-php-fpm stop service nagios stop - Depending on DBMS you are using, enter the command to stop the DB:
- To stop
searchd processes, enter the command:
killall searchd To verify, enter the command:
ps -ef | grep searchd | grep -v grep Command respond should not have running processes. - Copy DB backup copy that was created at step 9 b into the original directory.
- Enter command to shift to Traffic Monitor distributive's directory:
cd /root - Update DBMS:
| Раскрыть |
|---|
| - Enter command to start Oracle:
service oracle start Enter command to start Oracle update:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run -- --oracle-upgrade Our example command: bash ./iwtm-installer-6.11.0.630-rhel7.run -- --oracle-upgrade
In case of successful update the following message will be displayed:
Image Removed
| Информация |
|---|
| Oracle DBMS upgrade may take a long time. Approximate timing to update 1 TB Oracle database: - DBMS Oracle will be updated in 60 minutes;
- Oracle database scheme will be updated in 50 minutes.
To perform the update, make sure there is 11 GB of free space in ORACLE_HOME, the default directory of which is /u01/app/oracle. |
Enter command to shift to directory, containing the script (scenario) of DB scheme update.
cd /opt/iw/tm5/csw/oracle Enter command to run script:
su --command "/opt/iw/tm5/csw/oracle/update.sh" oracle
|
| Раскрыть |
|---|
| - If System updates from version 6.9.x:
- Run PostgreSQL DBMS update.
- Enter command to run script (scenario) of the DB scheme update:
su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres
- If System updates from version 6.10.x:
- Enter command to run PostgreSQL:
service postgresql-9.6 start - Run command:
su --command "/usr/pgsql-9.6/bin/psql -d postgres -p 5433 -f /opt/iw/tm5/etc/update_psql_commands" postgres - Enter command to shift to directory containing the script (scenario) of DB scheme update:
cd /opt/iw/tm5/csw/postgres Enter command to run the script:
su --command "/opt/iw/tm5/csw/postgres/update.sh" postgres | Информация |
|---|
| Database scheme update may take a long time. Example: database of size 1 TB will be updated in 95 minutes. To perform the update, make sure there is 12 GB of free space in the root directory. |
|
- Perform step 7 of the instruction to compare the number of events in DB before and after update.
Copy backup copies that were created at step 9b and 9c, into original directories and files. If original directory is not a default one, it needs to be indicated in the appropriate sections of configuration files (see steps 10b and 10c). Enter command to reboot server: reboot Wait until server loading is completed and log in again by performing steps 1-3 of the instruction before updating.
- Enter
- Enter commands to stop services:
systemctl stop iwtm-php-fpm
systemctl stop nginx
systemctl stop nagios
systemctl stop iwtm-consul - Connect the external and internal repositories Red Hat Enterprise Linux 7.
You can check the instruction of local repository setting on Red Hat Enterprise Linux official website. To update packages enter the command:
yum upgrade The following request will be displayed: Image Added
To continue type Y and press Enter. Enter the command to go to the directory containing Traffic Monitor distributives:
cd /root Enter the command to update Traffic Monitor packages:
bash ./iwtm-installer-x.x.x.xxx-rhel7.run Our example command: bash ./iwtm-installer-6.11.0.839-rhel7.run The installer will check the System before running and in case of non-compliance with requirements, it will interrupt the installation and display an error message. In this case you need to correct the error and restart the update. In the window that opens informing that an early version of the InfoWatch Traffic Monitor has been found, choose Update and press Enter:
Image Added
Please wait until the packages update is complete. | Информация |
|---|
| The database scheme update may take a long time. Example: for database of size 1 TB - above 30 minutes. To perform the update, make sure: - There is 11 GB of free space in
ORACLE_HOME, the default directory of which is /u01/app/oracle - for Oracle DBMS; - There is 12 GB of free space in the root directory - for PostgreSQL DBMS.
The message saying that Oracle has been successfully upgraded also says that you can remove the previous Oracle version. You can remove it only after the System has been upgraded and all checks are completed. Before the removal, be sure to check that: - a new version is not installed in the
/u01/app/oracle/product/db_1 directory; - all services of the System are started and running;
- the System condition tab of the TM Console does not contain errors;
- the DB contains old events. To check this, create a query on the Events tab and specify the required interception date;
- the DB receives new events.
To remove the old version, follow commands from the message. |
Enter the command to find and display the list of files with .rpmnew extension at the console:
find / -name "*rpmnew*" -print If the files have been found, they should be correctly merged with configuration files (see "Merging configuration files"). | Информация |
|---|
| To merge successfully the configuration files you should read the following articles on official site: |
Enter the command to call the file manager again:
mc Go to directory /opt/iw/tm5/etc/scripts/ and make sure that there is a file iwssid.lua.upgrade. The System does not use the file iwssid.lua.update, as it is a backup in case the System is to be customised. The file iwssid.lua should be opt/iw/tm5/etc/scripts/ as well. We recommend to keep it as it is, if it has not been edited before update. Otherwise, it should be correctly merged with configuration file iwssid.lua.rpmnew ( see "Merging configuration files"). - To exit the file manager:
exit Enter the command to reboot the server:
reboot Wait until server is loaded and log in again. For this, take the steps 1-3 of the instruction before the updating. | Предупреждение |
|---|
| After the start, Traffic Monitor connects to the database and loads the configuration file cas_config.xml from there. Depending on configuration size, file loading may take some time. During this loading period, the System may record error messages in log files: | Раскрыть |
|---|
| title | /opt/iw/tm5/log/cas_config_compiler.log |
|---|
| | Блок кода |
|---|
| language | js |
|---|
| title | Запись об ошибке вида |
|---|
| linenumbers | true |
|---|
| 1 2019-10-07 17:00:57.351489 (3936:0x00007f4008de8880) [ERROR ] : <Root> Exception:.
Diagnostic information..
/sandbox/src/cas3/config/details/cas_factory.cpp(233): Throw in function bool cas::CasConfigFactory::LoadXmlConfig(cas::ConfigCreator::Ptr&, const boost::filesystem::path&) const
Dynamic exception type: boost::exception_detail::clone_impl<cas::ExceptionCasConfig> |
|
| Раскрыть |
|---|
| title | /opt/iw/tm5/log/cas.log |
|---|
| | Блок кода |
|---|
| language | js |
|---|
| title | Запись об ошибке вида |
|---|
| linenumbers | true |
|---|
| 1 2019-10-03 17:39:13.348146 (14262:0x00007fe83892ba80) [WARNING] : <Root> Prometheus server is off, therefore the statistics is unavailable. That's what you wanted, isn't it?
2 2019-10-03 17:39:14.364655 (14262:0x00007fe83892ba80) [ERROR ] : <Root> Error when loading config of tech: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml
3 2019-10-03 17:39:14.364856 (14262:0x00007fe83892ba80) [ERROR ] : <Root> failed to initialize thrift server
Diagnostic information.
/sandbox/src/cas3/handler.cpp(682): Throw in function cas::Handler::LoadedConfigData cas::Handler::GetLoadedConfigData(const prop::Property&, const Ptr&)
Dynamic exception type: boost::exception_detail::clone_impl<tech::ExceptionTechLoadConfig>
std::exception::what: Cannot open xml file with cas configuration: etc/config/cas/cas_config.xml |
|
After the configuration file has been successfully loaded, the System will stop recording error messages and will work in standard mode. If the System continues to record error messages for a long time, check connection with the database. |
Enter the command to clear cash of packages manager.
yum clean all Enter the command to clear cash: redis-cli flushall
- Enter the command to test check start of processes' start:
iwtm status status List of The processes and their statuses will be displayed. Usually, the services iw_qmover_client, iw iw_qmover_server and iw_image2text_fre_batch are stopped, the rest of services are running. Thereby the strings should have the following endings: "inactive (dead)" for the services iw_qmover_client,iw_qmover_server and iw_image2text_fre_batch and "active (running)" for other services:

| Информация |
|---|
| If the Crawler subsystem is a part of System, it is required to run the services of this subsystem (on Crawler server)on Crawler server): InfoWatch.Crawler.Scanner, InfoWatch.Crawler.Server, Consul Agent. This is to be done on the server, where the subsystem is installed with Windows standard tools: Start - Control Panel - Administrative Tools - Services, then select the service in the list and click Start service. |
Updating Traffic Monitor All-in-one server is completeupdated. Version of the The System version shown in the management Console window About the System window of the Management Console will should be changed accordingly. If the System includes other servers you have other systems or subsystems to be updated, follow instructions in this sectioncheck the instructions of the chapter. | Предупреждение |
|---|
| If automatic synchronizations with LDAP servers are configured in the System, then after update, perform synchronizations manually to guarantee load of entities (see "Infowatch Traffic Monitor. User Guide", "Running Synchronization with Server Manually"). |
| Информация |
|---|
| For the Management Console to Clear the cash before starting, so the Console can be displayed correctly, delete the cache in your browser before you start working in the Management Console. This is done with browser standard tools. Use your browser standard functionalities to perform the action. |
|
|