me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

Error deploying new javamelody files (FreeBSD) #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Copy javamelody.jar, jrobin-1.5.9.1.jar to webapps/lib directory
2.update webapps/web.xml file with listener code from website.
3.Restart tomcat and apache, get errors in log files(see errors below) tomcat 
5.5 doesn't start.

What is the expected output? What do you see instead?
to be able to see the monitoring tool, 500 error on page instead.

What version of the product are you using? On what application server, JDK,
operating system?
Application Server: FreeBSD, Apache Webserver, Tomcat5.5 and Tomcat 6 (seprate 
instance)
JDK: 1.6

Please provide any additional information below.

Tomcat 5.5 stderr.log Error:
SEVERE: Error filterStart

I added this to the web.xml file:

        <filter>
                <filter-name>monitoring</filter-name>
                <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>monitoring</filter-name>
                <url-pattern>/*</url-pattern>
        </filter-mapping>
        <listener>
                <listener-class>net.bull.javamelody.SessionListener</listener-class>
        </listener>

I restarted the server and got the filter error.  Then I updated 
catalina.properties with: java.awt.headless=true    and restarted the server, 
but still get same error.

In my webapp logs I get different error, but I'm assuming this error is because 
of the first error: 

2010-11-19 12:08:31,929 ERROR [/jasperserver],main:3670 - Exception starting 
filter monitoring
java.lang.InternalError: errno: 2 error: Unable to open 
/compat/linux/proc/self/stat

I'm not sure what the problem is or how to fix it.  I tried following the 
instructions on the web, but can't make this work.  Any ideas will be 
appreciated! Thanks in advance.

Original issue reported on code.google.com by rone...@gmail.com on 19 Nov 2010 at 8:07

GoogleCodeExporter commented 9 years ago
A more complete has been posted by you probably on the users' group:
java.lang.InternalError: errno: 2 error: Unable to open 
/compat/linux/proc/self/stat
   at com.sun.management.UnixOperatingSystem.getCommittedVirtualMemorySize(Native
Method)
   at net.bull.javamelody.MemoryInformations.buildMemoryDetails(MemoryInformations
.java:118)
   ...

As you can see in the stack-trace, it is an error in the JDK.
This method can be found in openjdk:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/com
/sun/management/OperatingSystemMXBean.java#OperatingSystemMXBean

A google search shows issues with "/compat/linux/proc" on FreeBSD.
See for example: 
http://wiki.hudson-ci.org/display/HUDSON/FreeBSD+4.9
http://lioks.buffout.org/?p=39
Did you get the JDK 1.6 from http://www.freebsd.org/java/ ?

Otherwise, could it be an issue with the permissions of the FreeBSD user for 
the JDK and do you use JSVC? If you use JSVC, have you tried startup.sh in 
tomcat/bin?

Original comment by evernat@free.fr on 19 Nov 2010 at 11:27

GoogleCodeExporter commented 9 years ago

Original comment by evernat@free.fr on 19 Nov 2010 at 11:27

GoogleCodeExporter commented 9 years ago
Thanks for your reply,  I'm not sure where the jdk came from, it was installed 
by the host.  hopefully I'll get some time over the holiday to look into your 
suggestions a bit more and then I'll post another comment.  Thanks again.

Original comment by rone...@gmail.com on 24 Nov 2010 at 6:56

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
No response.
Hopefully you found a way to make the JDK work for this on FreeBSD.

If not, tell us your findings. Thanks.

Original comment by evernat@free.fr on 18 Dec 2010 at 1:32