Configuring Remote Installation of HVR on Unix or Linux
This section describes the configuration required for a remote installation of HVR (also known as HVR remote agent) on Unix/Linux. These configuration steps are required either when:
- connecting from an HVR Hub to an HVR remote agent on the Source (capture) or Target (integrate) server,
- connecting from a PC (using HVR GUI) to an HVR Hub installed on a Unix/Linux server.
For connecting to a HVR remote agent installed on a Unix/Linux server, configure the system process (daemon) available on the remote Unix/Linux server. Also, an HVR listener port must be configured on the server running the HVR remote agent. Pick an arbitrary TCP/IP port number between 1024 and 65535 which is not already in use. We suggest using 4343 as the HVR listener port number and the following examples throughout this section will reference this port number.
An alternative method for connecting to a remote installation of HVR is by using the command hvrremotelistener. For more information, see section Using Hvrremotelistener below.
Using Unix/Linux Daemon
Depending on the daemon type available, one of the following configuration methods can be used to invoke HVR installed on a remote server:
If the above mentioned daemons are not available then use the alternate configuration method described in section Configuring Init below.
The values used for HVR_HOME, HVR_CONFIG and HVR_TMP are for the current machine.
Configuring systemd
The following steps should be performed as user root to configure systemd:
Create the systemd unit files hvr.socket and hvr@.service in /etc/systemd/system directory.
hvr.socket should contain the following:
[Unit] Description=HVR service socket [Socket] ListenStream=4343 Accept=true TriggerLimitIntervalSec=1s TriggerLimitBurst=10000 MaxConnectionsPerSource=100 MaxConnections=500 KeepAlive=true [Install] WantedBy=sockets.target
- TriggerLimitIntervalSec is supported since systemd version 230.
- TriggerLimitBurst is supported since systemd version 230.
- MaxConnectionsPerSource is supported since systemd version 232.
When using IPv4 in a IPv4/IPv6 mixed system or if IPv4 based restrictions are defined in the access_conf.xml file (see Hvrremotelistener), set ListenStream=0.0.0.0:4343 to force systemd to use IPv4.
hvr@.service should contain the following:
[Unit] Description=HVR service [Service] Environment="HVR_HOME=/home/hvruser/hvr/hvr_home" Environment="HVR_CONFIG=/home/hvruser/hvr/hvr_config" Environment="HVR_TMP=/home/hvruser/hvr/hvr_tmp" User=root ExecStart=/home/hvruser/hvr/hvr_home/bin/hvr -r StandardInput=socket KillMode=process TimeoutStartSec=infinity [Install] WantedBy=multi-user.target
Option –r tells hvr to run as a remote child process. For more options (like encryption, PAM) that can be supplied as the server program arguments (ExecStart), see command Hvr.
To enable and start the service, execute the following commands:
systemctl enable hvr.socket
systemctl start hvr.socket
To verify whether the service is active, execute the following command:
systemctl status hvr.socket
Sample output:
hvr.socket - HVR service socket Loaded: loaded (/etc/systemd/system/hvr.socket; enabled; vendor preset: enabled) Active: active (listening) since Mon 2019-07-08 17:54:44 CEST; 5s ago Listen: [::]:4343 (Stream) Accepted: 0; Connected: 0
Configuring xinetd
The following steps should be performed to configure xinetd:
Create /etc/xinetd.d/hvr file with the following content in it:
service hvr { socket_type = stream wait = no user = root server = /home/hvruser/hvr/hvr_home/bin/hvr server_args = -r env += HVR_HOME=/home/hvruser/hvr/hvr_home env += HVR_CONFIG=/home/hvruser/hvr/hvr_config env += HVR_TMP=/home/hvruser/hvr/hvr_tmp disable = no cps = 10000 30 per_source = 100 instances = 500 }
Option –r tells hvr to run as a remote child process. For more options (like encryption, PAM) that can be supplied as the server program arguments (server_args), see command Hvr.
The name of the xinetd service for HVR (created in the previous step) and the TCP/IP port number for HVR listener should be added to /etc/services:
hvr 4343/tcp #Port for the remote installation of HVR
Reload or restart the xinetd service to apply the changes. For information about restarting the xinetd service, refer to the operating system documentation.
Configuring inetd
The following steps should be performed to configure inetd:
For generic Unix, the following line should be added to /etc/inetd.conf:
hvr stream tcp nowait root /home/hvruser/hvr/hvr_home/bin/hvr hvr -r -EHVR_HOME=/home/hvruser/hvr/hvr_home -EHVR_CONFIG=/home/hvruser/hvr/hvr_config -EHVR_TMP=/home/hvruser/hvr/hvr_tmp
Option –r tells hvr to run as a remote child process and -E defines the environment variables. For more options (like encryption, PAM) that can be supplied as the server program arguments, see command Hvr.
For Solaris version 10 and higher, the file /etc/inetd.conf must be imported into System Management Facility (SMF) using the command inetconv.
The name of the inetd service for HVR (created in the previous step) and the TCP/IP port number for HVR listener should be added to /etc/services:
hvr 4343/tcp #Port for remote installation of HVR
Reload or restart the inetd service to apply the changes. For information about restarting the inetd service, refer to the operating system documentation.
Configuring Init
This method requires HVR's script file hvr_boot (available in hvr_home/lib) and a user-defined configuration file hvrtab.
The script file hvr_boot allows you to start and stop HVR processes (both HVR Scheduler and HVR Remote Listener) defined in the configuration file hvrtab. The script file hvr_boot should only be executed by the root user.
The following steps should be performed as user root to configure init:
Create the configuration file hvrtab in the /etc directory. Each line of this configuration file should contain four or more parameters separated by a space in the following format:
username port_or_hub hvr_home hvr_config [options]
- username: Indicates the Unix/Linux username under which HVR runs.
- port_or_hub: Indicates a TCP/IP port number (for HVR Remote Listener) or the username and password of the hub database (for HVR Scheduler). The DB connection string syntax for the hub database differs for each database. For DB connection string syntax, see Calling HVR on the Command Line.
- hvr_home: Indicates the path for $HVR_HOME.
- hvr_config: Indicates the path for $HVR_CONFIG.
- [options]: Indicates an optional parameter to pass other options to the HVR process. For more information about the options, see hvrremotelistener and hvrscheduler.
Sample configuration file:
# This hvrtab file starts a Remote Listener and two HVR schedulers (one for an Oracle hub and one for an Ingres hub). # The Oracle password is encrypted. For more information, see documentation for command hvrcrypt. root 4343 /home/hvruser/hvr/hvr_home /home/hvruser/hvr/hvr_config mylinuxuser orahubdb/!{DszmZY}! /home/hvruser/hvr/hvr_home /home/hvruser/hvr/hvr_config -EHVR_TMP=/home/hvruser/hvr/hvr_tmp -EORACLE_HOME=/opt/oracle -EORACLE_SID=prod mylinuxuser inghubdb /home/hvruser/hvr/hvr_home /home/hvruser/hvr/hvr_config -EHVR_TMP=/home/hvruser/hvr/hvr_tmp -EII_SYSTEM=/opt/ingres -EHVR_PUBLIC_PORT=50001
Lines starting with a hash (#) are treated as comments.
Copy the script file hvr_boot (available in hvr_home/lib) to the init.d directory and create symlinks to the rc.d directory.
For an Oracle RAC, the script file hvr_boot can be enrolled in the cluster with command crs_profile.
The following example uses start sequence 97 and stop sequence 03 (except HP–UX which uses 997 and 003 because it requires three digits).
On AIX, to start and stop HVR for run level 2:
cp hvr_boot /etc/rc.d/init.d
ln -s /etc/rc.d/init.d/hvr_boot /etc/rc.d/rc2.d/S97hvr_boot
ln -s /etc/rc.d/init.d/hvr_boot /etc/rc.d/rc2.d/K03hvr_boot
On HP–UX, to start and stop HVR for run level 3:
cp hvr_boot /sbin/init.d
ln -s /sbin/init.d/hvr_boot /sbin/rc3.d/S997hvr_boot
ln -s /sbin/init.d/hvr_boot /sbin/rc3.d/K003hvr_boot
On Linux, to start HVR for run levels 3 and 5 and stop for all run levels:
cp hvr_boot /etc/init.d
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc3.d/S97hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc5.d/S97hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc0.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc1.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc2.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc3.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc4.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc5.d/K03hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc.d/rc6.d/K03hvr_boot
On Solaris 8 or 9, to start and stop HVR for run level 2 (which implies level 3):
cp hvr_boot /etc/init.d
ln -s /etc/init.d/hvr_boot /etc/rc2.d/S97hvr_boot
ln -s /etc/init.d/hvr_boot /etc/rc2.d/K03hvr_boot
On Solaris 10 and higher;
For newer Solaris versions, the script file hvr_boot must be registered in the Solaris's System Management Facility (SMF). Also, the file hvr_boot.xml (available in hvr_home/lib) should be copied to the init.d directory.
cp /opt/hvr/hvr_home/lib/hvr_boot /lib/svc/method
cp /opt/hvr/hvr_home/lib/hvr_boot.xml /var/svc/manifest/application
svccfg
import /var/svc/manifest/application/hvr_boot.xml
quit
svcadm enable svc:/application/hvr_boot
To check if the service is running:
svcs -a|grep hvr
Sample output:
16:00:29 svc:/application/hvr_boot:default
Security Notes
On systems where restricted security is configured, it may be necessary to add the following line to file /etc/hosts.allow :
hvr: ALL
It may be necessary to disable Security Enhanced Linux (SELinux). To disable SELinux, the following line should be available/added into the file /etc/selinux.conf and then reboot the server.
SELINUX=disable
To see the status of SELinux, use the Linux command sestatus.
Using Hvremotelistener
In this method, for connecting to a remote installation of HVR, the command hvrremotelistener should be executed on the remote server. This method is preferred when:
- the Linux xinetd package is not installed (this is the case for RHEL5) or
- the root privilege is unavailable or
- the password authentication cannot be configured
The following command uses options –d (run as daemon) and -N (skip password authentication) to listen on port 4343.
hvrremotelistener -d -N 4343
The following command uses option –i (interactive) and -N (skip password authentication) to listen on port 4343. Note that, in this method exiting the shell will terminate the remote listener.
hvrremotelistener -i -N 4343
Disabling password authentication (option -N) is a security hole, but may be useful as a temporary or troubleshooting measure.
Testing Connection to a Remote Installation of HVR
To test the connection, execute the command hvrtestlistener on the server from which you are connecting to a remote installation of HVR:
hvrtestlistener node port
Example:
hvrtestlistener myintegratenode 4343
If authorization (username and password) is required to connect to the remote server then use the command hvrtestlistener with option -L. For example,
hvrtestlistener -L myusername/mypassword myintegratenode 4343
Sample Output:
hvrtestlistener: HVR 5.6.0/0 (windows-x64-64bit) hvrtestlistener: Connection with authorization to myintegradenode:4343 successful. hvrtestlistener: Finished. (elapsed=0.22s)