Loading...

Installing the ConnectAgent on CentOS / RedHat

Table of Contents

    Installing on Linux CentOS / Red Hat

    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 at the local machine, and if you are not using the MyESB Reverse Gateway check your main firewall as well, click this link for more information about firewalls.

    You can perform a test with telnet to check if your machine is accessible from the outside. Start telnet on a separate outside network and try to connect to the 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 your server at the selected port.

    • 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.
    • Unzip the agent.zip file. You will end up with a myesb-connect-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
    # chmod +x bin/*.sh
    # chmod +x myesb-connect-wrapper/yajsw/bin/*.sh
    # chmod +x yajsw/bin/*.sh

    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
    ++++++++++ YAJSW SET ENV ++++++++++
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    wrapper home : /opt/connectplaza-agent/myesb-connect-wrapper/yajsw
    configuration: /opt/connectplaza-agent/myesb-connect-wrapper/yajsw/conf/wrapper.conf
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    ---------- YAJSW SET ENV ----------
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    Nov 03, 2016 9:50:51 AM org.apache.commons.vfs2.VfsLog info
    INFO: Using "/tmp/vfs_cache" as temporary files store.
    ************* INSTALLING connectAgentUpdater ***********************
    
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    WARNING: created daemon script: /etc/rc.d/init.d/connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc3.d/S20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc4.d/S20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc2.d/S20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc5.d/S20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc1.d/K20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc6.d/K20connectAgentUpdater
    Nov 03, 2016 9:50:51 AM org.rzo.yajsw.os.posix.PosixService install
    INFO: created link : /etc/rc0.d/K20connectAgentUpdater
    Service connectAgentUpdater installed
    

    The service has been created. The file has been placed in the /etc/init.d directory as service connectAgentUpdater.

    service connectAgentUpdater start|stop|restart|status

    Starting / Stopping the ConnectAgent

    You can start the ConnectAgent via a terminal session or via the Linux service

    Starting / stopping with the startup script

    Starting the ConnectAgent via the startup script is ideal for testing purposes. Start the ConnectAgent with the following command.

    # cd /opt/connectplaza-agent
    # ./bin/runAgent.sh

    When the service is started you will see

    Absolute path version.xml : /opt/connectplaza-agent/./version.xml

    at the last line on your screen.

    Stopping the agent will be done by pressing .

    You will get some java errors on the screen while stopping the service. But that is expected behaviour.

    Starting / stopping the connectAgent service

    Start the service with the next command.

    Starting connectAgentUpdater ...
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    Nov 03, 2016 2:22:36 PM org.apache.commons.vfs2.VfsLog info
    INFO: Using "/tmp/vfs_cache" as temporary files store.
    Nov 03, 2016 2:22:36 PM org.rzo.yajsw.os.posix.PosixService init
    INFO: /etc/init.d/connectAgentUpdater already exists
    ************* STARTING connectAgentUpdater ***********************
    
    Nov 03, 2016 2:22:36 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Nov 03, 2016 2:22:36 PM org.rzo.yajsw.os.posix.PosixService startProcess
    INFO: calling java -Dwrapper.pidfile=/opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid -Dwrapper.service=true -Dwrapper.visible=false
    -Djna_tmpdir=/opt/connectplaza-agent/myesb-connect-wrapper/yajsw/../../temp/yajsw-updater -Dwrapper_home=/opt/connectplaza-agent/myesb-connect-wrapper/yajsw -Dwrapper.working.dir=/opt/connectplaza-agent/myesb-connect-wrapper/yajsw/.. 
    -jar /opt/connectplaza-agent/myesb-connect-wrapper/yajsw/wrapper.jar -c /opt/connectplaza-agent/myesb-connect-wrapper/yajsw/conf/wrapper.conf
    Nov 03, 2016 2:22:36 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Nov 03, 2016 2:22:38 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Nov 03, 2016 2:22:38 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Service connectAgentUpdater started
    

    It can take a while for the agent to start up. Check in the log files at logs/connectAgent.log if de agent is fully started.

    Stop the service with the next command.

    # service connectAgentUpdater 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 connectAgentUpdater service.

    # service connectAgentUpdater status
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    Nov 03, 2016 2:28:13 PM org.apache.commons.vfs2.VfsLog info
    INFO: Using "/tmp/vfs_cache" as temporary files store.
    Nov 03, 2016 2:28:13 PM org.rzo.yajsw.os.posix.PosixService init
    INFO: /etc/init.d/connectAgentUpdater already exists
    Nov 03, 2016 2:28:13 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    

    If you want some more information about the connectAgent, you can run the queryDaemon.sh command in the <connectplazainstalldirectory>/bin/ directory

    # cd /opt/connectplaza-agent/bin
    # ./queryDaemon.sh
    ++++++++++ YAJSW SET ENV ++++++++++
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    wrapper home : /opt/connectplaza-agent/myesb-connect-wrapper/yajsw
    configuration: /opt/connectplaza-agent/myesb-connect-wrapper/yajsw/conf/wrapper.conf
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    ---------- YAJSW SET ENV ----------
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    Nov 03, 2016 2:33:12 PM org.apache.commons.vfs2.VfsLog info
    INFO: Using "/tmp/vfs_cache" as temporary files store.
    Nov 03, 2016 2:33:12 PM org.rzo.yajsw.os.posix.PosixService init
    INFO: /etc/init.d/connectAgentUpdater already exists
    Nov 03, 2016 2:33:12 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Name        : connectAgentUpdater
    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

    Uninstalling the agent is very simple. Follow the next steps to uninstall the ConnectAgent.

    • Stop the ConnectAgent
    • Go to the directory bin
    • Run the uninstaller
    # cd /opt/connectplaza-agent/bin
    # ./uninstallAgentService.sh
    ++++++++++ YAJSW SET ENV ++++++++++
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    wrapper home : /opt/connectplaza-agent/myesb-connect-wrapper/yajsw
    configuration: /opt/connectplaza-agent/myesb-connect-wrapper/yajsw/conf/wrapper.conf
    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
    Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
    ---------- YAJSW SET ENV ----------
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    Nov 03, 2016 2:33:41 PM org.apache.commons.vfs2.VfsLog info
    INFO: Using "/tmp/vfs_cache" as temporary files store.
    Nov 03, 2016 2:33:41 PM org.rzo.yajsw.os.posix.PosixService init
    INFO: /etc/init.d/connectAgentUpdater already exists
    ************* REMOVING connectAgentUpdater ***********************
    
    Nov 03, 2016 2:33:42 PM org.rzo.yajsw.os.posix.PosixService stop
    INFO: Stopping connectAgentUpdater ...
    YAJSW: yajsw-beta-12.04
    OS   : Linux/2.6.32-642.6.2.el6.x86_64/amd64
    JVM  : Oracle Corporation/1.8.0_40//usr/java/jdk1.8.0_40/jre/64
    ************* STOPPING connectAgentUpdater ***********************
    
    Service connectAgentUpdater stopped
    
    Nov 03, 2016 2:33:42 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Nov 03, 2016 2:33:42 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/connectplaza-agent/myesb-connect-wrapper/wrapper.connectAgentUpdater.pid
    Service connectAgentUpdater removed
    

    Installing multiple connectAgent on a single server

    Installing multiple ConnectAgents on a single server is possible, but requires some post configuration by the installer before starting the ConnectAgent. Mainly because port number will overlap. After all port numbers have been modified, we have to add a new service for Linux.

    Installing the second ConnectAgent

    Register a new end-user and download the agent.zip file. 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/secondagent/. Check the next example.

    # cd /opt/secondagent
    # unzip agent.zip
    # cd connectplaza-agent
    # chmod +x bin/*.sh
    # chmod +x myesb-connect-wrapper/yajsw/bin/*.sh
    # chmod +x yajsw/bin/*.sh

     

    Modifying the configuration files

    Now it is time to edit the configuration files. There are a few configurations we have to edit. Mainly because port numbers will overlap and the ConnectAgent will nog start. We will modify the following configuration files.

    • conf/connectplaza-agent.properties

    • myesb-connect-wrapper/yajsw/conf/wrapper.conf
    • 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 (myesb-connect-wrapper)

     

    String

    Change

    wrapper.app.parameter.4 = 15004

    Change port number

     

    wrapper.conf (yajsw)

     

    String

    Change

    wrapper.jmx.rmi.port =

    Uncomment and add free port number

     

    Configuring a second service script

    Because you cannot install the second ConnectAgent as a service with the install script we have to create one manually. You can do this with the next procedure.

    • Go to the directory /etc/init.d
    • Copy the file connectAgentUpdater to another file i.e. secondConnectAgentUpdater
    • Modify the script to reflect the second ConnectAgent
    • Add the script to the start-up sequence of Linux
    # cd /etc/init.d
    # cp connectAgentUpdater secondConnectAgentUpdater
    # vim secondConnectAgentUpdater
    • Within VIM, use the following commands to modify the script.
    :%s/\/opt\/connectplaza-agent\//\/opt\/secondagent\/connectplaza-agent\//g
    :%s/wrapper.connectAgentUpdater.pid/wrapper.secondConnectAgentUpdater.pid/g
    • Run the next commands to add the service to the start-up sequence of your Linux machine.
    # chkconfig --add secondConnectAgentUpdater
    # chkconfig secondConnectAgentUpdater on

    Starting the second agent

    Start the second ConnectAgent by starting the service.

    # service secondConnectAgentUpdater start

     


    Copyright © 2018 ConnectPlaza.   For pricing, account management and more go to https://www.connectplaza.com

    About Connectplaza

    Si components version:   

    Lorem ipsum delore set

    Lorem ipsum delore set

    Window size is not optimal. Please enlarge for optimal experience

    No connection

    No response from the server. This window will automaticly disappear by an valid connection