iServer configuration file introduction

Feedback


The main configuration information for SuperMap iServer is located in WEB-INF ( 【SuperMap iServer Installation directory】\webapps\iserver\WEB-INF). For the directory description, please refer to: Directory description after installation .

 

Introduction to config file

The WEB-INF folder stores the configuration information of the server and the services it provides. The folder structure is as follows:

Among

The main contents of each config file are shown in the following table:

Contents of config file

File name Description
iserver-datacatalog.xml The data catalog services config file contains the configuration of the data store in the data catalog services and some other configuration information.
iserver-log4j.properties The config file of the log.
iserver-rest-appContext.xml REST applies a config file, which defines the mapping of representation types to URI suffixes.
iserver-rest-resources.xml The resource config file of the extension resource, where the user can specify the name, URI, type, expression generator name, parameter resolver name, and so on of the extension resource.
iserver-services-interfaces.xml The service interfaces instance, which contains the iserver-services-samples.xml and the iserver-services-user.xml. Interface instances used in, such as rest, restjsr, wms111, wms130, wfs100, wmts100, wmts-china, wcs111, wcs112, handler, gpserver.
iserver-services-samples.xml The configuration information of the sample service provided by the product.
iserver-services.xml The configuration information of the service published by the user. The server recognizes this file as a service config file as long as it starts with "iserver-services", and supports multiple user-defined service config files, such as iserver-services-1.xml,iserver-services-2.xml.
iserver-services-buildin.xml Configuration information of iServer built-in services (such as Geometry service and map service).
iserver-system.xml SuperMap iServer system-level configuration, including meta information, cluster, kml style configuration, etc.
web.xml The initialization config file of SuperMap iServer defines the mapping relationship between functions and classes.
iserver-security.db A database for storing information about users, roles, and so on.
iserver-services.db The database where the user stores service authorization information.

Service config file

SuperMap iServer services are composed of service providers, service components, and service interfaces. The configuration information for all services is stored in the service config file. It is mainly used to provide the service interfaces config file of interface instances (iserver-services-interfaces.xml), the config file for the sample service (iserver-services-samples.xml) and the config file for the user publish services (iserver-services.xml). The latter two are similar in structure and will not be described here.

With the service config file, you can:

service interfacesconfig file

Service interfaces config file iserver-services-interfaces.xml, including service interfaces instance, root node is < application > element, including < interfaces > child node elements, where each interface element is used to configure a specific service interface, including the following attributes:

Demonstrate service instanceconfig file.

Demonstration service instance config file iserver-services-samples.xml, including the configuration information of the demonstration service instance provided by the product. The root node is the < application > element, including the following child node elements:

1. <components>

Each of these component elements is used to configure a specific service component.

Note: In addition to the above attributes, the component element of the user published service configuration file (iserver-services. xml) also supports the initPriority attribute, which represents the priority of GIS service startup. The higher the priority value, the higher the GIS service startup order when starting iServer.

2. <providers>

Each of these provider elements is used to configure a specific service provider.

3. <componentSets>

Each componentSet element is used to configure a component set, and each component set can reference multiple service components.

4. <providerSets>

Each providerSet element is used to configure a provider set, and each provider set can reference multiple service providers.

Built-in service config file

Built-in service config file iserver-services-buildin.xml, including configuration information of geometry service provided by iServer, root node is the < application > element, including the following child node elements:

1. <componentSets>

Each componentSet element is used to configure a component set, and each component set can reference multiple service components.

2. <providerSets>

Each providerSet element is used to configure a provider set, and each provider set can reference multiple service providers.

3. <components>

Each of these component elements is used to configure a specific service component.

4. <providers>

Each of these provider elements is used to configure a specific service provider.

System config file

The iserver-system.xml contains the configuration information of the system, the root node is the < server > element, and the < server > node currently mainly contains <properties> 、<management>、<hosts>、<clustering>、<harLog>、<queryFilter> child node elements.

