How can I modify the port 5672 in AM?

564 Views Asked by At

I start the AM server by running the commond wso2carbon.sh and the carbon.log prompts the 5672 was used. So I have to modify the port. Thus, which configuration file I should modify? Thanks a lot.

2

There are 2 best solutions below

0
On

Here is a quick grep which will help you. (note: here the port is changed from 5672 to 5678.)

bhathiya@bhathiya-x1:/data/products/am/wso2am-2.0.0/bin$ grep -r 5678 ../repository/conf/ -A 5 -B 5

../repository/conf/api-manager.xml-            <!--InitDelay>300000</InitDelay>
../repository/conf/api-manager.xml-            <Period>3600000</Period-->
../repository/conf/api-manager.xml-        </BlockCondition>
../repository/conf/api-manager.xml-        <JMSConnectionDetails>
../repository/conf/api-manager.xml-            <Enabled>true</Enabled>
../repository/conf/api-manager.xml:            <ServiceURL>tcp://${carbon.local.ip}:5678</ServiceURL>
../repository/conf/api-manager.xml-            <Username>${admin.username}</Username>
../repository/conf/api-manager.xml-            <Password>${admin.password}</Password>
../repository/conf/api-manager.xml-            <Destination>throttleData</Destination>
../repository/conf/api-manager.xml-            <!--InitDelay>300000</InitDelay-->
../repository/conf/api-manager.xml-            <JMSConnectionParameters>
--
../repository/conf/jndi.properties-# limitations under the License.
../repository/conf/jndi.properties-#
../repository/conf/jndi.properties-
../repository/conf/jndi.properties-# register some connection factories
../repository/conf/jndi.properties-# connectionfactory.[jndiname] = [ConnectionURL]
../repository/conf/jndi.properties:connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://localhost:5678'
../repository/conf/jndi.properties-
../repository/conf/jndi.properties:connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5678'
../repository/conf/jndi.properties-
../repository/conf/jndi.properties-# register some queues in JNDI using the form
../repository/conf/jndi.properties-# queue.[jndiName] = [physicalName]
../repository/conf/jndi.properties-#queue.MyQueue = example.MyQueue
../repository/conf/jndi.properties-
--
../repository/conf/broker.xml-    within WSO2 MB. NOT performance related, but logic related. -->
../repository/conf/broker.xml-    <transports>
../repository/conf/broker.xml-        <amqp enabled="true">
../repository/conf/broker.xml-            <bindAddress>0.0.0.0</bindAddress>
../repository/conf/broker.xml-
../repository/conf/broker.xml:            <defaultConnection enabled="true" port="5678"/>
../repository/conf/broker.xml-
../repository/conf/broker.xml-            <sslConnection enabled="true" port="8672">
../repository/conf/broker.xml-                <keyStore>
../repository/conf/broker.xml-                     <location>repository/resources/security/wso2carbon.jks</location>
../repository/conf/broker.xml-                     <password>wso2carbon</password>
0
On

You can find the file in [WSO2_AM]\repository\conf\broker.xml section:

    <amqp enabled="true">
        <bindAddress>0.0.0.0</bindAddress>

        <defaultConnection enabled="true" port="5672"/>

        <sslConnection enabled="true" port="8672">
            <keyStore>
                 <location>repository/resources/security/wso2carbon.jks</location>
                 <password>wso2carbon</password>
            </keyStore>
            <trustStore>
                <location>repository/resources/security/client-truststore.jks</location>
                <password>wso2carbon</password>
            </trustStore>
        </sslConnection>

        <maximumRedeliveryAttempts>10</maximumRedeliveryAttempts>
        <allowSharedTopicSubscriptions>false</allowSharedTopicSubscriptions>
        <allowStrictNameValidation>true</allowStrictNameValidation>

        <!-- Refer repository/conf/advanced/qpid-config.xml for further AMQP-specific configurations.-->
    </amqp>