Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

Problem

This page tells you what to do if you get errors like the following when starting Confluence, when you can't access Confluence on port 8090.

If you see this error:

This means you are running other software on Confluence's default port of 8090. This may be another other process running on the same port. It may also be a previous instance of Confluence that hasn't been shut down cleanly.

To find out what process is listening on that port, load a command prompt and type: netstat -an

 -a : Displays all active TCP connections and the TCP and UDP ports on which the computer is listening.
 -n : Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.

There is also Process Explorer tool available to determine what is binding port 8090.

Solution: Change the Ports which Confluence Listens On

To change the ports for Confluence, open the file conf/server.xml under your Confluence Installation directory. The first four lines of the file look like this:

Default conf/server.xml

You need to modify both the server port (default is 8000) and the connector port (default is 8090) to ports that are free on your machine. The server port is required by Tomcat but is not user facing in any way. The connector port is what your users will use to access Confluence, eg in the snippet above, the URL would be http://example.com:8090.


(tick) Hint: You can use netstat to identify free ports on your machine. See more information on using netstat on
Windows or on Linux.

For example, here are the first four lines of a modified server.xml file, using ports '8020' and '8099':

Modified conf/server.xml using ports 8020 and 8099

To access Confluence in this configuration, point your web browser to http://localhost:8099/.

Icon

You should also ensure at this point that if you are using a firewall, it is configured to allow http/https traffic over the port you have chosen.

Once this is working, if this is the URL your users will use, remember to update your Base URL to point to the new URL.

NOTES

[1] For more information on netstat, see using netstat on Windows, or netstat man page (Linux).

[2] The JIRA distribution runs on port 8080 by default. If you're looking to change the port of the JIRA distribution, see Changing JIRA Standalone's port.

RELATED PAGES

Installing Confluence
Documentation Home

