Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-56560

Confluence Installer does not work behind a Reverse Proxy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.1.0, 6.6.8, 6.11.1, 6.11.2, 7.0.3, 7.6.0, 7.16.0

    Description

      Summary

      Confluence installation process keeps falling at the setup database process when behind the proxy with SSL enabled. The installation process successful after disabling the SSL or bypassing the proxy, however, this is not acceptable in the environment that proxy and SSL is mandatory.

      Test Environment

      • Confluence 6.11.2
      • Nginx latest version with the self-signed certificate

      Steps to Reproduce

      1. Download the latest version of the Confluence
      2. Configure Proxy with SSL, Nginx for example:
        ...
        listen 443 default ssl;
        ssl_certificate      /nginx.crt;
        ssl_certificate_key  /nginx.key;
        ...
        location / {
            client_max_body_size 100m;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass http://localhost:8090;
        }
        
      3. Start Confluence installation
        ./start-confluence.sh
        
      4. Navigate to https://<your_proxy_url>
      5. Choose the production installation type
      6. Enter your license
      7. Connect to your database

      Expected Results

      Installation should work

      Actual Results

      H2 or external database thrown errors like the following and installation failed.

      HTTP Status 500 - Unable to register MBean [com.atlassian.confluence.jmx.TaskQueueWrapper@b873267] with key 'Confluence:name=MailTaskQueue'; nested exception is javax.management.InstanceAlreadyExistsException: Confluence:name=MailTaskQueue
      
      Error creating bean with name 'tenantedTransactionManager' defined in class path resource [databaseSubsystemContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedLocalSessionFactoryBean5' defined in class path resource [productionDatabaseContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: premature SessionFactory initialisation, Hibernate properties have not yet been persisted in confluence.cfg.xml
      
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedTransactionManager' defined in class path resource [databaseSubsystemContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tenantedLocalSessionFactoryBean5' defined in class path resource [productionDatabaseContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: premature SessionFactory initialisation, Hibernate properties have not yet been persisted in confluence.cfg.xml
      

      Notes

      • Installation worked flawlessly with Jira and Bamboo

      Workaround for Nginx

      Proxy timeout needs to be increased by adding the following parameters under the server config of Confluence. The following values increases the timeout to 10minutes.

        proxy_connect_timeout       600;
        proxy_send_timeout          600;
        proxy_read_timeout          600;
        send_timeout                600;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lwang3@atlassian.com Lei Wang
              Votes:
              11 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated: