1

I want to configure the Jira-Access over AJP-Proxy. I 'm following this howto

  1. In the server.xml I activate the AJP:

    <Connector port="8089" redirectPort="8444" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

  2. Edit VHOST configuration:

    # Load Proxy-Modules
    LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
    LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
    
    # Load AJP-Modules
    LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
    
    
    # Proxy Configuration
    
    <IfModule proxy_http_module>
        ProxyRequests Off
        ProxyPreserveHost On
    
        # Basic AuthType configuration
        <Proxy *>
            AuthType Basic
            AuthName Bamboo-Server
            AuthUserFile /var/www/userdb
            Require valid-user
    
            AddDefaultCharset off
            Order deny,allow
            Deny from all
            Allow from 192.168.0.1
            satisfy any
        </Proxy>
    
        ProxyPass        /bamboo http://localhost:8085/bamboo
        ProxyPassReverse /bamboo http://localhost:8085/bamboo
    
        ProxyPass        /jira ajp://localhost:8009/
        ProxyPassReverse /jira ajp://localhost:8009/
    </IfModule>
    

But it doesn't work.

In the logs, I found:

//localhost:8080/
[Fri Nov 19 14:51:13 2010] [debug] proxy_util.c(1819): proxy: worker ajp://localhost:8080/ already initialized
[Fri Nov 19 14:51:13 2010] [debug] proxy_util.c(1913): proxy: initialized single connection worker 1 in child 5578 for (localhost)
[Fri Nov 19 14:51:32 2010] [error] ajp_read_header: ajp_ilink_receive failed
[Fri Nov 19 14:51:32 2010] [error] (120006)APR does not understand this error code: proxy: read response failed from (null) (localhost)
[Fri Nov 19 14:51:32 2010] [debug] proxy_util.c(2008): proxy: AJP: has released connection for (localhost)
[Fri Nov 19 14:51:32 2010] [debug] mod_deflate.c(615): [client xx.xx.xx.xx Zlib: Compressed 468 to 320 : URL /jira

Somebody have an idea?

masegaloeh
  • 18,236
  • 10
  • 57
  • 106

3 Answers3

2

Have you got the right port there? There are two different connectors in the JIRA server XML. The HTTP one is on 8080 by default.

The AJP one is normally 8009 by default:

<Connector port="8009" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25"
 maxSpareThreads="75" useBodyEncodingForURI="true" enableLookups="false"  
 redirectPort="8443" protocol="AJP/1.3" acceptCount="100" connectionTimeout="20000"
 disableUploadTimeout="true" /> 

EDIT

Now you have the right port it appears to be a protocol problem. I would verify that the proxy_ajp_module is loading correctly:

apache2ctl -t -D DUMP_MODULES

You might want to move all of your proxy settings out of the <IfModule proxy_http_module> section to test too.

BoyMars
  • 1,012
  • 1
  • 6
  • 15
0

I have active the AJP-Connetor in JIRA server-xml:

<Connector port="8089" redirectPort="8444" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

The Port 8009 are also listening: netstat -ntpl | grep 8009
tcp6 0 0 127.0.0.1:8009 :::* LISTEN 20767/java

EDIT Oh shit, I´m bliend :-/ Know I understand what U mean. I´ve edit the wrong port ... I will try it immediately

EDIT2 I have now change the Port in the server.xml

<Connector port="8009" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75" useBodyEncodingForURI="true" enableLookups="false"
redirectPort="8443" protocol="AJP/1.3" acceptCount="100" connectionTimeout="20000"
disableUploadTimeout="true" />

But it dosen´t work! I became a Internal Server Error. In the Apache log, i found this error:
No protocol handler was valid for the URL

  • sorry dont mean to repeat but 8089 you have in your server xml is not the 8009 that you are expecting in your apache config – BoyMars Nov 19 '10 at 15:13
0

Your apache with ajp is probably trying to connect to the port mentioned via ipv4, while the service is only listening on ipv6...

rackandboneman
  • 2,577
  • 11
  • 8