27 Comments

  1. I try to change the Connector Port from 8080 to 80. ( only the Connector not the 8000 Port)

    What I do:

    Change the server.xml Connector Port 8080 to 80

    Restart the the confluence server

    What am I doing wrong

    1. Hi Christian,

      As far as I am concerned, your port 80 may be occupied by another application. Please use the netstat -an in command prompt to check whether the port is occupied or not. Another way to check is to run your browser and try accessing http://<host-name>:80. If any other application is running on it, try shutting down that application and restart your confluence again or you can change the port number.

      You can also telnet to the port number to see if the port is being used:

      telnet <host-name> <port>

      If the port is occupied, it will return a blank screen.

      Hope that helps.

      Cheers,
      Komathi

      1. Anonymous

        Christian,

        I ran into this problem too and the key for me was to uninstall Internet Information Services (IIS) off my server, because it too lists port "80" as one of its primary ports.

        Good Luck

    2. Anonymous

      If it's a linux box: Only root can bind to ports below 1024.  You have to bind confluence to a port over 1024 and then configure iptables to redirect traffic to port 80 to the higher port.  You can run the following command as root:

      iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

       

      1. Anonymous

        yup, this is what I had to do to make it work as well. Using CentOS 6. Changed the server.xml file to use port 80. Stopped and restarted confluence service but the service wouldn't start (netstat showed nothing listening on port 80). Changed the port in server.xml to 8080 and used the iptable statement from above. Works great great!

  2. Anonymous

    Also remember that on linux, you usually have to start the program as root for it to be able to bind port 80...

  3. Anonymous

    Hi all,

    i'm new to confluence, but some how i installed on ubuntu machine, coming to the port numbers i changed default port number from 8080 to 8090 in server.xml file, after refreshing the browser i have a message like "page load error", previously i used the default port 8080, its working fine with confluence, but where as tomcat is not running. i tried to assign a port number using iptables and ufw firewall in ubuntu machine, i havn't had any success. so how to resolve this issue.

    advance thanks3

    V

    1. Hi V,
      May I know if Confluence has been restarted after the change? In most situations, we don't need to manually assign the port via iptables nor firewall. Simply editing the server.xml > save the changes > restart Confluence will do.

      If the problem still persists, please raise a support ticket in https://support.atlassian.com, and attach your server.xml and confluence log for further investigation.

      Hope it helps.

      Cheers,
      Jack

      1. Anonymous

        Hi Jack,

        tx fr reply..i somehow edited the server.xml and setenv.sh files, it was worked fine for some time, while i'm configuring the database there was an error message "problem loading page" and "connection timed out". do i need to run "./startup.sh" each and every time?

        advance Thanks

        V

  4. Anonymous

    ok, have the same issue, I need to change the port of Confluence from 8080 to 80

    Running Mac OSX Server 10.5 (4 Gb Memory), does nothing else other than run Confluence

    We can access the Swiki via http:
    swiki.companyname.com:8080 and I need to change it to port 80 so the new URl would be: http:
    swiki.companyname.com

    I have added a port forward in the terminal using the SUDO command (sudo ipfw add 100 fwd 127.0.0.1, 8080 tcp from any to any 80 in), this works on a standard version of 10.5 on an old iMac, but on the xserve I get nothing? what am I doing wrong. I have also changed the server.xml file from 8080 to port 80 and back again, restarted many time, still nothing.

    TDOD 

  5. I am unable to find the server.xml file.

    I just installed the evaluation version and cannot find it anywhere.

    I have done a similar change to my Jira installation, so I find it weird that I cannot find it in the confluence installation.

    1. Hi Ivar,

      Not sure if you have the access to the whole Confluence installation but the server.xml file should be under <Confluence_install>/conf/ directory. Anyway, is your Confluence installation a Standalone type, EAR/WAR type or Clustered type?

      Hope this helps.

      Cheers,
      Joa

  6. Anonymous

    i can't find server.xml too...

    1. Hi there,

      Not sure if you have the access to the whole Confluence installation but the server.xml file should be under <Confluence_install>/conf/ directory. Anyway, is your Confluence installation a Standalone type, EAR/WAR type or Clustered type?

      Hope this helps.

      Cheers,
      Joa

      1. Anonymous

        I also cannot find the server.xml file(running windows eval mode btw)....checked in install dir(which doesn't even have a conf dir), as well as %myusername%\AppData\Roaming\Atlassian Evaluation\work\confluence\3.4.6\tomcat and did a full search!  What gives here? I guess i'll call into support because my company needs it on port 80.

        1. Hi,

          Unfortunately it is not possible to change your port on "One-click Installer" version since this version is intended for evaluation purposes only.
          If you would like to be able to configure the application to certain extent, I'd suggest you to try out the Standalone version.

          I hope this information would help

          Cheers,
          Septa cahyadiputra

  7. Anonymous

    I can't seem to find this server.xml file either we are running the evaluation version as well.  any hints?

    1. Hi,

      Regarding your server.xml file.

      • If you are using "One-click Installer for Windows", unfortunately you can't configure the port since this version is intended for evaluation purposes only. If you would like to be able to configure the application to certain extent, I'd suggest you to try out the Standalone version.
      • If you are using "Confluence Standalone" version as explained above you can change your port number by accessing <confluence_install>/conf/server.xml
      • If you are using EAR/WAR version you could configure it from your application server (eg. Tomcat) configuration.

      I hope this information would help you

      Cheers,
      Septa Cahyadiputra

  8. Anonymous

    Does the port 8000 in ther example need to be available externally, or only locally.  I know remote machines will connect via 8090, so why is 8000 different, and would I need to expose that port on our firewall as well, how about port 8443?

  9. While accessing the browser with the url http://localhost:8081/ . I am getting an error. 

    HTTP Status 404 -


    type Status report

    message

    description The requested resource () is not available.


    Apache Tomcat/6.0.32

    Earlier it was working fine. But instantly stopped working. May I know the cause ?

  10. Anonymous

    iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

    and

     

    iptables: No chain/target/match by that name.

    what s wrong? 

  11. Hey,

    i changed the port from 8080 to 80 and i can succesfully connect and work with our confluence. But the internal URL´s, like user signup or similiar links still reference to port 8080. Is there anyway to change them without reinstalling confluence?

    Best regards

    1. Hi Alexander, sounds like you just need to set the Base URL. See Configuring the Server Base URL for details.

      -Denise.

  12. Anonymous

    Hello,

    I am trying to update the base URL, however in the General Configuration/Site configuration section, the field has been greyed out.  Can you please provide some advice?

    Cheers

  13. I changed the port and everything looks OK.

    However, when I receive email notification when other users change any pages, the links in that email still have old port.

    Do I need to change anywhere else to update this port in the link as well?

     

    Thanks!

    1. Hi Eddie! Yes, links like this are generated from the Base URL, so you will need to update that as well (in Admin > General Config). I'll update the page to include this step too.

    2. Hi Eddie! Yes, links like this are built using the Base URL setting in Admin > General Config, so you'll need to update that. I'll update this doc to include that step as well.