Skip to content

HA Configure

DeepFinder HA Configuration

DeepFinder Manager supports HA (High Availability) configuration for the Server and PostgreSQL, allowing the Standby server to take over immediately in case of an Active server failure.
When HA is configured, if the Active server fails (due to network disconnection, hardware failure, etc.), the Standby server will automatically failover to become the Active server, and all Agents will re-establish communication with the new Active server.

Server Process HA Configuration

1) Download the installation file
Download the DeepFinder Manager Server installation file from the repository.

[root@localhost~]# wget http://download.deepfinder.co.kr/DeepFinder/dfServer/DFServer.tar.gz


2) Decompress the file
Decompress the downloaded installation file.

[root@localhost~]# tar xvfz DFServer.tar.gz


3)  Run the script
Navigate into the decompressed DFServer directory and run the installation script.

[root@localhost~]# cd DFServer
[root@localhost~]# ./setup.sh CHECK OS BIT : x86_64 (64 bit) CHECK OS : Linux CHECK LINUX : Unknown  Linux Failed to enable unit: Unit file deepfinder.service does not exist. request license with this info INFO : IP  : 192.168.3.58 INFO : Mac : BC:24:11:6D:50:52 1. modify config.xml 2. cp license.txt /usr/local/dfserver/license/ 3. service dfserver start

Server Active Installation

[root@localhost DFServer]# ./ha.sh master 192.168.3.8
Redirecting to /bin/systemctl restart dfserver.service

Server Standby Installation

[root@localhost DFServer]# ./ha.sh slave 192.168.3.58
Redirecting to /bin/systemctl restart dfserver.service

Postgres HA Configuration

1) Open Postgres Port
To allow PostgreSQL communication between the Active and Standby servers, you must allow TCP Port 5432 as Inbound in the firewall of each server.

Danger

When opening Inbound port 5432, you must configure the security policy to allow traffic only from the IP address of the other server.

2) Postgres Active Server Installation

[root@localhost DFDB]# ./setup_postgres.sh master

installing... /usr/local/dfserver/postgres
Started DeepFinder Server DB installation.
Copying ./postgres ...
Create system account user 'postgres' ...
Make postgres startup script for DeepFinder ...


Startup postgres for DeepFinder ...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "ko_KR.UTF-8".
initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8"
The default text search configuration will be set to "simple".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/dfserver/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

3) Postgres Standby Server Installation

[root@localhost DFDB]# ./setup_postgres.sh slave 192.168.3.58

installing... /usr/local/dfserver/postgres
Started DeepFinder Server DB installation.
Copying ./postgres ...
Create system account user 'postgres' ...
Make postgres startup script for DeepFinder ...


Startup postgres for DeepFinder ...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "ko_KR.UTF-8".
initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8"
The default text search configuration will be set to "simple".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/dfserver/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

4) Modify pg_hba.conf

To allow PostgreSQL communication between the Active and Standby servers, you must modify the pg_hba.conf file on both servers.
In each server's pg_hba.conf file, add the IP address of the other server as a host entry.
After modifying, restart the dfserver-postgres service to apply the changes.

[root@ip-172-31-12-31 ~]# cat /usr/local/dfserver/postgres/data/pg_hba.conf
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
host    all             all             172.31.12.32             trust # DeepFinder HA communication (IP of the other server)
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust


[root@ip-172-31-12-31 ~]# service dfserver-postgres restart
Stopping PostgreSQL 10.5:
waiting for server to shut down.... done
server stopped
Starting PostgreSQL 10.5:
waiting for server to start.... done
server started
PostgreSQL 10.5 started successfully

License Verification

Check Manager License
Once the Manager HA configuration is complete, an 'HA Server Info' item will be displayed in the license information under [Environment Management] - [Environment Settings].