1. < properties > element

It is used to set global attribute information in the SuperMap iServer configuration system, such as the default output path of the service, the access site, and the setting of whether to check the environment:

The global attributes outputPath and outputSite can also be accessed through the service manager Web Manager. Please refer to the global attribute setting .

2. < uploadFileSetting > element

It is used to uniformly set the relevant configuration of SuperMap iServer file upload, such as the maximum volume of the uploaded file, the maximum volume after decompression, whether the file with the same name is overwritten, and the storage directory:

3. < management > element

Metadata info for configuring SuperMap iServer. The metadata info of iServer contains service component type metadata (< component-types >), the provider type metadata (< provider-types >) and service interface type metadata (< interface-types >), and the security config (< security >).

An example of a security config node is as follows:

    <security> 
      <accessControl> 
        <SecuritySetting> 
          <!-- Verification code configuration, default is turned off -->
          <captchaConfig>
              <enable>false</enable>
              <type>IMAGE_CAPTCHA</type>
              <length>4</length>
              <expireInSeconds>120</expireInSeconds>
          </captchaConfig>
          <isSecurityEnabled>true</isSecurityEnabled>
          <disableRememberMe>false</disableRememberMe>
          <cacheInfoToMemory>true</cacheInfoToMemory>
          <tokenKey>4da7ef8f2e734f56ab2ecfae20cce49a</tokenKey>
          <PBKDF2Iterations>1000</PBKDF2Iterations>
          <!-- Password anti brute force cracking settings -->
          <passwordProtectedSetting> 
            <passwordDiffCount>5</passwordDiffCount>  
            <userPasswordErrorCounterSetting> 
              <passwordErrorProtectEnable>false</passwordErrorProtectEnable>  
              <lockedTime>1200000</lockedTime>  
              <periodLength>600000</periodLength>  
              <allowFailCountPerPeriod>5</allowFailCountPerPeriod> 
            </userPasswordErrorCounterSetting> 
          </passwordProtectedSetting>
          <!-- Three segment root key configuration -->
          <rootSecretKeySetting> 
            <loadModelType>TRIPART</loadModelType>  
            <part3>[B@7e31062c</part3> 
          </rootSecretKeySetting> 
        </SecuritySetting> 
      </accessControl> 
      <!-- Security Information Storage Configuration -->
      <storage class="com.supermap.server.config.SQLSecurityInfoStorageSetting"> 
        <type>MYSQL</type>  
        <connInfo> 
          <username>root</username>  
          <password>super123.</password>  
          <dbType>MYSQL</dbType>  
          <driverClass>com.mysql.jdbc.Driver</driverClass>  
          <jdbcUrl>jdbc:mysql://192.168.120.44:3306/supermap?useUnicode=true&characterEncoding=UTF-8</jdbcUrl>  
          <maxPoolSize>30</maxPoolSize>  
          <initialPoolSize>5</initialPoolSize>  
          <minPoolSize>5</minPoolSize>  
          <maxIdleTime>0</maxIdleTime>  
          <maxWait>3000</maxWait> 
        </connInfo> 
      </storage> 
      <!-- iServer built-in session configuration -->         
      <session class="com.supermap.server.config.BuildInSessionSetting"> 
          <type>BuildIn</type>  
          <timeout>10000</timeout>  
          <checkLoggedInAnotherPlace>true</checkLoggedInAnotherPlace> 
          <loggedInAnotherPlaceProcessingStrategy>Notifying</loggedInAnotherPlaceProcessingStrategy> 
      </session> 
      <!-- iServer encryption algorithm and specification configuration -->                
      <encryption class="com.supermap.server.config.EncryptionSetting">           
        <serviceKeySettings>
          <serviceKeySetting>   
            <keyID>keyIDNAME</keyID>  
            <version>1.1</version>                     
            <algorithm>AES</algorithm>                     
            <keyLength>256</keyLength>                     
            <attributes>abcd</attributes>                 
          </serviceKeySetting>
        </serviceKeySettings>
      </encryption> 
    </security>

Among,

1) For iServer built-in sessions, the specific configuration parameters include:

           2)For Redis sessions, specific configuration parameters include:

