They're custom scripts I wrote in python. Every night cron jobs run to give us an error report on our portal and cas boxes. It hashes the errors on their message content and groups duplicates. There's another script that runs every minute and reports any severe java exceptions immediately (ClassNotFound, IOError, etc).
I've attached a tarball with these scripts. There's a python package in
the CalPolyPythonPackage folder. This needs to be in PYTHONPATH. To do
this, just run the scripts with the pythonExec.sh script. You'll have
to correct the absolute path to your python executable:
/opt/csw/bin/python ${*}
I changed the portal log4j format in our installation to:
%5p %d{ISO8601} [%t][%x] %c - %m%n
If you don't want to use that format you'll need to correct the regular
expression found in
CalPolyPythonPackage/calpoly/logs.py:PortalLog.lineRE
It might be worth creating a page in the manual on log reporting
techniques and post this there but I may make a few more changes as we
use it more. Eventually I'll be working on a more powerful log
reporting framework for the portal/cas and our other applications. I've
found that most opensource/commerical applications (Splunk, Groundwork,
Piwik, etc.) focus on either web analytics (which can read your http
logs) or server reporting (CPU usage, Network usage), but there are few
projects that can read something like portal.log and help you generate
reports on user activities.
Anyway, send me an email if you get stuck getting these to work.
--
Arlo White
Application Management / ITS
[email protected]
Office (805) 756-5211
Dustin S. wrote:
> Hi Arlo,
>
> Just curious what type of software is generating that error report? Is
> that something you guys wrote or purchased?
>
> Dustin.
>
> On Tue, Feb 17, 2009 at 3:24 PM, Arlo White <[email protected]
> <mailto:[email protected]>> wrote:
>
> There are a few variations to this error. Attached is a message with
> these errors from the log report script I created.
>
> --
> You are currently subscribed to [email protected]
> <mailto:[email protected]> as: [email protected]
> <mailto:[email protected]>
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
>
>
> Error Report
>
> 2 unique errors, displaying top 10 most frequent
>
> /Errors are grouped if they have identical message content. The
> log information for each error group (level, thread, package) is
> the info from the first log event. It is possible for these values
> to differ among the log events in a group though unlikely. /
>
> Log Event Information Message
> Level ERROR
>
> an error occurred during channel reinstantiation.
> org.jasig.portal.PortalException: Unable to load class
> 'org.jasig.portal.channels.CError'
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:103)
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:80)
> at
> org.jasig.portal.ChannelFactory.instantiateLayoutChannel(ChannelFactory.java:75)
> at
> org.jasig.portal.ChannelManager.instantiateChannel(ChannelManager.java:727)
> at
> org.jasig.portal.ChannelManager.instantiateChannel(ChannelManager.java:708)
> at
> org.jasig.portal.channels.error.CError.doCommonErrorHandling(CError.java:367)
> at
> org.jasig.portal.channels.error.CError.renderCharacters(CError.java:536)
> at
> org.jasig.portal.ChannelRenderer$Worker.execute(ChannelRenderer.java:587)
> at org.jasig.portal.utils.threading.BaseTask.run(BaseTask.java:27)
> at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
> at
> org.springframework.orm.jpa.JpaInterceptor.invoke(JpaInterceptor.java:96)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at org.jasig.portal.$Proxy48.run(Unknown Source)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException:
> org.jasig.portal.channels.CError
> at org.jasig.portal.car.CarClassLoader$1.run(CarClassLoader.java:91)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.jasig.portal.car.CarClassLoader.findClass(CarClassLoader.java:114)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:101)
> ... 24 more
> Caused by: java.lang.Exception: Car resource
> org/jasig/portal/channels/CError.class not found.
> at org.jasig.portal.car.CarClassLoader$1.run(CarClassLoader.java:72)
> ... 29 more
>
>
>
> Thread ErrorRendering#522
> Package org.jasig.portal.channels.error.CError
> Occurrences 2
>
> 1. 2009-02-17 12:19:43.766000
> 2. 2009-02-17 12:19:38.082000
>
> Level ERROR
>
> unable to pass find/create an instance of a channel. Bogus Id ? !
> (id='n6' uid='2192').
> org.jasig.portal.PortalException: Unable to load class
> 'org.jasig.portal.channels.CError'
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:103)
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:80)
> at
> org.jasig.portal.ChannelFactory.instantiateLayoutChannel(ChannelFactory.java:75)
> at
> org.jasig.portal.ChannelManager.instantiateChannel(ChannelManager.java:727)
> at
> org.jasig.portal.ChannelManager.instantiateChannel(ChannelManager.java:708)
> at
> org.jasig.portal.ChannelManager.processRequestChannelParameters(ChannelManager.java:862)
> at
> org.jasig.portal.ChannelManager.startRenderingCycle(ChannelManager.java:955)
> at
> org.jasig.portal.rendering.StaticRenderingPipeline.renderState(StaticRenderingPipeline.java:306)
> at
> org.jasig.portal.PortalSessionManager.doGetInternal(PortalSessionManager.java:246)
> at
> org.jasig.portal.PortalSessionManager.doGet(PortalSessionManager.java:176)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:112)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
> at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
> at
> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1978)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException:
> org.jasig.portal.channels.CError
> at org.jasig.portal.car.CarClassLoader$1.run(CarClassLoader.java:91)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.jasig.portal.car.CarClassLoader.findClass(CarClassLoader.java:114)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> org.jasig.portal.ChannelFactory.instantiateChannel(ChannelFactory.java:101)
> ... 30 more
> Caused by: java.lang.Exception: Car resource
> org/jasig/portal/channels/CError.class not found.
> at org.jasig.portal.car.CarClassLoader$1.run(CarClassLoader.java:72)
> ... 35 more
>
>
>
> Thread catalina-exec-127
> Package org.jasig.portal.ChannelManager
> Occurrences 1
>
> 1. 2009-02-17 12:19:39.905000
>
>
>
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/uportal-dev
CalPolyReportScripts.tgz
Description: application/compressed-tar
