Wednesday, March 23, 2011

tomcat: Another way to connect IIS and Tomcat

If you were working with tomcat and IIS for a while you know things are getting a little long in the tooth. The last principle update to how IIS and Tomcat interact was made in early 2000. In the meantime many changes have occured to IIS and Tomcat with more capabilities added.
So, I thought it would be time to also update the way IIS and Tomcat connect.
I just published a project on RIAForge whose goal is to modernize this part:

Lastest Release Available on Github.

Online Documentation is regularly updated.

Here are some reasons to consider a new connector:
• no ISAPI code
• no IIS6 vestiges or backward compatibility elements needed on IIS7
• all managed code using the modern extensibility framework
• works on IIS6 and IIS7
• speed improvements
• easier control by file type on IIS side
• no virtual directories and virtual mapping needed
• configuration can be inherited to sub-sites and virtual sites
• easy install/uninstall
• support partial stream sending to browser (automatic flushing) with faster response to client
• support both 32/64 bit of Windows with same process and files
• transfer of all request headers to servlet container
• build in simple-security for web-administration pages

Happy experimenting,
B.

67 comments:

spills said...

Just started playing with this and so far seems like a great alternative to the "wonderful" Tomcat connectors! I could not get it to work with .Net framework 4.0xxx but works fine with earlier version. One thing I am unclear on, do you a BIN dir with the .dll's for every individual site? I couldn't get it to work otherwise in other domains.

bman said...

spills:
Thanks for your feedback.

You can register the Mapped handler globally but need to copy the BIN folder into each site unless you are sharing the same paths for your sites.
The .net framework I tested with is 3.5; this will still show as v2.0 on the Application pool selection.

I wanted to make sure that the older framework still can use it.

spills said...

Well if I have more than a few sites and they are active what type of memory issues will I have with all of the dlls,s loaded in memory?

bman said...

spills:
good question.

In general, if we assume that you are constrained on your server (maybe 256MB total (this is below recommendation to run any OS), and, for example, could only allocate 10MB for the connector. Given that connectors only use 42KB when loaded it would mean that even with this setup you could support 220+ websites on the smallest of servers imaginable.
More importantly, these are managed code based connectors so you can control their behavior by tweaking their application pools.
In addition, these connectors are focused on transferring content as soon as possible to the browser and releasing memory faster with fewer copies of data. This is in contrast to the older ones which consumed memory to store the complete byte streams then had to make a copy into IIS memory, then move it to browser.
But every system has bottlenecks and as a consequence pieces will start to fail given sufficient load. In such scenarios, you are more likely to blow IIS and/or tomcat out of the water on any server regardless of size way before you will have to worry about connectors. This is how it should be.

If you experienced any memory issues that look inconsistent, please let me know.

drlarsen said...

I've been playing around with this and it seems to work quite well. I have two questions for you though:

1) Is the source code available?

2) I would like it to pass additional file types to Tomcat. I have one site where the path does not have file extensions. I tried adding additional httpHandlers to web.config, but it seems to ignore all but JSP and CFM, even if I use path="*". How can I additional types?

Thanks!

drlarsen said...

Actually, I realized my mistake with question #2. The file extensions have to be mapped to aspnet_isapi.dll, or a wildcard map to handle all types.

bman said...

Thanks for your feedback.
If you are using IIS6 or 5.1 you have to do the mapping in web.config; in IIS 7 the handler feature can be used to add mappings.

Source code is available. The pdf document contained in the distribution package has information (a link) to download source code.

drlarsen said...

Ahh, so it is. I guess I just mentally skipped over the License section. :) Thanks!

Lance said...

I'm using iis 7.5 and tomcat 6. Tomcat is running on a different server then iis. I can get my jsp login page to display but when it goes to login I get .net runtime error as follows:

"Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine."

The application runs fine when I run it locally on the server using tomcat but get that error when running through the tomcat connector.

