Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

There are several reasons for changing the network ports, namely to run multiple instances of Geronimo. To configure the default port edit the <geronimo_home>/var/config/config.xml file. The out-of-the-box config.xml for Apache Geronimo v1.2 with Tomcat distribution is shown in the following example.

Code Block
xml
xml
borderStylesolid
titleconfig.xmlxml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================== -->
<!-- Warning - This XML file is re-generated by Geronimo when -->
<!-- changes are made to Geronimo's configuration, therefore  -->
<!-- any comments added to this file will be lost.            -->
<!-- Do not edit this file while Geronimo is running.         -->
<!-- ======================================================== -->
<attributes xmlns="http://geronimo.apache.org/xml/ns/attributes-1.1">
    <module name="org.apache.geronimo.configs/rmi-naming/1.2/car">
        <gbean name="RMIRegistry">
            <attribute name="port">1099</attribute>
        </gbean>
        <gbean name="NamingProperties">
            <attribute name="namingProviderUrl">rmi://0.0.0.0:1099</attribute>
        </gbean>
        <gbean name="DownloadedPluginRepos">
            <attribute name="repositoryList">http://geronimo.apache.org/plugins/plugin-repository-list-1.2.txt</attribute>
            <attribute name="userRepositories">[]</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/j2ee-server/1.2/car"/>
    <module name="org.apache.geronimo.configs/transaction/1.2/car"/>
    <module name="org.apache.geronimo.configs/j2ee-security/1.2/car">
        <gbean name="JaasLoginServiceRemotingServer">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">4242</attribute>
        </gbean>
        <gbean name="JMXService">
            <attribute name="protocol">rmi</attribute>
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9999</attribute>
            <attribute name="urlPath">/jndi/rmi://0.0.0.0:1099/JMXConnector</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/axis/1.2/car"/>
    <module name="org.apache.geronimo.configs/openejb/1.2/car">
        <gbean name="EJBNetworkService">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">4201</attribute>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/j2ee-corba-yoko/1.2/car">
        <gbean name="NameServer">
            <attribute name="port">1050</attribute>
            <attribute name="host">localhost</attribute>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/j2ee-corba-sun/1.2/car">
        <gbean name="NameServer">
            <attribute name="port">1050</attribute>
            <attribute name="host">localhost</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/system-database/1.2/car">
        <gbean name="DerbyNetwork">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">1527</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/activemq-broker/1.2/car">
        <gbean name="ActiveMQ.tcp.default">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">61616</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/activemq/1.2/car"/>
    <module name="org.apache.geronimo.configs/tomcat/1.2/car">
        <gbean name="TomcatResources"/>
        <gbean name="TomcatWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8080</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatAJPConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8443</attribute>
        </gbean>
        <gbean name="org.apache.geronimo.configs/tomcat/1.2/car?
	             ServiceModule=org.apache.geronimo.configs/tomcat/1.2/car,j2eeType=GBean,name=TomcatWebContainer">
            <attribute name="catalinaHome">var/catalina</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/geronimo-gbean-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/j2ee-deployer/1.2/car">
        <gbean name="WebBuilder">
            <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.2</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/connector-deployer/1.2/car"/>
    <module condition="java.is1_5" name="org.apache.geronimo.configs/persistence-jpa10-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/openejb-deployer/1.2/car">
        <gbean name="EJBBuilder">
            <attribute name="listener">?name=TomcatWebContainer</attribute>
            <reference name="ServiceBuilders">
                <pattern>
                    <name>GBeanBuilder</name>
                </pattern>
                <pattern>
                    <name>PersistenceUnitBuilder</name>
                </pattern>
            </reference>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/openejb-corba-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/client-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/axis-deployer/1.2/car"/>
    <module load="false" name="org.apache.geronimo.configs/javamail/1.2/car">
        <gbean name="SMTPTransport">
            <attribute name="host">localhost</attribute>
            <attribute name="port">25</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/sharedlib/1.2/car">
        <gbean name="SharedLib">
            <attribute name="classesDirs">var/shared/classes</attribute>
            <attribute name="libDirs">var/shared/lib</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/tomcat-deployer/1.2/car"/>
    <module name="org.apache.geronimo.configs/welcome-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/webconsole-tomcat/1.2/car"/>
    <module load="false" name="org.apache.geronimo.configs/uddi-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/remote-deploy-tomcat/1.2/car"/>
    <module name="org.apache.geronimo.configs/hot-deployer/1.2/car"/>
    <module load="false" name="org.apache.geronimo.configs/ca-helper-tomcat/1.2/car"/>
    <module load="false" name="sample.applications/HelloWorldApp/1.1/war"/>
    <module name="sample.applications/HelloWorldApp/1.2/war"/>
</attributes>

Here are two excerpts from the config.xml file, one for Tomcat and one for Jetty. These excerpts show the entire section where the listeners are defined, we have just replaced the standard 8080 with an arbitrary port, 9000 in this case.

Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml - Tomcatxml
    <module name="org.apache.geronimo.configs/tomcat/1.2/car">
        <gbean name="TomcatResources"/>
        <gbean name="TomcatWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9000</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatAJPConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8443</attribute>
        </gbean>
        <gbean name="org.apache.geronimo.configs/tomcat/1.2/car?
	             ServiceModule=org.apache.geronimo.configs/tomcat/1.2/car,j2eeType=GBean,name=TomcatWebContainer">
            <attribute name="catalinaHome">var/catalina</attribute>
        </gbean>
    </module>
Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml - Jettyxml
    <module name="org.apache.geronimo.configs/jetty/1.2/car">
        <gbean name="JettyWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9000</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="JettySSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8443</attribute>
        </gbean>
        <gbean name="JettyAJP13Connector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
        </gbean>
    </module>

...