WIP
This document is work in progress!
This document guides on how to configure the ports in wso2 IoT Server. To make the steps clear, a sample port offset scenario is covered. Follow the steps given below:
WSO2 IoT Server compromises of the IoT core, analytics and broker profiles. By default, the three profiles have the following offsets:
Profile | Offset | Default port |
---|---|---|
Core | 0 | 9443/9763 |
Analytics | 2 | 9445/9765 |
Broker | 3 | 9446/9766 |
When port offsetting you need to make sure that the port offset differs from each other. No two profiles can have the same offset. Else, you will run into errors.
Configure the carbon.xmlfiles of the three profile to port offset.
Core Open the
<IOTS_HOME>/conf/carbon.xml
file and port offset the IoT Server's core profile by configuring the<Offset>
attribute.Make sure that the offset value is not the same as the broker or analytics profile.
Example:
<Offset>4</Offset>
Now the port of the core profile is 9447/9767.
Analytics Open the
<IOTS_HOME>/wso2/analytics/conf/carbon.xml
file and port offset the IoT Server's core profile by configuring the<Offset>
attribute.Make sure that the offset value is not the same as the broker or analytics profile.
<Offset>5</Offset>
Now the port of the core profile is 9448/9768.
Broker Open the
<IOTS_HOME>/wso2/broker/conf/carbon.xml
file and port offset the IoT Server's core profile by configuring the<Offset>
attribute.Make sure that the offset value is not the same as the broker or analytics profile.
<Offset>6</Offset>
Now the port of the core profile is 9449/9769.
Open the
<IOTS_HOME>/bin/
iot
-server.sh
oriot-server.bat
file configures the following ports:Analytics ports By default the analytics profileisoffset by 2. In step 1, you offset the analytics profile by 3 more again. Therefore, all the ports relevant to analytics need to be offset by 3 more.
Example:
-Diot.analytics.https.port="9448" \
Broker ports By default, the broker profile is offset by 3. In step 1, you offset the broker profile by 3 more. Therefore, all the ports relevant to broker need to be offset by 3.
Example:
-Dmqtt.broker.port="1890" \
IoT core ports By default the core profile is not offset. In step 1, you offset the broker profile by 4. Therefore, all the ports relevant to core needs to be offset by 4.
-Diot.manager.https.port="9447" \ -Diot.core.https.port="9447" \ -Diot.keymanager.https.port="9447" \ -Diot.gateway.https.port="8247" \ -Diot.gateway.http.port="8284" \ -Diot.gateway.carbon.https.port="9447" \ -Diot.gateway.carbon.http.port="9767" \ -Diot.apimpublisher.https.port="9447" \ -Diot.apimstore.https.port="9447" \
Open the
<IOTS_HOME>/wso2/analytics/bin/wso2
server.sh
orwso2server.bat
file configures the following ports:Broker ports By default, the broker profile is offset by 3. In step 1, you offset the broker profile by 3 more. Therefore, all the ports relevant to broker need to be offset by 3.
Example:
-Dmqtt.broker.port="1890" \
IoT core ports By default the core profile is not offset. In step 1, you offset the core profile by 4. Therefore, all the ports relevant to core needs to be offset by 4.
-Diot.keymanager.https.port="9447" \ -Diot.gateway.https.port="8247" \
Configure the
<IOTS_HOME>/conf/identity/
sso-idp-config.xml
file.IoT core By default the core profile is not offset. In step 1, you offset the core profile by 4. Therefore, all the ports relevant to core needs to be offset by 4.
<AssertionConsumerServiceURL>https://localhost:9447/devicemgt/uuf/sso/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/devicemgt/uuf/sso/acs</DefaultAssertionConsumerServiceURL> <Audience>https://localhost:9447/oauth2/token</Audience> <Recipient>https://localhost:9447/oauth2/token</Recipient> <AssertionConsumerServiceURL>https://localhost:9447/store/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/store/acs</DefaultAssertionConsumerServiceURL> <AssertionConsumerServiceURL>https://localhost:9447/social/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/social/acs</DefaultAssertionConsumerServiceURL> <AssertionConsumerServiceURL>https://localhost:9447/publisher/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/publisher/acs</DefaultAssertionConsumerServiceURL> <AssertionConsumerServiceURL>https://localhost:9447/api-store/jagg/jaggery_acs.jag</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/api-store/jagg/jaggery_acs.jag</DefaultAssertionConsumerServiceURL> <AssertionConsumerServiceURL>https://localhost:9447/portal/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9447/portal/acs</DefaultAssertionConsumerServiceURL> <Audience>https://localhost:9447/oauth2/token</Audience> <Recipient>https://localhost:9447/oauth2/token</Recipient> <Audience>https://localhost:9447/oauth2/token</Audience> <Recipient>https://localhost:9447/oauth2/token</Recipient>
Analytics By default the analytics profile is offset by 2. In step 1, you offset the analytics profile by 3 more again. Therefore, all the ports relevant to analytics need to be offset by 3 more.
<AssertionConsumerServiceURL>https://localhost:9448/portal/acs</AssertionConsumerServiceURL> <DefaultAssertionConsumerServiceURL>https://localhost:9448/portal/acs</DefaultAssertionConsumerServiceURL>