I also configured Handler Mappings to use BonCodeAll with * as described in the pdf but I still get missing images every now and then.

Any help would be great.

Douglas said...

Found this the other day, and it worked on my laptop which has IIS 7.5, and I was so happy, because I can now start learning JSP. However, I'm trying to install it on my IIS 6 production server, and I'm facing a couple of issues. I was confused at first by it pointing to the ASP.NET isapi, but realized that's the way it's supposed to be. Just now I'm facing .NET request timeout errors and blank pages. I'm a bit stumped at this one, so hope you might be able to offer a suggestion.

Douglas said...
This comment has been removed by the author.
bman said...

Douglas:
be glad to assist. Do you have a screenshot or can paste the exact error text from your production server with the error page?
Unfortunately, the configuration for IIS6 and IIS5 is quite a bit different from IIS7+.

The most common problem with timeouts I have seen are related to the tomcat server either not using the default port or being located on different server. In those circumstances there are instructions in the manual (pdf) within the download package how to change this.
The easiest way to determine which port tomcat is using is to check the server.xml file in the conf directory of your tomcat installation.

If this is not the issue you can post me message using the "contact project" link at http://tomcatiis.riaforge.org. This will allow us to start an email exchange where you can send me screenshot.

Best,
Bilal

davidecr said...

Hi, first of all thanks for this project. I would like to know if:
a) have you/anyone tried this in a production environment and
b) Why didn't you work on JK connector instead of creating a totally new project.
c) Can you be contacted/contracted to give support and/or develpment?

bman said...

@davidecr:
Thanks for inquiring.

a) have you/anyone tried this in a production environment and
=> I am getting questions that would indicate production use but cannot confirm. The project is still in beta until I reach a level of confidence that we have encountered all reasonable situations. No known open issues currently.
b) Why didn't you work on JK connector instead of creating a totally new project.
=> JK is an Apache specific project implemented in C/C++. It still uses the AJP 1.3 protocol to make the connection happen. It does not make any consideration on how IIS has developed over the years and the potential IIS has to manage connections and scaling. Moreover, the configuration options of the existing connector did not use common IIS configuration patterns and facilities.
There are many other reasons I was unhappy with the JK project as implemented on Windows in connection with IIS, thus I started this project. In the end, both the JK project and the BonCode connector use AJP1.3 protocol to communicate effectively with Apache Tomcat.
As a consequence a major consideration was not to have any vestiges of unmanaged code in the connector and implement this wholly in .net managed fashion. I believe this is how you should extend a web server like IIS. Thus, I implemented it in C# using best practices for .net development and IIS libraries. This gives the project many advantages some of which are mentioned on the project page; on the development side it becomes far easier to extend, manage, and troubleshoot.
c) Can you be contacted/contracted to give support and/or develpment?
=> Best way is through the distribution site http://tomcatiis.riaforge.org use the “contact project” link. Support is provided on availability basis. Source code can be downloaded as indicated in the manual and C# developers should be able to modify and build it as well.

Transient said...

There is an issue with Grails apps, at least on IIS6. The json string seems to be corrupted or not passed over. I wasn't clear if it was even supposed to work with your plugin, so I never reported it. In any case, I had to go back to JK for our production environment. I could provide more information if you're interested in looking into it.

bman said...

@transient:

Would love to get the details.
Can you contact me via the tomcatiis.riaforge.com "contact project" link?

These would be helpful to know as well:

What version of connector did you use?
- the latest is June 10.
What did you use to generate the JSON ? JSP, servlets, Railo?

Can you give an example of the JSON that did not work for you?

What IIS/Tomcat version combination?

You didn't keep by change a screenshot how this was garbled?

Thanks again,
B

G-Lee said...

I guess I'm missing something, or maybe my questions are so basic it's not covered in your manual.

We're using IIS 7 (on Windows 2008 R2 64-bit) for most of our asp.net applications. We have one application that runs on Tomcat.

