About monitoring user sessions in Apache Tomcat

237 views
Skip to first unread message

Krum Bakalsky

unread,
Jul 29, 2010, 12:02:50 PM7/29/10
to javamelody
Hi folks,

This really looks like a great tool ! :) Congratulations for the idea
for creating it.
I want to ask for help about enabling session monitoring in Apache
Tomcat.
I am using:
- Apache Tomcat 6.0.18
- JAVA_HOME = JDK 1.6.0_20
- I am trying to monitor a WAR file, which is a simple Sinatra
application. It runs fine on Tomcat, thanks to the JRuby-Rack adapter
which is packed inside WEB-INF/lib.

But, unfortunately, when i request http://<host>/<context>/monitoring
the URL, i see some interesting details, but it tells me that there
are no sessions. How come ?

I have downloaded the javamelody-1.18.0.zip file, packed
javamelody.jar and jrobin-x.jar inside WEB-INF/lib of my application,
and then modified the web.xml descriptor, exactly as explained in the
user guide. Then i deployed the jmelody WAR.

I tried with several different approaches to enable this session info:
with init param of the filter, with an environment variable of the OS,
with an entry in catalina.properties (every time i also made a Tomcat
restart). But though i made some 20+ requests of my applications,
jmelody tells me that there are 0 sessions. How come ?

I also deployed the LambdaProbe application on Tomcat, in it also
tells me that my app has 0 sessions!
Actually, no matter that i request everything which is deployed on my
Tomcat, LambdaProbe tells me that there are 0 sessions for all apps,
except for itself :) (it shows 1 session within the LambdaProbe app).

I would be really happy if you could give me some hint what am i
missing. I am tired of trying :)

Thanks and Kindest Regards,
Krum.

Krum Bakalsky

unread,
Jul 29, 2010, 12:11:21 PM7/29/10
to javamelody
Actually, i just saw that although all my 20+ browser requests for my
web application are successful, according to Jmelody, all of them are /
GET requests with Error404 (i expanded the 'Last errors' click).
I really cannot see what is going on here.... Please help.

Krum Bakalsky

unread,
Jul 29, 2010, 1:24:19 PM7/29/10
to javamelody
I pretty much begin to understand what is happening.
JavaEE/web/servlet/JSP/etc. notion of session has nothing to do with
sessions in the Rails, Sinatra, Rack and Ruby world.
That's why jmelody won't recognize my app sessions ever. Interesting.


Aactually this leads naturally to the idea of supporting Rack sessions
in jmelody. What do you think ?
It's quite a common use case to deploy JRuby applications (Rails,
Sinatra, Rack) in a JavaEE web container,
so this feature won't be left without attention :)

evernat

unread,
Jul 30, 2010, 11:01:13 AM7/30/10
to javamelody
Hi,

Sorry "Rails, Sinatra, Rack and Ruby" sessions are not supported in
JavaMelody at the moment.

If I may ask a related question: if "Rails, Sinatra, Rack and Ruby"
use JavaEE, why don't "Rails, Sinatra, Rack and Ruby" use standard
JavaEE sessions?

bye, Emeric

evernat

unread,
Jul 30, 2010, 11:05:33 AM7/30/10
to javamelody
The list in "Last errors" only shows errors (the list of all http
requests is just above, if your application displays something of
course).
So if you have some 404 errors (such as 404 for favicon.ico), it is
usual to have some errors in "Last errors".

bye, Emeric

reachjpr...@gmail.com

unread,
Nov 12, 2016, 3:23:33 PM11/12/16
to javamelody
Hi,

How about struts session, I am not seeing struts session as well, though I am logged in into my application and have active session.

And by the way, this is awesome tool.

- Pradeep
Reply all
Reply to author
Forward
0 new messages