Integrating JIRA with IIS using ARR

Melina Cormier May 1, 2013
I am trying to integrate with IIS and have followed the instructions here: https://confluence.atlassian.com/plugins/servlet/mobile#content/view/313467089 Now when I try to access jira.mydomain.com externally I get a 500 internal server error. If I access http://localhost:8080 locally I get a 404 not found error. I tried the AJP connector as well but have the exact same issue. Any help would be greatly appreciated!

9 answers

1 accepted

1 vote
Answer accepted
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2013

So if I understood it correctly, Microsoft Dynamics CRM is running on port 80 and JIRA side in IIS is also running on port 80 and they are on the same server, right?

If so, then this will cause conflict and we'll have to choose one of these side and change the port. After this, if you change the port of JIRA site on IIS to for example 81, try to access localhost:81 and let me know if it brings any improvement.

Cheers

Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

Hi Melina,

I'm converting this comment as the answer since we were able to identify what was wrong with the IIS integration.

As we see in your last comment, now the problem seems related to something in your router, I'd suggest that you create a separated question for that.

Cheers

1 vote
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2013

Hi Melina,

The errors 500 and 404 are actually thrown by IIS itself, so we'd know more about the cause of this problem if we check IIS logs.

Cheers

Melina Cormier May 1, 2013

The only information in my log file is a number events saying "worker process serving application pool was shutdown due to inactivity"

0 votes
Melina Cormier May 2, 2013

Great! :) it works internally now. If I access localhost:8080 it directs me properly to jira.mydomain.com:81 and everything functions as expected.

Now it still doesn't work externally if i go to jira.mydomain.com from outside the network it actually brings me to my CRM site on Port 80. I'm assuming this is due to settings on the router?

0 votes
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

You just need to change the proxyPort parameter into your JIRA server.xml, also described in step 5 of this KB.

Cheers

0 votes
Melina Cormier May 1, 2013

That is correct. I will give this a try and change the port in IIS to 81. Do I need to change anything in my server.xml?

0 votes
Melina Cormier May 1, 2013

Hi Tiago,

I don't have any context path defined.

The JIRA site in IIS is defined to port 80.

JIRA is installed on the same box as IIS.

Here is the contents of my server.xml file.

<?xml version="1.0" encoding="UTF-8"?>

<Server shutdown="SHUTDOWN" port="8005">

<Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/>

<Listener className="org.apache.catalina.core.JasperListener"/>

<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>

<Service name="Catalina">

<Connector port="8080" useBodyEncodingForURI="true" redirectPort="8443" protocol="HTTP/1.1" minSpareThreads="25" maxThreads="150" maxSpareThreads="75" maxHttpHeaderSize="8192" enableLookups="false" disableUploadTimeout="true" connectionTimeout="20000" acceptCount="100" proxyName="jira.mydomain.com" proxyPort="80"/>

<Engine name="Catalina" defaultHost="localhost">

<Host name="localhost" autoDeploy="true" unpackWARs="true" appBase="webapps">

<Context useHttpOnly="true" reloadable="false" docBase="${catalina.home}/atlassian-jira" path="">

<Resource name="UserTransaction" jotm.timeout="60" factory="org.objectweb.jotm.UserTransactionFactory" type="javax.transaction.UserTransaction" auth="Container"/>

<Manager pathname=""/>

</Context>

</Host>

<Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%q %H" %s %b %D "%{Referer}i" "%{User-Agent}i" "%{jira.request.assession.id}r"" resolveHosts="false"/>

</Engine>

</Service>

</Server>

Thanks for your help!

0 votes
Tiago Comasseto
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2013

Hi Melina,

The port redirection may be something, but before checking what's wrong with the external access, we need make sure localhost is working.

Regarding this information:

Also, to correct what I said above I actaully don't seem to get any response when I try to access http://localhost:8080 it just kind of sits there. I get the 404 not found error when I use http://localhost:8080/jira.mydomain.com

  • Do you have any context path defined in JIRA?
  • Which TCP port is defined to JIRA?
  • Is JIRA installed on the same server as IIS?
  • What is the TCP port defined to JIRA site in IIS?

Cheers

0 votes
Melina Cormier May 1, 2013

For more information:

I am running JIRA on a Windows Server 2008 box that is connected to an office network with a Cisco Router. The same box is also running Microsoft Dynamics CRM (on port 80) could this be causing the conflict?

For external access I opened Port 80 in the router and set it to redirect to the IP of the Windows Server box.

Also, to correct what I said above I actaully don't seem to get any response when I try to access http://localhost:8080 it just kind of sits there. I get the 404 not found error when I use http://localhost:8080/jira.mydomain.com

And the box is running IIS7

0 votes
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 1, 2013

Hey there, Melina.

In addition to performing the instructions on the documentation, did you check on the comment that was provided by a user in there as well:

"Fixed: need to set up preserveHostHeader option to true:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/proxy -preserveHostHeader:true"

Can you give that a try?

Warm regards,

Danial

Melina Cormier May 1, 2013

Hi Danial,

I did see that comment and set the preserveHostHeader option to true, but it made no difference.

Suggest an answer

Log in or Sign up to answer