geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Changing the default port numbers
Date Tue, 28 Jun 2011 03:02:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Changing+the+default+port+numbers">Changing
the default port numbers</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~chirunhua@gmail.com">Runhua
Chi</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>There are a number of reasons
why you might want to use other port numbers than those provided by default. Most common startup
problems are in fact associated with port conflicts. You can use monitoring utilities like
Active Ports that will quickly tell you what application or process is using what port so
you can customize Geronimo&#39;s ports accordingly. On Unix-like platforms, you can always
use something like {{netstat -nao | grep -i list}}  to get the ports in use along with what
application is holding that port. Alternatively, you can use {{netstat -nab}} on a Windows
platform. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
<br>Note that *ActiveMQPort* setting in the {{config-substitution.properties}} file
does not work. If you want to change the port number for ActiveMQ server, update the value
of *portOffset* in {{etc/blueprint-activemq-placeholder.cfg}} file. <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Initial+configuration"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Initial+configuration">Initial configuration</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/Changing+the+username+and+password">Changing
the username and password</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/Changing+the+username+and+password"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<h2><a name="Changingthedefaultportnumbers-Changingthedefaultportnumbers"></a>Changing
the default port numbers</h2>

<p>The <tt>config-substitutions.properties</tt> file lets you specify a
totally new set of ports and define an automatic port offset for when you run multiple servers
(or instances of the same server). Other than that, you can define different variables and
their substitution values in this file, which will be used when processing the corresponding
<a href="/confluence/display/GMOxDOC30/config.xml" title="config.xml">config.xml</a>.
These substitution values can be overridden by environment variables and system properties
by prefixing the property name with <tt>org.apache.geronimo.config.substitution</tt>.</p>

<p>For example, an entry such as <tt>hostName=localhost</tt> can be overridden
by an environment variable or system property <tt>org.apache.geronimo.config.substitution.hostName=foo</tt>.</p>


<p>Although this section is focusing on changing these settings by updating a properties
file, there is an alternative way by using the Geronimo administrative console which is explained
in more detail under the <a href="/confluence/display/GMOxDOC30/Configuring+the+Web+Container"
title="Configuring the Web Container">Configuring the Web Container</a> section.
However, if you have port conflicts at start up time the Geronimo administrative console will
not be available, so we have to focus on configuring the <tt>config-substitutions.properties</tt>
file by choosing a new <em>PortOffset</em> value (the default is 0).</p>

<p>The following example shows the <tt>config-substitutions.properties</tt>
file for the Tomcat distribution of Geronimo. The file provided with the Jetty distribution
is nearly identical. Changes to the file should be made when the server is stopped.</p>

<div class="code panel" style="border-style: solid;border-width: 1px;"><div class="codeHeader
panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><b>config-substitutions.properties</b></div><div
class="codeContent panelContent">
<pre class="code-java">
#Tue Dec 16 15:44:41 EST 2008
ORBPort=6882
AJPPort=8009
clusterNodeName=NODE
MaxThreadPoolSize=500
ResourceBindingsNamePattern=
Capacity=1000
SMTPHost=localhost
StatelessPoolSize=10
StatelessTimeout=0
ResourceBindingsQuery=?\#org.apache.geronimo.naming.ResourceSource
DerbyPort=1527
BMPPoolSize=10
COSNamingPort=1050
StatefulTimeout=20
webcontainer=TomcatWebContainer
OpenEJBPort=4201
ORBSSLPort=2001
PortOffset=0
ORBHost=localhost
JMXPort=9999
EndPointURI=http\:<span class="code-comment">//localhost\:8080
</span>NamingPort=1099
DefaultWadiSweepInterval=36000
WebConnectorConTimeout=20000
BulkPassivate=100
MulticastDiscoveryPort=6142
HTTPSPort=8443
COSNamingHost=localhost
MinThreadPoolSize=200
MulticastDiscoveryAddress=239.255.3.2
ReplicaCount=2
ServerHostname=0.0.0.0
ActiveMQPort=61616
ORBSSLHost=localhost
SMTPPort=25
webcontainerName=tomcat6
ResourceBindingsNameInNamespace=jca\:
StrictPooling=<span class="code-keyword">true</span>
JMXSecurePort=9998
DefaultWadiNumPartitions=24
AccessTimeout=30
HTTPPort=8080
clusterName=CLUSTER_NAME
ClusterName=cluster1
ResourceBindingsFormat={groupId}/{artifactId}/{j2eeType}/{name}
RemoteDeployHostname=localhost
TmId=71,84,77,73,68
</pre>
</div></div>

<p>There are a number of reasons why you might want to use other port numbers than those
provided by default. Most common startup problems are in fact associated with port conflicts.
You can use monitoring utilities like Active Ports that will quickly tell you what application
or process is using what port so you can customize Geronimo's ports accordingly. On Unix-like
platforms, you can always use something like <tt>netstat -nao | grep -i list</tt>
 to get the ports in use along with what application is holding that port. Alternatively,
you can use <tt>netstat -nab</tt> on a Windows platform.</p>

<p>Note that <b>ActiveMQPort</b> setting in the <tt>config-substitution.properties</tt>
file does not work. If you want to change the port number for ActiveMQ server, update the
value of <b>portOffset</b> in <tt>etc/blueprint-activemq-placeholder.cfg</tt>
file.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Changing+the+default+port+numbers">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645438&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Changing+the+default+port+numbers?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message