Installing the ConnectAgent on Windows Server 2012R2

Installing the ConnectAgent on Windows Server 2012R2

Installation on Windows server 2012R2

This installation has to be performed with administrator rights.

Register a new connectAgent (end user license) at the ConnectPlaza website. Go to Deploy for this end user and generate a new ConnectAgent. Remember to use different portnumbers for internal portnumber and external poortnumber. I.E. if you have used the numbers 8088 and 8443 in a previous install, do not use those numbers again. 

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.

C:\> telnet www.nu.nl 80

If you get a blank screen, you can connect to your server at the selected port. No errors should appear.
•    Copy the agent.zip to the installation directory. We use c:\wrk for example to install our agent. If you have more than one agent running on the machine, select or create a free directory.
•    Unzip the agent.zip file. You will end up with a connectplaza-agent directory

Installing the connectAgent as a Windows service

If you have unpacked the ConnectAgent, you are able to install the ConnectAgent as a Windows  service. To install the connectAgentUpdater service run the script below with the option Run as administrator.
  


Or open a command window as an administrator, and run the command via this window. The following result should be on your screen:  

The service has been created. You can see this in your system services overview.

Starting / Stopping the connectAgent

You can start the ConnectAgent via a command box or via the Windows Services application

Starting / Stopping with the runAgent.bat script

Starting the ConnectAgent via a script is ideal for testing purposes. Start the ConnectAgent with the following command via a command box. Be sure you have started the command box to Run as administrator.

C:\> cd <ConnectPlaza Install Directory>\bat
C:\> runAgent.bat

 When the connectAgent is started you will see 

.13:06:52.227 [waitForStartUp] INFO  c.o.myesb.agent.MyESBAdapterExtender - Agent startup complete.
 Absolute path version.xml : C:\wrk\winclient-1-agent\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 connectAgentUpdater service

Start the service via the configuration screen for services, MMC.
•    Open a command box as an administrator
•    Execute the program mmc by typing mmc at the prompt and the following screen will appear:



 
•    Select the menu option File --> Add/Remove Snap-In.. to add a module to the Microsoft Management Console and select the module SERVICES and add it to the selected modules.


 

You can start / stop and restart the MyESB ConnectAgent Updater from here.
It can take a while for the agent to start up. Check in the log files at <ConnectPlaza Install Directory>\logs\connectplaza-agent.log, if the agent is fully started.

Getting the status of the ConnectAgent service

You can check the status of the ConnectAgent running the following command via a command box.
•    Open an command screen as an administrator
•    Go to the bat directory, via the following command and query the agent for its status.

C:\wrk\winclient-1-agent\connectplaza-agent\bat>queryService.bat
**********************************************************************************
* This script will perform a query on the connectAgentUpdater service and return *
* information if the service has been installed, if it is running and the        *
* way the service has been configured to run.                                    *
**********************************************************************************

"java" -Xmx30m -Djna_tmpdir="C:\wrk\winclient-1-agent\connectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../tmp" -Djava.net.preferIPv4Stack=true -jar "C:\wrk\winclient-1-agent\con
nectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../wrapper.jar" -q "C:\wrk\winclient-1-agent\connectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../conf/wrapper.conf"
YAJSW: yajsw-beta-12.04
OS   : Windows Server 2012 R2/6.3/amd64
JVM  : Oracle Corporation/1.8.0_191/C:\Program Files\Java\jre1.8.0_191/64
jan 15, 2019 1:12:59 PM org.apache.commons.vfs2.VfsLog info
INFO: Using "C:\Users\ADMINI~1\AppData\Local\Temp\3\vfs_cache" as temporary files store.
Name        : connectAgentUpdater
Installed   : true
Running     : false
Interactive : false
Automatic   : true
Manual      : false
Disabled    : false
Paused      : false
Unknown      : false

C:\wrk\winclient-1-agent\agent\connectplaza-agent\bat>

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. This can be done via the Windows Services application
•    Go to the directory \bat
•    Run the uninstaller as an administrator

C:\wrk\winclient-1-agent\connectplaza-agent\bat>uninstallAgentService.bat
**********************************************************************************
* Uninstalling the MyESB ConnectAgentUpdater service inside Windows              *
* If the connectAgentUpdater is not installed as a service this script will      *
* return a "NOT removed" message at the end                                      *
**********************************************************************************

"java" -Xmx30m -Djna_tmpdir="C:\wrk\winclient-1-agent\connectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../tmp" -Djava.net.preferIPv4Stack=true -jar "C:\wrk\winclient-1-agent\con
nectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../wrapper.jar" -r "C:\wrk\winclient-1-agent\connectplaza-agent\myesb-connect-wrapper\yajsw\bat\/../conf/wrapper.conf"
YAJSW: yajsw-beta-12.04
OS   : Windows Server 2012 R2/6.3/amd64
JVM  : Oracle Corporation/1.8.0_191/C:\Program Files\Java\jre1.8.0_191/64
jan 15, 2019 1:13:52 PM org.apache.commons.vfs2.VfsLog info
INFO: Using "C:\Users\ADMINI~1\AppData\Local\Temp\3\vfs_cache" as temporary files store.
************* REMOVING connectAgentUpdater ***********************

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 Windows.

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 c:\data\winclient-2-agent.
 
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 (directory myesb-connect-wrapper)

String

Change

wrapper.console.title=ConnectPlaza Agent updater

Change the console title

 

wrapper.ntservice.name=connectAgentUpdater

Change the service name

wrapper.ntservice.description=ConnectPlaza Agent Updater

Change the description

wrapper.app.parameter.4 = 15004

Change port number

wrapper.jmx.rmi.port = 1099

Change port number

wrapper.ntservice.displayname=ConnectPlaza Agent updater

Change the display name (optional)

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.

  • Check if you have made the changes in the wrapper.conf file, as described in above chapter.
  • Run the installAgentAsService.bat script as an administrator

Starting the second agent

Start the second ConnectAgent by starting the service as described above.

Problem starting the service

When you installed the windows service you can get an Error 1053 at startup. To correct this problem you must edit both the wrapper.conf files.

  • Open the <ConnectPlaza Install Directory>\myesb-connect-wrapper\yajsw\conf\wrapper.conf and search for the entry wrapper.java.command = java. Instead of java, use the full path to your java.exe executable. I.E. C:\\bin\\java.exe
  • Uninstall the service, wait until the service is removed from the list and reinstall the service.
  • Start the service