0
votes

When starting the WSO2 ELB I get following error in the logs when the system tries to start the Pass-through HTTP and HTTPS Listeners:

WARN {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener} -  System may be unstable: HTTPS ListeningIOReactor encountered a checked exception : Permission denied {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener}

Why is permission denied? Is this a file permission? If so, which file/dir should be changed to which settings? Or is it something else entirely?

These are the relevant settings in axis2.xml:

   <transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener">
      <parameter name="port">80</parameter>
      <parameter name="non-blocking"> true</parameter>
      <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
   </transportReceiver>
   <transportReceiver name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLListener">
        <parameter name="port" locked="false">443</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor</parameter>
        <!--parameter name="bind-address" locked="false">hostname or IP address</parameter-->
        <!--parameter name="WSDLEPRPrefix" locked="false">https://apachehost:port/somepath</parameter-->
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>repository/resources/security/wso2carbon.jks</Location>
                <Type>JKS</Type>
                <Password>wso2carbon</Password>
                <KeyPassword>wso2carbon</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>repository/resources/security/client-truststore.jks</Location>
                <Type>JKS</Type>
                <Password>wso2carbon</Password>
            </TrustStore>
        </parameter>
        <!--<parameter name="SSLVerifyClient">require</parameter>
            supports optional|require or defaults to none -->
    </transportReceiver>

The only settings I changed were the port parameter, both for HTTP and HTTPS. The rest of the settings is standard, since this is a testing environment.

Thank you in advance.

Update: there is no error if I leave the ports at their default value of 8280 (HTTP) and 8243 (HTTPS).

2

2 Answers

0
votes

you can change the ports by changing the offset in wso2_home/repository/conf/carbon.xml. Please refer to wso2 wiki to understand the concept of offset further. You do not have to set any file, by just changing the offset you can change the other ports that you want accordingly.

Example. Default port offset is 0 and respective port for http and https are 8280 and 8243.

If you change it to 1 then respective port for http and https are 8281 and 8244.

0
votes

The problem has nothing to do with the port offset. The permission denied exception it's caused because ports below 1024 can be opened only by root. You could try one of the following solutions:

  1. You can run the WSO2 ELB with the root user.
  2. You can redirect the port using iptables if you are using a unix operative system, as the following example:

    iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

    iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080