I assumed I needed to create a site in IIS, which requires a directory. First I pointed it to the Tomcat webapps/application directory. The connector installer created a directory called 'Program Files (x86/Apache Software Foundation/apache-tomcat-6.0.29/webapps/application/BIN' and placed the two DLLs in there. Notice that the close parenthesis is missing on the path, so this was a brand new directory. Since that didn't work, I uninstalled the connector, and created the site directory under inetpub/wwwroot/application. The connector created the BIN directory and placed the DLLs in there.

Now, is this all I have to do? It seems from the documentation that the install creates the worker.properties and uriworkermap.properties files, but it doesn't...or I can't locate them. It also doesn't tell you where to place them. The manual says that the BonCodeAJP13.settings file goes where the DLLs go, but it doesn't mention where to put the .properties files, I would assume the 'conf' directory of the Tomcat install.

Sorry for the newbie-like questions, but the install hasn't been as smooth as everyone else implies.

bman said...

G-Lee:
let me see whether I can assist.

The idea to create a separate IIS site is normally cleaner. You can point it to the same directory as Tomcat is using or point tomcat to the newly created IIS directory.
The installer will create the BIN directory whereverer IIS is pointing to.

There is video that shows this step by step for IIS7 and Tomcat7:
http://www.youtube.com/watch?v=yVKiNAkhav8


As far as worker.properties file, you are correct it would need to be configured/created within the Apache/cong folder. You should not need to do this if you have default values in mind. This is not specifically mentioned in docs except for reference to use the standard Apache docs that are available if you need. Again, this works out of the box for Tomcat 6 and 7 so need to change.

http://tomcat.apache.org/connectors-doc/reference/workers.html

If you need to do a wildcard mapping, you can keep tomcat and IIS directories seperate. How to do this is shown in the last part of above youtube video.

Hope this helps,
B.

ADC said...

Hi, thanks for the excellent work. I am using IIS6 and Tomcat6, on different servers. Everything works well for the default extensions (jsp, etc.), but I am unclear as to the exact procedure for adding new extensions and wildcards. It seems that I need to add the new extensions in 3 places:
1) The Mappings tab in IIS properties
2) The web.config file
3) The uriworkermap.properties file

I have done the first 2, and it doesn't quite work. As for the 3rd, I do not see an explanation as to where to put the file. I see that you referred someone earlier to http://tomcat.apache.org, but the docs there reference the ISAPI redirector, it is not clear how those files related to BonCode. Do we need to install the ISAPI redirector in order to use those files? If not, then how does BonCode know where to find these files? Does it use the same registry entries that ISAPI redirector does? Very confused on this topic. Thanks for any guidance.

bman said...

Thanks for the feedback ADC:

Let me see whether I can address your questions.

a) uriworkermap:
You should not need any changes to this. I am providing a reference only as background information. This is in case you already made changes to your file, i.e. old installation etc. As a matter of fact, it would probably be better to remove the file if you created it for this purpose.

b)
Adding a wild card handler, i.e. wildcard in IIS6 has principally two steps. b1) You will have to register a stub handler to ASP.net (Aspnet_isapi.dll) using the IIS6 Manager, and, then,
b2) You will have to add a line in the web.config file to BonCode library. This is explained under the IIS6 configuration on page 6 of the manual in the package. You will need to adjust step j) for the wild card map.
Add a line like this to web.config:


Hope this helps,

B.

ADC said...

@bman:
Thanks for the quick response, appreciate it! Looks like our two steps match, good to know I'm on the right track. With respect to the wildcard format, looks like your message was cutoff, the "add a line like this" is blank. Is this correct for web.config for a directory wildcard:



If so, what is the format for the corresponding entry (step j) in IIS Manager? I thought you could only specify a file extension there, not a directory wildcard.
Thanks again for the assistance.

ADC said...

Oops, looks like my web.config line was removed also, I guess the blog can't deal with certain formatting. Let me try again, using brackets instead of regular characters and putting everything in quotes:

