1. Sebastian Sdorra
  2. scm-manager
Issue #174 resolved

cannot run scm manager behind reverse proxy

srsarangi
created an issue

dear Sebastian, My group is a very avid user of SCM Manager. However, we have this issue.

SCM Manager works perfectly if it is accessed using the url that it is setup with. We invoke it as follows: hg clone http://johndoe:8080/scm/hg/project

We now set up a reverse proxy to access SCM Manager from outside our firewall of the form: http://domain/scmmanager --> http://johndoe:8080/scm

This used to work perfectly when our server ran Ubuntu 11.10. However, it has stopped working after upgrading the OS to Ubuntu 12.04. I tried to force the base url, and even changed urllib to urllib2 in scmhooks.py. Nothing works.

Here is the exception at the server side: org.eclipse.jetty.io.EofException: null at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:921) ~[na:na] at org.eclipse.jetty.server.HttpConnection.flushResponse(HttpConnection.java:612) [jetty-server-7.5.4.v20111024.jar:7.5.4.v20111024] at org.eclipse.jetty.server.HttpConnection$Output.close(HttpConnection.java:995) ~[na:na]

At the client side, hg just hangs at the line: Adding Changesets

thanks for your help Prof. S. R. Sarangi

Comments (10)

  1. srsarangi reporter

    (Reply via srsa...@cse.iitd.ac.in):

    <Location /srishtihg> ProxyPass http://srishtisrv6.cse.iitd.ac.in:8080/scm ProxyPassReverse http://srishtisrv6.cse.iitd.ac.in:8080/scm ProxyHTMLURLMap http://srishtisrv6.cse.iitd.ac.in:8080/ /srishtihg SetOutputFilter proxy-html ProxyPassReverseCookieDomain srishtihg.cse.iitd.ernet.in www.cse.iitd.ernet.in ProxyPassReverseCookiePath /srishtihg /srishtihg ProxyHTMLURLMap / /srishtihg ProxyHTMLExtended On ProxyHTMLLogVerbose On </Location>

    Mercurial version 2.0.2

  2. Eduard-Cristian Stefan

    Reformatted:

    <Location /srishtihg>
        ProxyPass http://srishtisrv6.cse.iitd.ac.in:8080/scm
        ProxyPassReverse http://srishtisrv6.cse.iitd.ac.in:8080/scm
        ProxyHTMLURLMap http://srishtisrv6.cse.iitd.ac.in:8080/ /srishtihg
        SetOutputFilter proxy-html
        ProxyPassReverseCookieDomain srishtihg.cse.iitd.ernet.in www.cse.iitd.ernet.in
        ProxyPassReverseCookiePath /srishtihg /srishtihg
        ProxyHTMLURLMap / /srishtihg
        ProxyHTMLExtended On
        ProxyHTMLLogVerbose On
    </Location>
    
  3. Sebastian Sdorra repo owner

    This configuration works on the older ubuntu version? It is possible that mercurial was updated with the os update? Because version 1.11 of SCM-Manager does not support mercurial version 2.1 or above.

  4. Sebastian Sdorra repo owner

    Changing the contextpath in the proxy configuration is not a good idea, because it breaks the subversion support and perhaps other things. A better solution is to change the contextpath in the server-config.xml:

    Search for:

        <Set name="contextPath">/scm</Set>
    

    And replace it with:

        <Set name="contextPath">/srishtihg</Set>
    

    After that you have to change your proxy configuration.

  5. srsarangi reporter

    (Reply via srsa...@cse.iitd.ac.in):

    I am using mercurial 2.0.2. This configuration is working perfectly when I am within the LAN. Even the reverse proxy is working. The problems happen when I access my server through the reverse proxy mechanism outside the LAN. I believe it has to do something with the apache settings. Do you think it is ok?

  6. srsarangi reporter

    A minor change in the apache configuration fixed the problem.

    <Location /srishtihg>

    ProxyPass http://srishtisrv6.cse.iitd.ac.in:8080/scm

    ProxyPassReverse http://srishtisrv6.cse.iitd.ac.in:8080/scm

    ProxyHTMLURLMap / /srishtihg

    ProxyHTMLURLMap http://srishtisrv6.cse.iitd.ac.in:8080/scm /srishtihg

    SetOutputFilter proxy-html

    ProxyPassReverseCookieDomain srishtihg.cse.iitd.ernet.in www.cse.iitd.ernet.in

    ProxyPassReverseCookiePath /srishtihg /srishtihg

    ProxyHTMLExtended On

    ProxyHTMLLogVerbose On

    </Location>

  7. Log in to comment