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

Synchrony not switching to Synchrony-proxy after configuration from documentation.

    XMLWordPrintable

Details

    Description

      Summary

      Set up Confluence with internal Synchrony proxy and Apache from official documentation page

      Create new page or edit old one. Error message will be displayed "Unable to communicate with server. Saving is not possible at the moment.".

      Specifying below setting inside server.xml, causes several JS files to point to wrong location on server.

      proxyName="localhost" proxyPort="8090"

      Environment

      • CentOS Linux release 7.3.1611 (Core)
      • Java 1.8.0_111
      • Confluence 6.0.1,6.0.2,6.0.3
      • Apache/2.4.6 (CentOS)

      Steps to Reproduce

      Follow the documentation for setting up Confluence server with internal synchrony proxy. And setup confluence - server.xml, confluence-home - confluence.cfg.xml and apache - apache.conf like this:

      server.xml

      <Server port="8000" shutdown="SHUTDOWN" debug="0">
          <Service name="Tomcat-Standalone">
              <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                      maxThreads="48" minSpareThreads="10"
                      enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                      protocol="org.apache.coyote.http11.Http11NioProtocol"/>
                      proxyName="localhost" proxyPort="8090" />
      ...

       

      confluence.cfg.xml

      ...
      <property name="synchrony.proxy.enabled">true</property>
      ...

       
      apache.conf

      ...
      <VirtualHost *:80>
        ProxyRequests Off
        ProxyPreserveHost On
      
        RewriteEngine On
        RewriteCond %{REQUEST_URI} !^/synchrony
        RewriteRule ^/(.*) http://localhost:8090/synchrony-proxy/$1 [P]
      
        <Proxy *>
            Require all granted
        </Proxy>
      
      ProxyPass /synchrony-proxy http://localhost:8090/synchrony-proxy
      
      <Location /synchrony-proxy>
          Require all granted
          RewriteEngine on
          RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
          RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
          RewriteRule .* ws://localhost:8090%{REQUEST_URI} [P]  </Location>
      </Location>
      
        ProxyPass / http://localhost:8090
        ProxyPassReverse / http://localhost:8090
      
        <Location />
            Require all granted
        </Location>
      </VirtualHost>
      ...

      Expected Results

      With internal synchrony proxy set as per documentation, we can save changes in editor.

      Actual Results

      When trying to save page, error message is displayed: "Unable to communicate with server. Saving is not possible at the moment."

      Logs are not showing errors (catalina, confluence or synchrony), only 404 in web browser inspect under network for several resources e.g:
      http://localhost/synchrony/resources/js/vendor/sockjs.min.js
      http://localhost/synchrony/resources/js/synchrony.min.js

      Resources are available in these locations:
      http://localhost/synchrony-proxy/resources/js/vendor/sockjs.min.js
      http://localhost/synchrony-proxy/resources/js/synchrony.min.js
       
      Workaround

      If inside server.xml proxyName and proxyPort are removed, urls will change for resources mentioned in Actual Result from synchrony to synchrony-proxy, but then new problems will appear.
      At this point there is no workaround.

      Attachments

        Issue Links

          Activity

            People

              rrobins Rachel Robins
              gpaunovic g
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: