I added logging to this module and found that there is a problem with System.getProperty("sflow.dsindex”) call. It was resolved by adding to startup.sh :
export CATALINA_OPTS="$CATALINA_OPTS -Dsflow.dsindex=1234 -Dsflow.hostname=app_1" Now SflowValve,jar is working. Thanks! Sergey > On Aug 11, 2015, at 10:40 PM, Felix Schumacher > <felix.schumac...@internetallee.de> wrote: > > > > Am 11. August 2015 23:32:12 MESZ, schrieb Sergey <svin...@apple.com>: >> I recompiled SFlow_Valve.jar with Tomcat-7.0.61. >> Now it doesn’t give any errors in the log, but also doesn’t send any >> metrics to port 6343. >> Is there any way to debug this valve? > > I assume it is this valve > https://code.google.com/p/tomcat-sflow-valve/source/browse/trunk/com/sflow/catalina/SFlowValve.java. > > That valve has no logging whatsoever and silently drops any exception it > catches. So your only chance to see more is to debug or add logging to the > valve. > > Debugging should be the same as debugging anything you run in tomcat. You can > find more information at http://wiki.apache.org/tomcat/FAQ/Developing. > > The entry point for your quest is probably the invoke method in the valve. > > Logging could be done by adding println's to those points in the valve, you > want to be seen visited. Using a logging framework (java.util logging might > be a good choice) is even better and not that much harder to do. > > Regards, > Felix > >> >> >> Thanks!Sergey >> >> >> >>> >>>> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <miles...@gmail.com >> <mailto:miles...@gmail.com>> wrote: >>>> >>>> Hi, >>>> >>>> 2015-07-23 21:36 GMT+03:00 Sergey <svin...@apple.com >> <mailto:svin...@apple.com>>: >>>>> >>>>> We updated Tomcat from 7.0.10 to 7.0.61. >>>>> In previous version we collected Tomcat metrics using >> Sflow_Valve.jar >>>> module. >>>>> Now it looks like Coyote Connector can't call >> Request.getBytesRead() >>>> method. >>>>> Here is the Catalina log error: >>>>> >>>>> org.apache.coyote.http11.AbstractHttp11Processor process >>>>> SEVERE: Error processing request >>>>> java.lang.NoSuchMethodError: >> org.apache.coyote.Request.getBytesRead()I >>>>> at com.sflow.catalina.SFlowValve.xdrFlowSample(SFlowValve.java:341) >>>>> at com.sflow.catalina.SFlowValve.sampleRequest(SFlowValve.java:438) >>>>> at com.sflow.catalina.SFlowValve.invoke(SFlowValve.java:320) >>>>> at >>>> >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) >>>>> at >>>> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) >>>>> at >>>> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) >>>>> at >>>> >> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) >>>>> at >>>> >> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) >>>>> at >>>> >> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) >>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown >> Source) >>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown >> Source) >>>>> at >>>> >> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) >>>>> at java.lang.Thread.run(Unknown Source) >>>>> >>>>> Did anybody have this issue? >>>> >>>> Check the change log [1]. >>>> The signature of the method was changed as part of the fix for bug >> 57581 >>>> >>>> Regards, >>>> Violeta >>>> >>>> [1] http://tomcat.apache.org/tomcat-7.0-doc/changelog.html#Tomcat >> <http://tomcat.apache.org/tomcat-7.0-doc/changelog.html#Tomcat> 7.0.60 >>>> (violetagg) >>>> >>>>> >>>>> Thanks! >>>>> Sergey >>>>> >>>>> >>>>> >> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> <mailto:users-unsubscr...@tomcat.apache.org> >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >> <mailto:users-h...@tomcat.apache.org> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >