Running YouTrack alongisde IIS but on a dedicated IP?

I am currently running YouTrack on a server using port XXXX and IIS on 80/443.

However, I have a few IP addresses available and I'd like to dedicate 1 of them to running YouTrack on port 80. 

Hari Lubovac

For those who want to host both websites at IIS and JIRA at Tomcat, on the same machine, on port 80, there is a solution - as follows.

It should be obvious that both IIS and Tomcat cannot both listen on port 80 at the same time, over the same IP addresses. Therefore, those that want this must already understand that they need different IP addresses available.

The problem is that IIS, by default, listens to "ANY" (all) IP address(es) available on the machine (0.0.0.0:80). If we want JIRA@Tomcat to also be available on port 80 (obviously at a different IP address) we need to somehow configure IIS to not bind to ANY IP address, but to only bind to those used by websites that it serves. Fortunately, there's a way to do just that.

All credit goes to Steve Schofield: http://weblogs.asp.net/steveschofield/archive/2007/07/06/iis7-post-44-iis7-and-apache-on-the-same-machine.aspx
Open command prompt
Type netsh
Type http
Type sho iplisten; result should be blank
Type add iplisten ipaddress=xxx.xxx.xxx.xxx; repeat this for all IP addresses used by websites hosted on IIS
Type sho iplisten again to verify
Iisreset

Configure JIRA to listen on one exact IP address. That will mean a few changes to [JIRA install dir]\conf\server.xml, and it's documented at the following two pages:
http://confluence.atlassian.com/display/JIRA/Changing+JIRA+Standalone%27s+port
http://forums.atlassian.com/thread.jspa?messageID=257310077&#257310077

Hint:

<Connector port="80" address="xxx.xxx.xxx.xxx"

I hope that helps others. It helped me. On the same machine, I now have websites at IIS all listening on 80 (and 443), on dedicated IP addresses, and I have JIRA working on its own dedicated IP address over port 80. I hate port numbers in URLs (which motivated me for this research), and I didn't quite like the solution with forwarding (described above) and the part about the path (/jira).

Edit: I just finished setting up confluence on the same machine, same port (80).

I came across the  post above and I tried it out but I keep getting

java.net.SocketException: The requested address is not valid in its context;

I'm not keen on the the Tomcat IIS connector and I think our other services will be impacted by  Application Request Routing/url redirect.

Do I have a hope and I am I just missing out becuase of a lack of Tomcat experience (I'm a .Net developer) on my part?

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

Feb 24, 2012 6:39:58 PM org.apache.coyote.http11.Http11AprProtocol init

SEVERE: Error initializing endpoint

java.lang.Exception: Socket bind failed: [730049] The requested address is not valid in its context. 

at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)

at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)

at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)

at org.apache.catalina.startup.Catalina.load(Catalina.java:524)

at org.apache.catalina.startup.Catalina.load(Catalina.java:548)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Feb 24, 2012 6:39:58 PM org.apache.catalina.startup.Catalina load

SEVERE: Catalina.start

LifecycleException:  Protocol handler initialization failed: java.lang.Exception: Socket bind failed: [730049] The requested address is not valid in its context. 

at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)

at org.apache.catalina.startup.Catalina.load(Catalina.java:524)

at org.apache.catalina.startup.Catalina.load(Catalina.java:548)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Feb 24, 2012 6:39:58 PM org.apache.catalina.startup.Catalina load

2 comments
Comment actions Permalink

Hello,

Though IIS is not in the list of our supported environments, our QAs will try to investigate your case, and we will let you know if we get any luck with it.

Meanwhile I would suggest you to contact the author of this blog-post http://blog.endjin.com/2010/11/a-step-by-step-guide-to-hosting-youtrack-in-iis-7/ , who obviously has some expirience with running YouTrack with IIS, and maybe will be able to help you.

On our side, we will contact you when we have any update on your case.

Sorry for the delay and not being more helpful.

Best regards,

Ekaterina

0
Comment actions Permalink

Hello!

I can't exactly reproduced your problem because my computer has only one ip-adress.

May be it helps you:
http://tomcat.10.n6.nabble.com/Tomcat-issues-error-message-after-IP-address-got-changed-5-5-26-td2030311.html

Best regards,

Kapusta Mikhail

QA Engineer

0

Please sign in to leave a comment.