Error 302 in IIS with Lucee

#1

I inherited a HIPAA-secure web app built in C# MVC running on IIS (8.5.9600.16384) on a Windows Server 2012 R2, which is actually a virtual server hosted with Microsoft Azure. I have been tasked with rewriting portions of it in Lucee. Getting a port opened to TomCat is going to be a mission, so I decided to just place my Lucee site directory in C:\inetput\wwwroot\MyProductionSite\Lucee. It was running just fine yesterday, but when I woke up this morning, everything was working differently than the day before. When I use the Firefox dev inspector, I am seeing many error 302 being displayed, which is apparently due to IIS doing some kind of redirect. How do I fix this?

0 Likes

#2

This is your application issue, not a lucee issue.

My suggestion is go look at your 302 errors, more than likely it was some dynamically created object now not being created due to some other code change.

Additionally to “debug” if you can access the objects via port 8888 or port 8080 depending on how you setup Lucee with Tomcat, it could be an indicator with your Vhost connector in IIS.

0 Likes

#3

I respectfully disagree. It was working fine yesterday at end of day. This morning, nothing is working. I have a header.cfm file that contains the following:

<!DOCTYPE html>

<html lang="en">
	<head>
	
		<meta charset="UTF-8">		
		<meta name="viewport" content="width=device-width, initial-scale=1">	

		<link rel="Stylesheet" media="screen" href="_style/w3b.css" />	
		<link rel="stylesheet" href="_style/jquery-ui.css" />
		<link rel="stylesheet" href="_style/style.css" />
		<script src="_scripts/jquery3_1_1.min.js"></script>	
		<script src="_scripts/jquery-ui.min.js"></script>	
		<script type="text/javascript" src="_scripts/main.js"></script>	
<body  >

The image below shows the 302 error details for the w3b.css file shown in the above.

The Location of the Response Headers is from the production MVC site.

Additionally, I didn’t do any Setup with Tomcat at all. My initial installation was with the IIS Connector. If I am using IIS, do I still need to do any configuration with Tomcat?

0 Likes

#4

OK…all of a sudden, everything is working fine again, and I made no changes at all.

I would still like to know what could be causing this in case it happens again.

0 Likes

#5

Well, this morning, it is happening again. I love IIS!

0 Likes

#6

Look at your maxContexts settings in tomcat and pool time out settings in IIS.

0 Likes

#7

The Lucee web-site is still under development, so it has zero load unless I am using it. I will check what you suggest though.

0 Likes

#8

Ugh. This sounds like a hairy and annoying issue. You’d need to track the request from when it comes into your system through the different pieces (IIS initial hit, to the handers, then into Tomcat/Lucee) and see which piece (I call them “gears”) is tossing back the 301. The fact that this happens seemingly randomly makes things super-annoying. Do you have your systems configured to auto-upgrade and reboot perhaps? I know with HIPAA there are availability requirements you are required to meet, so what are the other systems involved? Load balancers maybe? Maybe you’re hitting one system and not the other?

0 Likes

#9

Just a crazy guess …

  1. I see a redirect to some type of login page.

  2. The redirect comes from a css-file request. The IIS-handler wouldn’t pass that css-file request to tomcat. So I’m pretty sure it is not coming from tomcat/Lucee. My guess: somewhere inside IIS or before the request gets there.

  3. I can see ASP headers and ASP session-IDs also. Why is that? Are you hosting ASP and CF together?

Could it be, that you somehow are loosing the session (maybe an IIS
asp-session), and somewhere inside that IIS application it is logging you out, and you are being redirected with a 302 to the login page?

Really odd!

0 Likes