Changing Jira application TCP ports

Why change Jira application TCP ports?

By default, Jira applications use TCP listening port 8080 and hence, Jira applications are typically available at http://<yourserver>:8080.

If, however, an existing service running on your machine is claiming port 8080, there will be a conflict and Jira applications will fail to start. You may see errors like this:

LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080

This can be fixed by changing Jira applications to use another TCP listening port (eg. 8100) and shutdown port (eg. 8015).

Changing Jira application TCP ports

Before you change Jira application TCP ports, read the following:

  • Which port number should I choose? If you are not sure which port number to choose, use a tool such as netstat to determine which port numbers are free to use by Jira applications. The highest port number that can be used is 65535 because it is the highest number which can be represented by an unsigned 16 bit binary number. The Internet Assigned Numbers Authority (IANA) lists the registration of commonly used port numbers for well-known Internet services, it's advisable to avoid any of those ports.
  • A note about firewalls: When you choose a port number for Jira, bear in mind that your firewall may prevent people from connecting to Jira based on the port number. Organizations with a local network protected by a firewall typically need to consider modifying their firewall configuration whenever they install a web-based application (such as Jira) that is running on a new port or host. Even personal laptop and desktop machines often come with firewall software installed that necessitates the same sort of change as described above. If Jira does not need to be accessed from outside the firewall, then no firewall configuration changes will be necessary.

You can change Jira's TCP ports by using the Jira configuration tool or by manually editing the server.xml file. If you installed Jira using the 'Windows Installer', 'Linux Installer', or from an 'Archive File', you can use the Jira configuration tool.

Changing Jira's TCP ports using the Jira configuration tool

  1. Start the Jira configuration tool. See Using the Jira configuration tool for instructions on where to find the tool.
  2. Click the Web Server tab.
  3. In the HTTP Port field, enter the new TCP listening port number.
  4. In the Control Port field, enter the new TCP shutdown port number.
  5. Click the Save button. Your changes are saved to the server.xml file located in the conf subdirectory of your Jira application installation directory.

Changing Jira's TCP ports by editing the server.xml file

Edit the server.xml file in the conf subdirectory of the Jira installation directory. The start of the file looks like:

<Server port="8005" shutdown="SHUTDOWN">

  <Service name="Catalina">

    <Connector port="8080"
      maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
      enableLookups="false" redirectPort="8443" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" />

    ...

For example, change the shutdown port from "8005" to "8015" and the listening port (i.e. in the <connector/> element) from "8080" to "8100". (See below to decide which TCP port numbers should be used for Jira.)

Then, restart Jira and point a browser to http://<yourserver>:8100

(minus) If you are running on a Unix server and bind the ports below 1024 (such as port 80 for example), you will need to start Jira as root in order to successfully bind to the port.

Related topics

Changing Confluence's listening ports

Last modified on Nov 21, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.