Installing the ConnectAgent on CentOS / RedHat
Installing on Linux (RedHat based)
This installation has to be performed with root rights.
Before you can begin your installation check if your SELINUX is disabled. Check if the configuration of SELINUX is disabled.
- Open the file /etc/selinux/config
- Check if the option SELINUX is disabled
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
- Restart the machine if SELINUX was not disabled
Check your firewall setting on the local machine. If you are not using the ConnectPlaza Reverse Gateway check your main firewall as well. The machine where the ConnectAgent is installed must have a connection with the internet via port 80 and port 443, the normal HTTP ports.
You can perform a test with telnet to check if your machine can access the internet. Start telnet and try to connect to a machine and port number. See example below.
# telnet www.nu.nl 80
Trying 62.69.166.254...
Connected to nu.nl.
Escape character is '^]'.
If you get above result, you can connect to the selected server at the selected port.
- Install the Adoptium Java version and check the directory of the java executable. You need this path later in the configuration.
Do not use the default OpenJDK version of your platform. This version is not compatible with the ConnectAgent. - You can use the alternatives command to implement the Adoptium Java version as the default version on your machine.
- Copy the ADOPTIUM Java version to /usr/java/<jdk-11.0.14+9>(example).
- Install this alternative with the following command:
alternatives --install /bin/java java /usr/java/jdk-11.0.14+9/bin/java 1
- Set the current alternative version with the command:
And select the java version you want to be current.alternatives --config java ​
- Copy the agent.zip to the installation directory. We use /opt/ to install our agent. If you have more than one agent running on the machine, select a free directory or create one.
- Unzip the agent.zip file. You will end up with a connectplaza-agent directory
# cd /opt
# unzip agent.zip
# ll
-rw-r--r-- 1 root root 121149649 Nov 2 16:19 agent.zip
drwxr-xr-x 11 root root 4096 Nov 1 17:08 connectplaza-agent
drwxr-xr-x. 4 root root 4096 Nov 3 09:32 install
drwxr-xr-x. 2 root root 4096 Mar 26 2015 rh
- Set the execute rights to .sh files
# cd /opt/connectplaza-agent
# find . -name *.sh -type f -exec chmod +x {} \;
- If you did not set the correct java version with the alternatives command, edit the file wrapper.conf in the directory /opt/connectplaza-agent/connectplaza-wrapper/yajsw/conf/. At the end of the file you will find the parameter wrapper.java.command. At the path en filename to the java executable here.
#********************************************************************
# genConfig: further Properties generated by genConfig
#********************************************************************
placeHolderSoGenPropsComeHere=
wrapper.java.command = <path to java executable>/java
wrapper.java.classpath.1 = ./yajsw/wrapper.jar
wrapper.java.classpath.2 = ./yajsw/wrapperApp.jar
wrapper.java.classpath.3 = ./yajsw/lib/core/commons/*
wrapper.java.classpath.4 = ./yajsw/lib/core/jna/*
wrapper.java.classpath.5 = ./yajsw/lib/core/netty/*
wrapper.java.classpath.6 = ./yajsw/lib/core/yajsw/*
wrapper.java.classpath.7 = ./yajsw/lib/extended/abeille/*
wrapper.java.classpath.8 = ./yajsw/lib/extended/commons/*
wrapper.java.classpath.9 = ./yajsw/lib/extended/cron/*
wrapper.java.classpath.10 = ./yajsw/lib/extended/glazedlists/*
wrapper.java.classpath.11 = ./yajsw/lib/extended/groovy/*
wrapper.java.classpath.12 = ./yajsw/lib/extended/jgoodies/*
wrapper.java.classpath.13 = ./yajsw/lib/extended/keystore/*
wrapper.java.classpath.14 = ./yajsw/lib/extended/regex/*
wrapper.java.classpath.15 = ./yajsw/lib/extended/velocity/*
wrapper.java.classpath.16 = ./yajsw/lib/extended/vfs-dbx/*
wrapper.java.classpath.17 = ./yajsw/lib/extended/vfs-webdav/*
wrapper.java.classpath.18 = ./yajsw/lib/extended/yajsw/*
wrapper.java.classpath.19 = ./yajsw/lib/groovy/jasypt/*
wrapper.java.classpath.20 = ./yajsw/lib/groovy/joda/*
wrapper.java.classpath.21 = ./yajsw/lib/groovy/mail/*
wrapper.java.classpath.22 = ./yajsw/lib/groovy/snmp/*
wrapper.java.classpath.23 = ./jars/*.jar
wrapper.java.classpath.24 = ./conf
Installing the ConnectAgent as a Linux service
If you have installed the ConnectAgent and set all the execution rights to the scripts, you are able to install the ConnectAgent as a Linux service. To install the ConnectAgent service run the script below.
# cd bin
# ./installAgentAsAService.sh
CMDOUTPUT: ++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-stable-12.15
OS : Linux/3.10.0-1160.59.1.el7.x86_64/amd64
JVM : Eclipse Adoptium/11.0.14//usr/java/jdk-11.0.14+9/64
************* INSTALLING connectplaza-agent ***********************
Mar 15, 2022 11:53:18 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Mar 15, 2022 11:53:18 AM org.rzo.yajsw.os.posix.PosixService install
WARNING: created daemon script: /etc/systemd/system/connectplaza-agent.service
Service connectplaza-agent installed
modifying service file : /etc/systemd/system/connectplaza-agent.service
As of version 4.1 the init.d scripts are no longer supported. The service to start the ConnectAgent will be moved to the systemd service.
You can now start / stop the ConnectAgent with the following commands:
systemctl start|stop|status connectplaza-agent
But we prefer to start and stop the ConnectAgent with the commands described below.
Starting / Stopping the ConnectAgent and ConnectAgent Service
You can start the ConnectAgent via a terminal session or via the Linux service. If the service is installed, the command will start/stop the service. Otherwise the command runs the ConnectAgent as a normal command.
Starting / stopping with the start-up script
Starting the ConnectAgent via the start-up script is ideal for testing purposes. Start the ConnectAgent with the following command.
# cd /opt/connectplaza-agent/bin
# ./agent.sh start
When the service is started you will see the following lines at the end of the log.
22-03-15 11:55:21|FINEST| .11:55:21.776 [waitForStartUp] INFO c.c.a.s.ConnectPlazaAdapterExtender - Agent startup complete.
22-03-15 11:55:37|FINEST| Absolute path version.xml : /opt/connect-agent/agent-4.2.0/version.xml
You can stop the ConnectAgent with the following command:
./agent.sh stop
Getting the status of the ConnectAgent service
There are two ways to get the status of the ConnectAgent service.
You can check the service using the status option of the service command. The service will provide you with extra information about the connectplaza-agent service.
[root@centos7 bin]# systemctl status connectplaza-agent
â— connectplaza-agent.service - ConnectPlaza Agent
Loaded: loaded (/etc/systemd/system/connectplaza-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2022-03-15 11:55:00 CET; 2min 28s ago
Docs: http://yajsw.sourceforge.net/
Process: 3233 ExecStart=/usr/java/jdk-11.0.14+9/bin/java -Dwrapper.pidfile=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid -Dwrapper.service=true -Dwrapper.visible=false -Djna_tmpdir=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/../../temp/yajsw-updater -Dwrapper_home=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw -Dwrapper.working.dir=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/.. -jar /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/yajsw/wrapper.jar -tx /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/yajsw/conf/wrapper.conf (code=exited, status=0/SUCCESS)
Main PID: 3256 (java)
CGroup: /system.slice/connectplaza-agent.service
├─3256 /usr/java/jdk-11.0.14+9/bin/java -Dwrapper.pidfile=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid -Dwrapper.service=true -Dwrapper.visible=false -Dj...
├─3280 /usr/java/jdk-11.0.14+9/bin/java -classpath /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/yajsw/wrapperApp.jar:/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/conn...
└─3354 /usr/java/jdk-11.0.14+9/bin/java -cp :/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/jars/*:/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/conf:/opt/connect-agent/agent-paoomgeving-420...
Mar 15 11:54:57 centos7.localhost java[3233]: Mar 15, 2022 11:54:57 AM org.rzo.yajsw.os.posix.PosixService startProcess
Mar 15 11:54:57 centos7.localhost java[3233]: INFO: calling /usr/java/jdk-11.0.14+9/bin/java -Dwrapper.pidfile=/opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-a...-420RC1-C7/agent/
Mar 15 11:54:57 centos7.localhost java[3233]: Mar 15, 2022 11:54:57 AM org.rzo.yajsw.os.posix.PosixService getPid
Mar 15 11:54:57 centos7.localhost java[3233]: INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Mar 15 11:54:59 centos7.localhost java[3233]: Mar 15, 2022 11:54:59 AM org.rzo.yajsw.os.posix.PosixService getPid
Mar 15 11:54:59 centos7.localhost java[3233]: INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Mar 15 11:54:59 centos7.localhost java[3233]: Mar 15, 2022 11:54:59 AM org.rzo.yajsw.os.posix.PosixService getPid
Mar 15 11:54:59 centos7.localhost java[3233]: INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Mar 15 11:54:59 centos7.localhost java[3233]: Service connectplaza-agent started
Mar 15 11:55:00 centos7.localhost systemd[1]: Started ConnectPlaza Agent.
Hint: Some lines were ellipsized, use -l to show in full.
If you want some more information about the ConnectAgent, you can run the queryAgentService.sh command in the <ConnectPlaza Install Directory>/bin/ directory
[root@centos7 bin]# ./queryAgentService.sh
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-stable-12.15
OS : Linux/3.10.0-1160.59.1.el7.x86_64/amd64
JVM : Eclipse Adoptium/11.0.14//usr/java/jdk-11.0.14+9/64
Mar 15, 2022 11:58:08 AM org.rzo.yajsw.os.posix.PosixService init
INFO: /etc/systemd/system/connectplaza-agent.service already exists
Mar 15, 2022 11:58:08 AM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Name : connectplaza-agent
Installed : true
Running : true
Interactive : false
Automatic : false
Manual : false
Disabled : false
Paused : false
Unknown : false
Above information will be presented to you.
Uninstalling the ConnectAgent service
Follow the next steps to uninstall the ConnectAgent.
- Go to the directory <ConnectPlaza installation directory>/bin
- Uninstall the service with
[root@centos7 bin]# ./uninstallAgentService.sh
daemondir = /etc/systemd/system
servicename = connectplaza-agent
user =
group=
killmode= control-group
KillMode= set to control-group
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
++++++++++ YAJSW SET ENV ++++++++++
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
wrapper home : /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw
configuration: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent/connectplaza-wrapper/yajsw/conf/wrapper.conf
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-stable-12.15
OS : Linux/3.10.0-1160.59.1.el7.x86_64/amd64
JVM : Eclipse Adoptium/11.0.14//usr/java/jdk-11.0.14+9/64
Mar 15, 2022 11:59:54 AM org.rzo.yajsw.os.posix.PosixService init
INFO: /etc/systemd/system/connectplaza-agent.service already exists
************* REMOVING connectplaza-agent ***********************
Mar 15, 2022 12:00:02 PM org.rzo.yajsw.os.posix.PosixService stop
INFO:
Mar 15, 2022 12:00:02 PM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Mar 15, 2022 12:00:02 PM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /opt/connect-agent/agent-paoomgeving-420RC1-C7/agent-4.2.0.RC1/connectplaza-wrapper/wrapper.connectplaza-agent.pid
Service connectplaza-agent removed
Installing multiple ConnectAgents on a single server
Installing multiple ConnectAgents on a single server is possible, but requires some configuration changes done by the user before installing the service. Mainly because port numbers will overlap and service names must be different.
Installing the second ConnectAgent
Register a new end-user and download the agent.zip file. Using the generated .zip file, set the correct port numbers for your new agent. Place the agent.zip file in a predefined directory where you can unzip the agent.zip file.
For instance, we place the file in the predefined directory /opt/install/, and unzip the file.
# cd /opt/install
# unzip agent.zip
# mv connectplaza-agent /opt/connectplaza-agent-2
# cd /opt/connectplaza-agent-2
# find . -name *.sh -type f -exec chmod +x {} \;
Modifying the configuration files
We have to make two changes within some configuration files.
- conf/connectplaza-agent.properties
We have to make some changes in the ConnectPlaza configuration file. Mainly because some port numbers will overlap and the ConnectAgent will not start. We will modify the following configuration file.
-
conf/connectplaza-agent.properties
- connectplaza-wrapper/yajsw/conf/wrapper.conf
connectplaza-agent.properties
String | Change |
connect.mbean.server.connector.url=service:jmx.jmxmp://localhost:9876 | Uncomment this line and change the port number |
wrapper.conf
String | Change |
wrapper.ntservice.name | connectplaza-agent-2 |
wrapper.ntservice.displayname | ConnectPlaza Agent 2 |
wrapper.ntservice.description | ConnectPlaza Agent 2 |
Installing the second systemd script
Just install the script with the default install script for the systemd service.
# cd /opt/connectplaza-agent-2/bin
# ./installAgentAsAService.sh
Starting the second agent
Start the second ConnectAgent by starting the service.
# systemctl start connectplaza-agent-2
Installing the service with init.d on a system with systemd
It is possible to use the old init.d installation for the service on a system with systemd installed. It is not advised, but if you want to do it, you have to change the wrapper.conf configuration file.
Open the file connectplaza-wrapper/yajsw/conf/wrapper.conf and uncomment (remove the #) the following line:
# wrapper.daemon.system = initd