"[add verb="*" path="archibus/*" type="BonCodeIIS.BonCodeCallHandler"/]"

J said...

great bit of software, works great for jsps, but it seems like others, i'm still trying to get this to work for wildcards with IIS6 to support servlets and filters. Can you document some detailed instructions? this area is missing from your youtube walkthrough for IIS6

i've tried adding

to web.config and in Home Directory tab/Configuration of my virtual host i've added C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll as a wildcard application map but it still gives me a 404 error if i access anything but a .jsp file. many thanks

bman said...

J:
good idea.
I will record a video with iis6 and tomcat7 and add more advanced scenarios. This should make the steps in the manual a little clearer.

ADC:
The second step is to add this line to web.config.
[add verb="*" path="*.*" type="BonCodeIIS.BonCodeCallHandler"/]


If you want to do this for a subfolder of your site, I would recommend that you add a virtual directory to that site in IIS and point it to your tomcat servlets/jsp folder. The virtual directory will need to be able to run scripts.
This is where you will, then, need to add the BIN directory and the web.config file as well.

You add a wildcard map in two steps: a) add the call stub to IIS6 using IIS6 manager.
b) add the above line to your web.config.

I have an image that I can send you that shows the wildcard mapping or you can follow these instructions:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true
Make sure you leave "Verify that file exists" unchecked; otherwise servlets won't work well.

J said...

Hi, thanks for the response. the key here is - Make sure you leave "Verify that file exists" unchecked; when setting up the wildcard mapping for IIS6. if you check that, it dont work!

i also found i needed path="*" in webconfig to get servlets to work

bman said...

J
I am glad you were able to resolve this. I will adjust comments for iis6 to reflect your input.

fiatkongen said...

Hi

I can't wait to get rid of the old connector and being able to run IIS 6 or IIS 7 Can you tell me if it should be possible to make this connector work on IIS 6/7 + tomcat 4.1?

Thanks

Developer said...

Hi there,
i stumbled over your work a couple of days ago. It worked just fine in my setting but then the setting changed and I ran into the following problem:

I am trying to use servlets with Tomcat 6 and IIS 7.5. BUT the on this machine there is also a Typo3/PHP installation.

What I want to do is "simply" create a virtual folder (?) pointing to my tomcat\web-apps folder, place a BIN folder there and make it accessible unter http://mydomain.com/servletapp .

So I need exactly what is described for IIS6 with wildcard folders.

Can you provide any help for an IIS 7.5 configuration?

Kind regards and great work!

R.

bman said...

@Developer:
adding a virtual path to IIS7.5 and the BIN directory under it is similar in concept to IIS6.
Thus a site can have distinct path that are served by different Backends,e.g. JSP, PHP etc.

I will see whether I can post that in the next few days.

bman said...

I recorded a video that shows how to add wild cards to paths within IIS 7.
This makes it easier to integrate with servlets, especially if you want to expose them for certain URL patterns.

http://youtu.be/y6iwPEaLBY0

Dennis Miller said...

I followed the video to connect IIS7 to Apache/Tomcat (the entire site). I can get to all the base Tomcat directories files just fine.

We have a web application which runs inside axis2. I can get to the axis2 admin page by hitting Tomcat on port 8080, but I can't get there through IIS7. I get a blank page when I try to access the axis2 administration page to load our web application.

Any thoughts?

Thanks.

bman said...

@Dennis:
Thanks for the info.
I will download the project and see whether I can replicate.

bman said...

@Dennis:
I took a look at the axis 2 project. It looks like the axis2 project will redirect users that attempt to access the admin pages remotely to an SSL connection. If your certificate does not exist on your webserver (IIS) or is self signed it throws further errors. Thus the white screen.

You have two choices.
a) Implement an SSL certificate on IIS (public)
b) Access axis2 admin on localhost only (http://localhost/axis2/axis2-admin/login)

Jon said...

Just tried this to hook up Apache Axis (SOAP) services through IIS.
Looked like it was going to work perfectly as I got a WSDL in the browser, but then when I attempted to invoke a call (using POST) I get:

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

I don't have any verb restrictions so before I start reading your code do you have any suggestions?

bman said...

@Jon
From the connector standpoint an error is a good thing, because it shows that communication takes place.

I would guess, however, this has something to do with how the http soap action header is set.

I think older versions of Axis expect SOAPAction argument, while many .net based systems only set "http-soapaction"; this results in incompatibility. The connector does not change this by default, so whatever the initiating client uses will be passed through.

The new version of Axis should be able to handle this or you can see whether in the initiator client you can change it. I will see whether I can put in automatic translations in an update.

Jon said...

Thanks for your response.

This is an Axis 1.4 to Axis 1.4 setup that was working with the original tomcat connector in IIS6.

When the platform was updated to IIS7 I couldn't manage to get it to work (being a simple Java developer ;) so I'm trying your connector instead.

When I test post for the WSDL to the tomcat server directly I get "NoSOAPAction" error as expected, however when I test post via IIS7 I get the 500 error.

As mentioned, GET of the WSDL to both servers works perfectly.

With your connector being purely pass through I guess I have misconfigured IIS7 somehow?

Jon said...

Ah, more googling show's you were right the first time, the concealed error is no SOAPAction header when invoking a valid Call too. I will look into this futher.

DebbieB said...

Running tomcat6, on windows 2003, iis6

Get the following error when trying to go to a jsp page.

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'BonCodeAJP13_Accessor' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Source Error:


Line 57:
Line 58:
Line 59:
Line 60:
Line 61:

bman said...

@Debbie:
Have you used the installation program (Connector_Setup.exe) and received this message afterwards? If not use it first and ignore the rest of my message, if not read on.

The message would indicate that the version of .net framework is not sufficient.
The connector requires .net framework 3.5.

This could be based on two things:
a) The .net framework is generally not installed. Install it using installer (dotnetfx35setup.exe) provided in the download package.
b) The framework is installed but not associated with the application Pool in your IIS manager. In IIS6 this is done in properties of website (ASP.NET) tab. Switch to 2.0.50727 or later, restart IIS and retry

DebbieB said...

Also, I used AJP13_v0926.zip

DebbieB said...

Removed that version, and installed the one in AJP13_v095.zip and it works fine.

DebbieB said...

Now have a more interesting problem.

We're using a web agent to handle IIS authentication. As long as I turn off the SSO part of the agent, where it populates the authenticated user and logon user values, everything works fine. If I turn this on in the web agent, the first attempt to hit a jsp page on the tomcat server works fine. Any subsequent attempt to either reload the same page, or hit another one, returns a blank screen.

The following error shows up in the catalina log on tomcat.
Dec 2, 2011 10:24:15 AM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at com.proginet.sift.servlets.BasicAuthHeaderParser.(Unknown Source)
at com.proginet.sift.tomcat.valve.StartPageRedirecterValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)

bman said...

@DebbiB:

Can you contact me through the "Contact Project" link on the distribution site:
http://tomcatiis.riaforge.org
That way we will be able to exchange emails.
At first look,
it would seem that one of the Java classes is running into an issue with an HTTP header. Most likely, the header this code is looking for is not present:
com.proginet.sift.servlets.BasicAuthHeaderParser

Can you look at let me know which header the code is trying to inspects?

Dennis Miller said...

The connector works really well - the only issue I have is if Tomcat is restarted, the "connection" between IIS and Tomcat is lost. Tomcat never sees requests sent to IIS, which were previously passed to Tomcat before the restart.

Should the connector realize Tomcat has been restarted and "reconnect"?

bman said...

@Dennis:
Dennis thanks for the feedback. The 1.0.1 release should detect dead connections and refresh them. Also you can stop the connector from re-using connections by setting maxConnections setting to zero.

Dennis Miller said...

Are there any known issues with Windows 2008 64 bit, II7, Tomcat 7 and serving back XML files. It seems (trying to determine for sure) that we are receiving garbled text (out of order XML) on occasion. There's no particular patter to it. I tried the flush threshold in settings (which wasn't in either the windows\system32 directory or the BIN directory under the site. I put it in both places but the behavior didn't change.

bman said...

@Dennis:
There are no current XML specific issues reported. The connector has been used in front of Apache Axis1 and Axis2 projects for webservices successfully. Generally speaking it should not have a problem with XML. I would recommend that you do not set a flushthreshold for diagnosis. By default this is disabled. Also upgrade to the latest version 1.0.5 to be sure. To trace packets you can enable detailed logging (LogLevel=3). If you install connector globally (there is no content in BIN folder), then setting file should be in c:\windows. If you do a site only install, the setting file will need to be in BIN folder. You can reach me via email by going to the distribution site (riaforge.org) and clicking on the "Contact Project" link. You can sent me the log files for review.

Unknown said...

Hi,
We are trying to connect IIS 7.5 and tomcat 5.5 which are installed on different computers. Can you please help us to configure it. What should be the physical-path of webapps directory when tomcat is installed on a different computer? Is there any video or tutorial where it is shown that how can we use boncode to connect servers of different machine?

bman said...

@unknown:
It is really easy to remote tomcat and iis.
Yes there is documentation and screenshots that show you how to this.
It is very easy as you walk through the installer it asks you where the tomcat server is. Simply add the server name in the field. Make sure your firewall on the tomcat server allows the port you setup normally 8009.
Videos: http://tomcatiis.riaforge.org/
see videos section
Blog post:
http://tomcatiis.riaforge.org/blog/index.cfm/2011/5/18/How-to-Configure-a-remote-connection

Greg said...
This comment has been removed by the author.
Greg said...

Hi, this code works great (Battled for hours with ISAPI AND ARR solutions)
I am having an issue however, with error code pages.
If my tomcat app serves a 404 or a 500 page, IIS picks up this error code, and displays its own error page. If I remove the mapping for the error page under "Error Pages" then it just serves text (from IIS) instead.
How can I tell IIS to leave my error pages alone? It is causing problems because we cannot see what the errors are without accessing the site via :8080
Thanks!

bman said...

@Greg:
Glad to hear this is working for you. You have several options here.
a) You can suppress status code on the connector by using the EnableHTTPStatusCodes setting for it :
False.
This would need to change in the BonCode setting file. If no setting file is present, you can create one. To be sure where the connector is expecting a setting file you can go to your server and type: http://localhost/a.jsp?BonCodeConnectorVersion=true
b) Tell IIS to display detail error rather than a generic error code message. Here is one of many blogs that has step by step:
http://blogs.msdn.com/b/rakkimk/archive/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers.aspx

Almagest said...

Hi there.
First of all, this is a great solution to connect Tomcat through IIS.
I've installed BonCode using the default setup and the Automatic method, ant to all IIS sites.
Well, I've changed the PathPrefix on the BonCodeAJP13.settings located at Windows folder and all worked great!
But I have a question. Can I specify a different PathPrefix for specific sites?
Thanks in advance.

bman said...

@Almaguest,
Thanks for the feedback. You should be able to specify a different PathPrefix for different sites, however, you will need to switch installation to a “per-site” mode, rather than global installation which is the default. Thus, you need to uninstall connector, then restart server, and run install again for each site. This time, on the screen “Select All or Specific Option” you need to select “Let me choose specific sites”. The subsequent screen will list all available IIS sites. Only choose one. Then go to the site’s document root, look for the BIN directory and within that the BonCodeAJP13.settings file. If you only see two dll files, simple add the settings file manually or copy from zip package. You should now be able to set a path prefix just for that IIS site.

Almagest said...

Thank you for your answer, @bman.
I'll execute this procedure. I have yet another question: for future new websites, should I redo the entire process of desinstallation and reinstallation or there is a way to setup these sites specifically?

bman said...

@Almaguest:
You do not need to install/uninstall if you start correctly on a new server.
You can, then, simply start by selecting a specific site and continue from there. You run the installer for each site that you want to connect to tomcat.
If you do this a lot (many servers), I would suggest you look into the scripting options for the installer (see manual on details).

Almagest said...

Thank you again, @bman.
It's just one IIS, and some apps deployed in another machine Tomcat server.
Let me try this way.

Almagest said...

@bman, I've tested and get perfectly working separated sites installations and configurations. But I have another question. Please tell me if I'm boring you...

For one of the sites I've defined a , let's say, /app1. When accessed www.samplesite.com, the app1 is correctly displayed. But, if I submit the login form, it returns to me the URL www.samplesite.com/app1/page.jsp instead of www.samplesite.com/page.jsp, supressing the /app1 path like I've supposed. This way, all the links are broken and the page don't works correctly. It's a struts app.

Is there some additional settings that I have to configure?

I've tried defining /examples and it doesn't works either.

Thank you for the attention.

bman said...

@almagest:
please contact me via the Project's "Contact Project" link on RiaForge for follow on questions.

Currently there is no clean solution for application that insert the path prefix back into the call rather than using a relative call mechanism.

You can, however, investigate the use the IIS URL rewrite plugin to manage this.
http://www.iis.net/download/urlrewrite

There should be examples with RegEx pattern matching.

Keith Levenson said...

I installed this on a Win2k8R2 server with ColdFusion 10. Generic .cfm pages load fine, but I'm getting errors when calling pages that reference application.cfc--it says that variables are not defined that I know definitely are set.

bman said...

@Keith:
thanks for letting me know. I will check it out and post a fix if needed.

bman said...

@Keith:
Keith I was able to replicate this but not consistently (only two times). I did not need to change the connector to do this though, I was able to do it with standard Adobe install.
In all cases, whether I used the Adobe connector or BonCode, the result was the same.
So, when it worked it worked in both, when it failed, it failed in both.

I created a two file app, where I defined Application scope variables in Application.cfc and used them in index.cfm.
In one set of tests it looked like application scope was blank.
I restarted CF and everything worked again. (this is without BonCode Connector).

After the restart of CF I could not longer reproduce it.

If you contact me via the project page "Contact Project" link, I can share with you the test case, and/or you can provide a sample of your own for me to check.


Joseph DeZarlo said...

I'll try not to repeat a previous post, but I probably will!

We're trying to redirect mutiple IIS7 web sites to Tomcat 6. We had this working with IIS6 and the ISAPI filter.

As another person mentioned, the uriworkermap.properties and worker.properties do not exist anywhere after Tomcat 6 is installed. I created them in the Apache\conf folder, but that does not work. When i connect to the firnedly IIS URL, I get redirected to the Tomcat home page, not the actual web page.

What am I missing?

Thanks,
joe

Chris Reaves said...

Does Boncode Connector pass the Remote_User header, if so how do you get it not to be null

Rachel Burr said...

Thanks for this i have bookmark the guide just incase i ever have to do this again next time my server crashes cheap wildcard ssl

anoop shah said...

Our application is using boncode 1.016 on IIS 7.5 and having tomcat 7 setup.
End to end application works fine, but we are noticing an issue which we suspect is with boncode. The problem is like every 6 weeks we see that IIS/boncode stops accepting connections. We ruled out anything wrong with tomcat or IIS since hitting them individually we get expected responses.
The site for which boncode is configured in IIS only stops accepting connections. It was initially wierd to find that applications calls were not getting logged in IIS access logs when this issue occurs, but i came to know that IIS would only log if it receives a HTTP response back which in this case doesnt happen.

bman said...

Anoop
Not sure about such iis restrictions please google IIS tracing for how to do it.
Also an upgrade should be considered.
For support please use the GitHub issue section.