Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Changing the default port numbers

Excerpt

As we briefly mentioned earlier, the <GERONIMO_HOME>/var/config/config-substitutions.properties lets you specify a totally new set of ports 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 configuration for more details on how to configure a web application cluster in Geronimo Other than that, you can define different variables and their substitution values in this file, which will be used when processing the corresponding config.xml. These substitution values can be overridden by environment variables and system properties by prefixing the property name with org.apache.geronimo.config.substitution.

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

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 Configuring and administeringthe Web Container section. However, if you have port conflicts at start up time the Geronimo administration console will not be available, so we have to focus on configuring the config-substitutions.properties file by choosing a new PortOffset value(the default is 0).

...

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 with 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.