PDA

View Full Version : Problem with the probe and tomcat6 :This probe was hit by an unexpected exception


fred3466
10-07-2010, 00:49
Hi everybody,

I find java monitor very exciting but ran into this exception with tomcat6 on linux centos:

10 juil. 2010 01:22:24 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-5520
10 juil. 2010 01:22:24 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
10 juil. 2010 01:22:24 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21 config=null
10 juil. 2010 01:22:24 org.apache.catalina.startup.Catalina start
INFO: Server startup in 6895 ms
10 juil. 2010 01:22:25 com.javamonitor.JavaMonitorCollector$CollectorDriv er run
GRAVE: This probe was hit by an unexpected exception: null
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
at com.javamonitor.Collector.init(Collector.java:205)
at com.javamonitor.Collector.push(Collector.java:120)
at com.javamonitor.JavaMonitorCollector$CollectorDriv er.run(JavaMonitorCollector.java:150)
at java.lang.Thread.run(Thread.java:619)

Well, I strictly followed the deployment guide, and as it didn't work at first, did the following:
1/ uncompress the war and deployed it
2/ look at the source :
private void init() throws Exception {
if (account == null) {
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(Collector.class
.getClassLoader().getResourceAsStream("uuid")));
account = in.readLine();
} finally {
if (in != null) {
in.close();
}
}
}
if (pushUrl == null) {
BufferedReader in = null;
try {
final String urlString;
if (System.getProperty(JAVA_MONITOR_URL) != null) {
urlString = getProperty(JAVA_MONITOR_URL);
} else {
in = new BufferedReader(new InputStreamReader(
Collector.class.getClassLoader()
.getResourceAsStream("pushUrl")));
urlString = in.readLine();
}

pushUrl = new URL(urlString);
} finally {
if (in != null) {
in.close();
}
}
}
}

3/ look for the missing "pushUrl" : in the whole war and web.xml : can't find the string "pushUrl" aywhere else than in Collector.java/.class


Note :
-no proxy
-no firewall
-fully functionnal server, used everyday for pre production functionnal testing

Thank you in advance!

kjkoster
10-07-2010, 08:18
Dear fred3466,

I just fixed that problem. Thank you for reporting it so promptly.

Just shows that whenever you skip the full deploy cycle, you end up spending more time on a release than when you just follow the proper procedures. Oh well. I knew that. <:)

If you delete the probe you have and download it afresh, you should no longer see this problem.

Kees Jan

fred3466
10-07-2010, 11:19
Thank you for the quick fix!

kjkoster
10-07-2010, 11:24
Dear fred3466,

No problem. Let me know how you find Java-monitor.

Kees Jan

fred3466
10-07-2010, 14:51
At this time, I find it really amazing!

This is a necessary tool for any J2EE server app in production.

I will look for a detailed documentation of the graph I see about my servers.

Next, I will consult and surely contribute to the community to share my litlle experience about well configuring and understanding of tomcat behaviour.

I found the "community" approach of monitoring webapp server really inovating.

May the value of your community give you the success your innovation merits!

kjkoster
10-07-2010, 22:09
Dear fred3466,

Hum, well. The 'detailed documentation' part is still very much a work in progress. :-/

Actually, as you already note, the whole idea is for the community to discuss interesting performance problems and in doing so build the documentation.

I took the liberty to collect some of the stuff that was discussed here. I made a tools in action session about Java-monitor that I presented at Devoxx 2009 (http://cumin.java-monitor.com/forum/showthread.php?t=750). Maybe there is some stuff in there that is interesting to you?

Kees Jan

fred3466
10-07-2010, 22:34
Well, no problem about the "missing" detailed doc. I can understand that you can't provide at the same time a service like the one you give us for free and at the same time give a detailed how-to or detailed doc. Maybe in the future you will provide some synthesis about the community exchange.
What I meant was what I would spontaneous do as brand new user of java-monitor.com, to help you to determine the need of your audience.
I think that webapp server monitoring is a must do for any tech seriously involved in any java web site in production. You can't throw a webapp on the web and just pry that it's working until the en of time ! Oh noooo!
I don't know where I can find a community focused on this matter anywhere else than at java-monitor.
I'm sure you will be the reference about java server monitoring, since you provide the good tool and initiate the essential : a beginning for a specialist's community.


Thank you for this great, free and simple to use service!

kjkoster
10-07-2010, 22:48
Dear fred3466,

*blush* Thanks for the compliments. The objective of Java-monitor is indeed to serve the people who (accidentally or by choice) became JEE server admins.

Can I then ask you a question (as a novice user of Java-monitor)? I was considering to add documentation to the host page by just describing each graph in a paragraph or two.

While that has value for people just starting out, that approach has two problems. For one, it causes the host page to be huge. There will be loads of text and graphs to look at. Would that not confuse people more than help them?

Also, what about expert users? They would just see the extra text as a burden. A useless waste of pixels.

Any idea how we can serve both groups?

Kees Jan

fred3466
10-07-2010, 23:02
Yes, as a novice user I would really appreciate this kind of doc.
To be honest this was the the first thing I was looking for, while browsing all thos graph.
I can understand thes graph like "here is the max, here is where we are".
But for the GC graphs...It' more complicated. I'm an experienced 1)web developper 2)java developper 3)java web (J2EE) developper but I'm not yet a GC guru.
So if I would like to really exploit all those stats about GC, I have to read all the sun's docs about GC philosophy. I will do that, to tune my JVM. But first I would like to understand the stats.

So maybe you could add a "?" near echa graph with a pop-in help text decribing precisely what the stat really mean. Maybe with a link to the doc about GC for more details ?

In the same way "Yslow" links advices to optimize your web page to yahoo's well known performance doc.

This way, novice users find a good contextual doc, an experts...just don't hover the "?".