Starting iServer/iPortal/iEdge in the way of Windows service

Feedback


Setting up SuperMap iServer, SuperMap iPortal, and SuperMap iEdge as Windows system services can be achieved through the service.bat script or commands provided by Tomcat. If there is a previous version of iServer/iPortal/iEdge service in Windows system services, it needs to be removed first before registering and starting the service.

Take SuperMap iServer as an example (also applicable to SuperMap iPortal, SuperMap iEdge Products), describes how to set up to start as a Windows system service. It is recommended that you open the cmd.exe as an administrator when doing the following.

Remove existing SuperMap iServer system services

If the SuperMap iServer service already exists in the Windows system service, delete it first. The following methods can be used:

Open a cmd.exe and enter the following command:

sc delete iServer8C

Open the cmd.exe, navigate to 【SuperMap iServer_HOME】\bin, and enter the following command:

service.bat remove

Navigate to 【SuperMap iServer_HOME】\bin and enter the following command:

tomcat8 //DS//iServer8C

Note: If you already have an older version of iServer in Windows System Services, you should look at the service name in Windows Services before deleting it. The first option is recommended. For example: If the service name of SuperMap iServer 7C is "iServer7C", the delete command is: SC delete iServer7C .

 

Sign up for services

The iServer can be registered as a system service either through the service.bat or the Tomcat command, with service.bat being the recommended method .

The service.bat script provided by SuperMap iServer sets the common parameters and the recommended values of the Java virtual machine, so no other settings are required after using this script to register the service. The script is located at 【SuperMap iServer_HOME】\bin, you can register/remove the service ( install/remove ). For example, when registering a service, open it as an administrator cmd, locate 【SuperMap iServer_HOME】\ bin, and enter the install command as follows:

service.bat install

When multiple iServer services are started by a single computer, the service.bat needs to be modified to avoid the impact of service name duplication on registration. The service name which is the value of the SERVICE_NAME is as follows:

set SERVICE_NAME=iServer11i(2024)

set PR_DISPLAYNAME=SuperMap iServer 11i(2024)

The "iServer11i (2024)" service can be registered through the IS command provided by Tomcat. The string after//IS//is the service name, which can be modified to the required name. Navigate to 【SuperMapiServer_HOME】\bin and enter the following command:

tomcat8 //IS//iServer11i(2024) --DisplayName="SuperMap iServer 11i(2024)" --Install="【SuperMapiServer_HOME】\bin\tomcat8.exe" --Jvm=auto --StartMode=jvm --StopMode=jvm --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop --Classpath="【SuperMapiServer_HOME】\bin\bootstrap.jar;【SuperMapiServer_HOME】\bin\tomcat-juli.jar" --Environment path='%UGO_HOME%\bin;%path%;'

If it is an iPortal, the -- Environment path='% UGO-HOME%\bin;% path%;' above needs to be set to 160-- Environment path='%UGO_HOME%\bin;% path%;'; iPortal='true'. If for iEdge, the parameter needs to be changed to -- Environment path='【iEdge_Home】\support\SuperMap_License;% path%;'; iEdge='true'. Among them, 【iEdge_Home】represents the root directory of iEdge. When entering commands, 【iEdge_Home】should be replaced with the root directory where iEdge is located.

Start/stop service

The iServer service can be started/stopped in three ways:

After registration, the SuperMap iServer service can be seen in the Windows system service. It can be started/stopped manually or set to start automatically.

The "iServer 11i (2024)" service can be started/stopped via Tomcat 8-provided RS/SS commands, or via the The TS command starts service in debug mode. Navigate to 【SuperMap iServer_HOME】\bin and enter the following command:

tomcat8 //RS//iServer11i(2024)

tomcat8 //SS//iServer11i(2024)

tomcat8 //TS//iServer11i(2024)

You can start the/stop service with the SC start/SC stop command, entering the following command in cmd:

sc start iServer11i(2024)

sc stop iServer11i(2024)

Note: For Windows 7, after iServer is registered as a system service, Tomcat (such as Apache) used by iServer should be started in the windows service Tomcat 9.0 (iServer11i) and has the login attribute set to the local system account-allowing the service to interact with the desktop for normal access.

Adjust the virtual machine parameters

SuperMap iServer presets the recommended values for the virtual machine parameters, which are not required when using the service.bat script registration service. But use when the Tomcat 7 command is used to register the service, the Java virtual machine parameter needs to be set to the recommended value.

There are two ways to adjust the Java Virtual Machine parameters and other properties of the "iServer11i (2024)" service:

Navigate to 【SuperMapiServer_HOME】\bin and enter the following command to start tomcat8w.exe. Edit the properties of the "iServer11i (2024)" service:

tomcat8w.exe //ES//iServer11i(2024)

Click the Java tab to modify the memory parameters of the Java virtual machine, as shown in the figure below:

Where -XX: MaxPermSize = 192m is a separate line with no spaces before and after it.

Click the Startup and Shutdown tabs, and set the working path as 【SuperMapiServer_HOME】\bin. This ensures that the log file iserver.log specified by a relative path in【SuperMapiServer_HOME】\webapps\iserver\WEB-INF\iserver-log4j.properties can be logged in 【SuperMapiServer_HOME】\logs.

The above parameters can be updated and set directly through the//US//command of tomcat8. Navigate to 【SuperMapiServer_HOME】\bin and enter the following command to update the attribute configuration for the "iServer11i (2024)" service:

tomcat8 //US//iServer11i(2024) --JvmMs 256 --JvmMx 512 --JvmSs 512 --JvmOptions="-Dcatalina.base=【SuperMapiServer_HOME】;-Dcatalina.home=【SuperMapiServer_HOME】;-Djava.endorsed.dirs=【SuperMapiServer_HOME】\endorsed;-Djava.io.tmpdir=【SuperMapiServer_HOME】\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=【SuperMapiServer_HOME】\conf\logging.properties;-XX:MaxPermSize=192m"  --StartPath="【SuperMapiServer_HOME】\bin" --StopPath="【SuperMapiServer_HOME】\bin"