You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sergey <sv...@apple.com> on 2015/07/23 20:36:39 UTC

Tomcat-7.0.61 and SFlow_Valve.jar issue

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?

Thanks!
Sergey


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 24. Juli 2015 18:34:14 MESZ, schrieb Sergey <sv...@apple.com>:
>Sorry,
>
>Do you mean that I have to recompile SFlow_Valve.jar or our application
>which we are running on Tomcat server?

SFlow_Valve.jar has the problem, so you have to compile those sources. 

Regards, 
Felix 

>
>Thanks!
>Sergey
>
>> On Jul 24, 2015, at 1:46 AM, Felix Schumacher
><fe...@internetallee.de> wrote:
>> 
>> 
>> 
>> Am 23. Juli 2015 21:04:22 MESZ, schrieb Sergey <svinnik@apple.com
><ma...@apple.com>>:
>>> I see that in SFlow_Valve Source code it’s already “long”:
>>> 
>>> long bytes_read = (request.getCoyoteRequest()).getBytesRead();
>>> 
>>> Then what’s wrong and how can I fix this issue?
>> 
>> Recompile your code with the jars/sources from newer tomcats? 
>> 
>> The interface changed in tomcat. Your code was compiled with the old
>one, which is not compatible with the new interface. 
>> 
>> Regards, 
>> Felix 
>> 
>> PS: Don't hijack threads.
>> 
>>> 
>>> Thanks!
>>> Sergey
>>> 
>>>> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <milesg78@gmail.com
><ma...@gmail.com>>
>>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com
><ma...@apple.com>
>>> <mailto:svinnik@apple.com <ma...@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
><http://tomcat.apache.org/tomcat-7.0-doc/changelog.html#Tomcat>> 7.0.60
>>>> (violetagg)
>>>> 
>>>>> 
>>>>> Thanks!
>>>>> Sergey
>>>>> 
>>>>> 
>>>>> 
>>>
>---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
><ma...@tomcat.apache.org>
>>> <mailto:users-unsubscribe@tomcat.apache.org
><ma...@tomcat.apache.org>>
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
><ma...@tomcat.apache.org>
>>> <mailto:users-help@tomcat.apache.org
><ma...@tomcat.apache.org>>
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
><ma...@tomcat.apache.org>
>> For additional commands, e-mail: users-help@tomcat.apache.org
><ma...@tomcat.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Sergey <sv...@apple.com>.
Sorry,

Do you mean that I have to recompile SFlow_Valve.jar or our application which we are running on Tomcat server?

Thanks!
Sergey

> On Jul 24, 2015, at 1:46 AM, Felix Schumacher <fe...@internetallee.de> wrote:
> 
> 
> 
> Am 23. Juli 2015 21:04:22 MESZ, schrieb Sergey <svinnik@apple.com <ma...@apple.com>>:
>> I see that in SFlow_Valve Source code it’s already “long”:
>> 
>> long bytes_read = (request.getCoyoteRequest()).getBytesRead();
>> 
>> Then what’s wrong and how can I fix this issue?
> 
> Recompile your code with the jars/sources from newer tomcats? 
> 
> The interface changed in tomcat. Your code was compiled with the old one, which is not compatible with the new interface. 
> 
> Regards, 
> Felix 
> 
> PS: Don't hijack threads.
> 
>> 
>> Thanks!
>> Sergey
>> 
>>> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <milesg78@gmail.com <ma...@gmail.com>>
>> wrote:
>>> 
>>> Hi,
>>> 
>>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com <ma...@apple.com>
>> <mailto:svinnik@apple.com <ma...@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 <http://tomcat.apache.org/tomcat-7.0-doc/changelog.html#Tomcat>> 7.0.60
>>> (violetagg)
>>> 
>>>> 
>>>> Thanks!
>>>> Sergey
>>>> 
>>>> 
>>>> 
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org <ma...@tomcat.apache.org>
>> <mailto:users-unsubscribe@tomcat.apache.org <ma...@tomcat.apache.org>>
>>>> For additional commands, e-mail: users-help@tomcat.apache.org <ma...@tomcat.apache.org>
>> <mailto:users-help@tomcat.apache.org <ma...@tomcat.apache.org>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org <ma...@tomcat.apache.org>
> For additional commands, e-mail: users-help@tomcat.apache.org <ma...@tomcat.apache.org>

Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 23. Juli 2015 21:04:22 MESZ, schrieb Sergey <sv...@apple.com>:
>I see that in SFlow_Valve Source code it’s already “long”:
>
> long bytes_read = (request.getCoyoteRequest()).getBytesRead();
>
>Then what’s wrong and how can I fix this issue?

Recompile your code with the jars/sources from newer tomcats? 

The interface changed in tomcat. Your code was compiled with the old one, which is not compatible with the new interface. 

Regards, 
Felix 

PS: Don't hijack threads.

>
>Thanks!
>Sergey
>
>> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <mi...@gmail.com>
>wrote:
>> 
>> Hi,
>> 
>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com
><ma...@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-unsubscribe@tomcat.apache.org
><ma...@tomcat.apache.org>
>>> For additional commands, e-mail: users-help@tomcat.apache.org
><ma...@tomcat.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Sergey <sv...@apple.com>.
I see that in SFlow_Valve Source code it’s already “long”:

 long bytes_read = (request.getCoyoteRequest()).getBytesRead();

Then what’s wrong and how can I fix this issue?

Thanks!
Sergey

> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <mi...@gmail.com> wrote:
> 
> Hi,
> 
> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com <ma...@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-unsubscribe@tomcat.apache.org <ma...@tomcat.apache.org>
>> For additional commands, e-mail: users-help@tomcat.apache.org <ma...@tomcat.apache.org>

Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Sergey <sv...@apple.com>.
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 <fe...@internetallee.de> wrote:
> 
> 
> 
> Am 11. August 2015 23:32:12 MESZ, schrieb Sergey <sv...@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 <milesg78@gmail.com
>> <ma...@gmail.com>> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com
>> <ma...@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-unsubscribe@tomcat.apache.org
>> <ma...@tomcat.apache.org>
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>> <ma...@tomcat.apache.org>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 11. August 2015 23:32:12 MESZ, schrieb Sergey <sv...@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 <milesg78@gmail.com
><ma...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com
><ma...@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-unsubscribe@tomcat.apache.org
><ma...@tomcat.apache.org>
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
><ma...@tomcat.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Sergey <sv...@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?


Thanks!Sergey



> 
>> On Jul 23, 2015, at 11:52 AM, Violeta Georgieva <milesg78@gmail.com <ma...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> 2015-07-23 21:36 GMT+03:00 Sergey <svinnik@apple.com <ma...@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-unsubscribe@tomcat.apache.org <ma...@tomcat.apache.org>
>>> For additional commands, e-mail: users-help@tomcat.apache.org <ma...@tomcat.apache.org>


Re: Tomcat-7.0.61 and SFlow_Valve.jar issue

Posted by Violeta Georgieva <mi...@gmail.com>.
Hi,

2015-07-23 21:36 GMT+03:00 Sergey <sv...@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 7.0.60
(violetagg)

>
> Thanks!
> Sergey
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>