Wednesday, October 19, 2016

Start Multiple WSO2 IoTS Instances on the Same Computer

If you want to run multiple WSO2 IoTS on the same machine, you have to change the default ports with an offset value to avoid port conflicts. The default HTTP and HTTPS ports (without offset) of a WSO2 product are 9763 and 9443 respectively.

Here are the steps to offset ports. Let's assume you want to increase all ports by 1.

  1. Set Offset value to 1 in <IoTS_HOME>/repository/conf/carbon.xml
  2.    
        <Offset>1</Offset>  
       
    
  3. Change the hostURL under <authenticator class="org.wso2.carbon.andes.authentication.andes.OAuth2BasedMQTTAuthenticator"> in <IoTS_HOME>/repository/conf/broker.xml according to the port offset.
  4.    
        <authenticator class = "org.wso2.carbon.andes.authentication.andes.OAuth2BasedMQTTAuthenticator">  
         <property name = "hostURL">https://<IoTS_HOST>:<IoTS_PORT>/services/OAuth2TokenValidationService</property>  
          <property name = "username">admin</property>  
          <property name = "password">admin</property>  
          <property name = "maxConnectionsPerHost">10</property>  
          <property name = "maxTotalConnections">150</property>  
       </authenticator>  
       
       
    
  5. Start the Server.

1 comment: