Skip to main content
Known Participant
October 15, 2012
Question

CF10: Apache returns 404 when ;jsessionid is appended

  • October 15, 2012
  • 2 replies
  • 14566 views

Hi all,

we are currently upgrading a SLES 11 Server to CF10 64bit.

Last week we spend 2 days to eliminate a problem with the connector.

Apache refused to deliver CF-Pages. The log file said that mod_jk could not connect to the cfusion instance - Error 503...

We finally fixed this by copying a mod_jk binary from a working CF10 Server to this one.

Now Apache (2.2.23) serves all CF pages flawlessly.

What I just discovered was a problem, when a client doesn't accept cookies and J2EE-Sessions are turned on.

A URL with the sessionid appended (as for example cflocation creates it) results in a 404 error:

http://xxxxx.xxxxxx.com/login.cfm;jsessionid=xyxxyxyxyxyxyxy

I remember such a problem from a CF6/7 install, but that was IIS on Windows.

I'm just stuck with this one.

Can somebody please help?

Regards

Joerg

This topic has been closed for replies.

2 replies

itisdesign
Inspiring
October 21, 2012

Could someone try clicking this link on Apache: <cfoutput><a href="#urlSessionFormat('/')#">home</a></cfoutput>

When J2EE sessions are enabled and cookies disabled, I see that clicking a link to urlSessionFormat('/') triggers a 404 on IIS due to the "/;jsessionid".  Does that also 404 on Apache?  I'm unfamilar w/ Apache, so I'm curious.

Thanks!,

-Aaron

Known Participant
October 23, 2012

Could someone try clicking this link on Apache: <cfoutput><a href="#urlSessionFormat('/')#">home</a></cfoutput>

Hi Aaron,

my x64 CF10 with update 2 on ubuntu 12 returns this link:

<a href="/;jsessionid=E1FF803C751A6252E9EDD559ABD06EFE.cfusion">

which results in a 404 error by apache... I still hope that this gets fixed in hf3...

Joerg

itisdesign
Inspiring
October 23, 2012

<a href="/;jsessionid=E1FF803C751A6252E9EDD559ABD06EFE.cfusion">

AHA!  Thanks Joerg for that clarification!  Yes, I wondered if that was the case (jsessionid immediately following the forward slash).  However, that also fails for me in CF9.  Does that work for you in CF9?

Charlie Arehart
Community Expert
Community Expert
October 15, 2012

Joerg, want to help (or help others help you). You say you “are stuck”, but said after “copying a mod-jk binary…Now Apache (2.2.23) serves all CF pages flawlessly.” Can you clarify what you are seeking then? Just an explanation? Or is something still broken?

You did find the culprit: with j2ee sessions enabled, a cflocation (without addurltoken=”no”) will cause it to create a URL with the sessiontoken added. Or if a client does not send cookies, then the urlsessionformat function will do it.

Or are you wondering more why (if all that was the same before) it worked before your upgrade to 10? In that case, it may help to specify what changed (CF, OS, web server) in terms of product or version.

/charlie

/Charlie (troubleshooter, carehart. org)
Known Participant
October 15, 2012

Hi Charlie,

glad to hear from you!

Maybe I have to clarify my problem...

Seems like I should not describe two problem at once

The story about mod_jk was just to introduce my scenario.

We just upgraded a SLES Server from Apache + CF 9 Std. on Jrun to CF10 Std.

After slight problem with mod_jk this server is now running some sites under constant observation.

Everything seemed to run smooth now, but I got note from a coworker, that he could not login.

It turned out that he had cookies disabled, so CF preseves the session by adding URL-params.

As we have J2EE Sessions turned on for years, cflocation adds ;jsessionid= to the URL.

That was no problem since the CF10 upgrade.

Now we are getting 404 Erros from apache, as he thinks that the file is named "login.cfm;jessionid=xxxxxx"

I'm now stuck at the point, that I don't know what to add to the apache config, so that he identifies this request to be for "login.cfm"....

Regards

Joerg

Known Participant
October 16, 2012

One more thing

As we are experiencing several problems with our SLES server, I did a little test.

I just set up a completely new Ubuntu server 12.04.1 64bit with apache 2.2.22 and CF10 (including Update 1 + 2).

Everything went much smoother than on SLES

I setup a virtual host and copied a cf-application to it.

The site runs as expected. But when I turn on J2EE-Sessions and then disable cookies in my Browser, I again receive the message:

The requested URL /login.cfm;jsessionid=D490A98FF79AC72C5062A55324089C63.cfusion was not found on this server.

I haven't made any change to any config files except the vhost definition.

What do I have to add to the apache config to have this error disappear?

Regards

Joerg