3. < hosts > element

Host used to configure the SuperMap iServer service. Can contain multiple < host >, one host is:

<host port="8090" type="webapp" uriBase="/services">
        <interface-type>com.supermap.services.wms.WMSServlet</interface-type>
        <interface-type>com.supermap.services.rest.RestServlet</interface-type>
        <interface-type>com.supermap.services.wfs.WFSServlet</interface-type>
        <interface-type>com.supermap.services.wmts.WMTSServlet</interface-type>
</host>

Where, < interface-type > represents the service type contained in the service host, and the attributes of < host > have the following meanings:

4. < clustering > element

Including applications such as cluster configuration. For details on the elements related to cluster subnodes, refer to Managing a Cluster with a config file in the Cluster topic.

5. < harLog > element

It is used to configure the service access logs, such as whether to enable service access logs, the file name of the service access logs, and the settings of the monitored service URI address:

6. < queryFilter > element

Used for filtering configuration of attributeFilter parameter in SQL query to prevent SQL injection. SQL Injection refers to the process of deceiving the server to perform malicious operations by inserting illegal strings or strings against the user's wishes into the SQL query expression during the SQL query of data or map.

7. <repository>

Used to set the storage location of a temporary resource. For detailed information, refer to Lifecycle of Temporary Resources .

8. < relayService > element

Trunking service configuration for iEdge. Used in iEdge products only.

9. < license > element

It is used to save the license information of the current iServer, including the version in use and the extended service license. See Selecting Licenses in iServer . Examples are as follows:

  <licenseMode>DefaultLicense</licenseMode>
  <license> 
    <enabledmodules>
        <string>ENTERPRISE</string> 
        <string>CHART</string>
        <string>NETWORK</string>
        <string>SPACE</string>
        <string>SPATIAL</string>
        <string>TRAFFIC_TRANSFER</string>
        <string>PLOT</string>
        <string>SITUATIONEVOLUTION</string>
        <string>SPATIAL_PROCESSING</string>
        <string>GEO_BLOCKCHAIN_SERVICE</string>
        <string>SPATIAL_STREAMING</string>
        <string>MACHINE_LEARNING_SERVICE</string>
        <string>IMAGE_SERVICE</string>
    </enabledmodules>
  </license> 

Among,

The name of the extension by core module is the name of the original extension module followed by the number of cores. For example, the name of the machine learning service (16 cores) expansion module is' MACHINE_LEARNING_SERVICE_16CORES '. The name of the machine learning service (32 cores) expansion module is' MACHINE_LEARNING_SERVICE_32CORES '.

 

10. < multiworkers > element

Information used to configure the multi-process service. Such as the number of processes, port range, etc. Examples are as follows:

  <multiworkers>
    <enabled>true</enabled> 
    <workerCount>4</workerCount>
    <workerIP>127.0.0.1</workerIP> 
    <workerPortStart>8900</workerPortStart>
    <workerPortEnd>9000</workerPortEnd> 
    <workerBaseDir>../../workers</workerBaseDir>
    <xmx>1024m</xmx> 
    <communicationPort>8100</communicationPort>
    <requestDispatchMode>RANDOM</requestDispatchMode>  
    <timeout>20</timeout> 
  </multiworkers> 

The specific parameters are described as follows:

Note: After modifying parameters related to multiple processes (excluding workerCount), it is necessary to manually restart iServer to take effect.

11. < scheduledTasks > element

