You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Changing the default port numbers

As we briefly mentioned earlier, the <geronimo_home>/var/config/config-substitutions.properties lets you specify a totally new set of port as well as to define an automatic port offset for when you run multiple servers (or instances of the same server). This file also allows you to set some cluster related parameters such as clusterName, clusterNodeName, etc. Visit the Clustering section for more details on how to configure a web application cluster in Geronimo.

Although this section is focusing on the changing these settings by updating a properties file there is an alternative way by using the Geronimo Administration Console which is explained in more detail under the Administration section. However, if you have port conflicts at start up time the Geronimo Administration Console will not be available, hence our focus on configuring the config-substitutions.properties file.

The following example shows the config-substitutions.properties for the Tomcat distribution of Geronimo. The file provided with the Jetty distribution is nearly identical.
config-substitutions.properties

#Fri Feb 08 14:11:53 EST 2008
DefaultWadiSweepInterval=36000
ResourceBindingsFormat=

Unknown macro: {groupId}

/

Unknown macro: {artifactId}

/

Unknown macro: {j2eeType}

/

Unknown macro: {name}

COSNamingPort=1050
HTTPPort=8080
ORBPort=6882
WebConnectorConTimeout=20000
COSNamingHost=localhost
clusterNodeName=NODE
ORBHost=localhost
webcontainer=TomcatWebContainer
NamingPort=1099
ORBSSLPort=2001
JMXPort=9999
ResourceBindingsNamePattern=
RemoteDeployHostname=localhost
ClusterName=DEFAULT_CLUSTER
DefaultWadiNumPartitions=24
MaxThreadPoolSize=500
ResourceBindingsNameInNamespace=jca\:
webcontainerName=tomcat6
ResourceBindingsQuery=?#org.apache.geronimo.naming.ResourceSource
OpenEJBPort=4201
ORBSSLHost=localhost
SMTPPort=25
HTTPSPort=8443
AJPPort=8009
ActiveMQStompPort=61613
ActiveMQPort=61616
PortOffset=0
SMTPHost=localhost
ServerHostname=0.0.0.0
EndPointURI=http\://localhost\:8080
ReplicaCount=2
clusterName=CLUSTER_NAME
MinThreadPoolSize=200

There are a number of reasons why you may want to use other port numbers than those provided by default. Most common startup problems are in fact associated to port conflicts, you can use monitoring utilities like Active Ports that will quickly tell you what application/process is using what port so you can customize Geronimo's ports accordingly. Of course you can always use something like netstat -nab | grep -i list to get the ports in use along with what application is holding that port.

  • No labels