You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Geery <an...@gmail.com> on 2015/07/18 15:15:30 UTC
iis isapi redirect problem
I have successfully gotten Tomcat 8 to work with IIS 8.5 using these
directions: https://tomcat.apache.org/connectors-doc/reference/iis.html
IIS correctly forwards requests to Tomcat to handle and Tomcat correctly
hands the response back to IIS to return to the client. This works over
http and over https.
Now there is a requirement that all traffic should go over ssl, so in IIS I
added the following redirect to C:\inetpub\httproot:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="<https location of the
site>" exactDestination="false" httpResponseStatus="Found" />
</system.webServer>
</configuration>
The effect of this is that when a client requests a page over http, the
server sends a redirect (302) to the same page over https. This works for
other, non-Tomcat related pages on the site. However, it does not work for
pages that use the ISAPI redirector. When a Tomcat page is requested, the
URL that is returned is
https://<website>/jakarta/isapi_redirect.dll
That is, what seems to be happening is that rather having the ISAPI handler
render the page, the extension_uri value from the registry entry is being
returned to the client.
My questions are:
1) is there a better way to force http -> https in IIS? or
2) if not, is there a way to get IIS/ISAPI to work with a redirect (301 or
302)?
Thanks
Andrew
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
>
Tomcat-7.0.61 and SFlow_Valve.jar issue
Posted by 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?
Thanks!
Sergey
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: iis isapi redirect problem
Posted by Konstantin Preißer <kp...@apache.org>.
Hi,
> -----Original Message-----
> From: Andrew Geery [mailto:andrew.geery@gmail.com]
> Sent: Saturday, July 18, 2015 3:16 PM
> To: users@tomcat.apache.org
> Subject: iis isapi redirect problem
>
> I have successfully gotten Tomcat 8 to work with IIS 8.5 using these
> directions: https://tomcat.apache.org/connectors-doc/reference/iis.html
>
> IIS correctly forwards requests to Tomcat to handle and Tomcat correctly
> hands the response back to IIS to return to the client. This works over
> http and over https.
>
> Now there is a requirement that all traffic should go over ssl, so in IIS I
> added the following redirect to C:\inetpub\httproot:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
> <system.webServer>
> <httpRedirect enabled="true" destination="<https location of the
> site>" exactDestination="false" httpResponseStatus="Found" />
> </system.webServer>
> </configuration>
>
> The effect of this is that when a client requests a page over http, the
> server sends a redirect (302) to the same page over https. This works for
> other, non-Tomcat related pages on the site. However, it does not work for
> pages that use the ISAPI redirector. When a Tomcat page is requested, the
> URL that is returned is
>
> https://<website>/jakarta/isapi_redirect.dll
>
> That is, what seems to be happening is that rather having the ISAPI handler
> render the page, the extension_uri value from the registry entry is being
> returned to the client.
>
> My questions are:
> 1) is there a better way to force http -> https in IIS? or
> 2) if not, is there a way to get IIS/ISAPI to work with a redirect (301 or
> 302)?
I don't have much knowledge about ISAPI but I think this URL is returned because the Tomcat ISAPI Redirector DLL first acts as a ISAPI Filter to rewrite the URL to itself, so that in the next step it can act as a ISAPI Extension to actually forward the request to Tomcat.
I don't know about the <httpRedirect> element in IIS, but with IIS you can also use a HttpModule that redirect non-HTTPS requests. Note that when redirecting HTTP to HTTPS, you normally would use HSTS (HTTP Strict Transport Security) [1] so that the client knows that every request to this host should go over HTTPS.
Without HSTS a MITM attacker could simply strip out the redirect and SSL/TLS when the user wants to visit the page, because when the user enters "www.example.com" the browser usually would make a request to "http://www.example.com/" instead of "https://www.example.com".
With HSTS, only the first request is "vulnerable" (as long as you don't add the website to the HSTS preload list [2]), but for subsequent requests the browser automatically replaces http://... with https://... for that host, so without HSTS the users would not really be protected.
To implement a permanent (301) redirect and add a HSTS header, you could use a HTTP module like the following in IIS 7+:
[[[
using System;
using System.Web;
namespace Webapp.Code.Utils {
/// <summary>
/// A module that redirects HTTP requests to HTTPS ones, adding a HSTS header.
/// </summary>
public class SslAndHstsModule : IHttpModule {
public void Init(HttpApplication context) {
context.BeginRequest += context_BeginRequest;
}
private void context_BeginRequest(object sender, EventArgs e) {
HttpApplication app = (HttpApplication)sender;
HttpRequest request = app.Request;
HttpResponse response = app.Response;
if (request.IsSecureConnection) {
// Add a HSTS header
response.AppendHeader("Strict-Transport-Security", "max-age=63072000");
} else {
// Permanently redirect a HTTP request to HTTPS
string path = "https://" + request.ServerVariables["SERVER_NAME"] + request.ServerVariables["UNENCODED_URL"];
response.RedirectPermanent(path, false);
app.CompleteRequest();
}
}
public void Dispose() {
// Do nothing
}
}
}
]]]
To use it, you can put the code into a text file with the extension ".cs" and place it into the "App_Code" directory in your IIS web application directory. Then you can enable the module by adding it to the web.config file in the configuration/system.webServer/modules section:
<configuration>
<system.webServer>
<modules>
<!-- Redirect HTTP requests to HTTPS and add a HSTS header -->
<add name="SslAndHstsModule" type="Webapp.Code.Utils.SslAndHstsModule"/>
</modules>
</system.webServer>
</configuration>
Regards,
Konstantin Preißer
[1] https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
[2] https://hstspreload.appspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org