Used to set timing-related tasks, such as server config file scheduled backup, resources recovery regularly, etc. Examples are as follows:

  <scheduledTasks>
    <scheduledRestart>
      <enabled>true</enabled> 
      <restartTime>
        <hour>9</hour>
        <minute>35</minute>
      </restartTime>
      <dayOfWeek>1,2,3,4,5,6,7</dayOfWeek> 
      <restartDate>2023-11-1</restartDate> 
    </scheduledRestart>
    <scheduledBackup>
      <enabled>true</enabled> 
      <backupTime>
        <hour>10</hour>
        <minute>40</minute>
      </backupTime>
      <dayOfWeek>1,2,3</dayOfWeek> 
      <backupDate>2023-11-1</backupDate> 
    </scheduledBackup>
  </scheduledTasks>

The specific parameters are described as follows:

12. < spark > Element

Spark cluster basic configuration:

13. < processing > element

For distributed analyst service configuration, the following is an example:

<processing>
     <enabled>true</enabled>
      <referToken>Token</referToken>
     <referServicesAddress/>
     <xmx>1024m</xmx>
     <workerPort>6765</workerPort>
     <defaultOutputType>UDBX</defaultOutputType>
     <rddStorageCount>10</rddStorageCount>
     <buildPyramid>false</buildPyramid>
     <publishService>true</publishService>
</processing>

The specific parameters are described as follows:

Note:

Suggest adding the SparkSessionNoRebuild switch for configuration. After enabling this switch, the system will not automatically rebuild SparkSession upon detecting Spark service restart, thus avoiding related errors. Configuration method: In <processing> node, add <sparkSessionNoRebuild>true</sparkSessionNoRebuild>. Then restart iserver, and after restarting, iserver.rog will display "SparkSessionNoRebuild is set to true", indicating successful setting.

14. < serviceInstanceManager > element

Used for dynamic management configuration of service instance. The example is as follows:

  <serviceInstanceManager>
    <enableLazyInitService>true</enableLazyInitService> 
    <idleDispose>
      <enable>true</enable> 
      <checkPeriod>30000</checkPeriod>
      <maxIdleTime>30000</maxIdleTime>
    </idleDispose>
    <capacityLimit>
      <enable>true</enable> 
      <maxInstanceCount>2000</maxInstanceCount>
    </capacityLimit>
  </serviceInstanceManager>

Among,

15. < storages > element

Used for the management configuration of the distributed image tile library, the example is as follows:

  <storages>
    <storage> 
      <id>smtiles</id>  
      <tileSourceInfo class="com.supermap.services.tilesource.MongoDBTilesourceInfo">
        <datastoreType>TILES</datastoreType>  
        <type>MongoDB</type>
        <readPreference>primary,nearest,secondary</readPreference>
        <serverAdresses> 
          <string>172.16.120.199:27017</string> 
        </serverAdresses>  
        <database>smtiles</database>
      </tileSourceInfo> 
    </storage>
  </storages>

Among,

Datastore config file

Datastore config file iserver-datastores.xml, root node is < application > elements, including < datastores > child node elements, where each datastore element is used to configure a specific datastore and contains the following attributes:

Examples are as follows:

  <?xml version="1.0" encoding="UTF-8"?>
   <application>
    <datastores>
     <datastore>
      <datastoreType>BIGDATAFILESHARE</datastoreType>
      <type>FOLDER</type>
      <name>samples</name>
      <url>../../samples/data/ProcessingData</url>
      <commonsCSVMetaData> 
       <xIndex>10</xIndex>  
       <yIndex>11</yIndex>  
       <separator>,</separator>
      </commonsCSVMetaData> 
     </datastore> 
    </datastores> 
   </application>

GIS service dynamic encryption config file

GIS Services Dynamic Encryption config file iserver-svcworkkeymappings.xml, located at the config (【SuperMap iServer installation directory】\webapps\iserver\WEB-INF\config) folder, which can be used to prevent data crawling and improve the security of the server. The configuration file stores the mapping relationship between the GIS service to be encrypted, the encryption key, and the URL requests of the service, that is, only one key can be used for one service type, and this key is used for multiple URL requests under this service type. Refer to "GIS Service Dynamic Encryption Configuration" for the configuration method