permaculture playing cards*
The moose likes Servlets and the fly likes Too many sessions created when running HTTPS port on AIX/Jetty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Too many sessions created when running HTTPS port on AIX/Jetty" Watch "Too many sessions created when running HTTPS port on AIX/Jetty" New topic
Author

Too many sessions created when running HTTPS port on AIX/Jetty

Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
I'm running an HTTPS port using Jetty 5.1.3 on AIX 5.3. Up until now when running my webapp on windows or solaris machines, my session tracking and use of session objects was working fine. And this configuration works fine when using http ports.

What seems to happen in the secured port situation is that new sessions are created every time I call request.getSession(), which results in a new session being used by every servlet/JSP and my session objects that I had stored are no longer available when they should be.

Does anyone know anything else I can try to do in this situation to determine the cause of this? Could the https protocol be throwing off the session-tracking capabilitites of jetty? I should note that running an HTTPS port on windows or Solaris works fine as well.

Any help/suggestions/ideas would be greatly appreciated..

thanks,
Tom
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
It seems I have too many sessions because my cookies are null! I"m tracking sessions using cookies, and since they're null, I have no way to access the correct session and its objects.

Only seems to be an issue when running on AIX AND using an HTTPS port.
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
Aha! well, it looks like it wasn't necessarily AIX that was causing it, but my code that re-directed to a secure URL on this particular machine.

I used this to get the hostname and create a new https URL:

java.net.InetAddress.getLocalHost ().getHostName ()

This was returning a fully qualified hostname which would be different than the one for the original link, which I think was hosing my cookies.
 
wood burning stoves
 
subject: Too many sessions created when running HTTPS port on AIX/Jetty