Re: Tomcat Access Logging Valve ?

2015-02-17 Thread Jeff Kohut
Sent from my tablet.
On Feb 17, 2015 7:22 AM, "Rainer Jung"  wrote:
>
> Am 14.02.2015 um 18:44 schrieb Jeff Kohut:
>
>> Sent from Google Nexus Phone
>> On Feb 14, 2015 9:54 AM, "Rainer Jung"  wrote:
>>>
>>>
>>> Am 14.02.2015 um 12:46 schrieb Jeff Kohut:
>>>
>>>> On Fri, Feb 13, 2015 at 10:29 AM, Christopher Schultz <
>>>> ch...@christopherschultz.net> wrote:
>>>>
>>>>> -BEGIN PGP SIGNED MESSAGE-
>>>>> Hash: SHA256
>>>>>
>>>>> Jeff,
>>>>>
>>>>> On 2/13/15 10:28 AM, Jeff Kohut wrote:
>>>>>>
>>>>>>
>>>>>> I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1
>>>>>> platform.
>>>>>>
>>>>>> I would like to control the contents of what gets logged to the
>>>>>> Tomcat localhost_access_log
>>>>>>
>>>>>> specifically , I would like to remove logging of entries like :
>>>>>>
>>>>>> 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0"
>>>>>> 200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb
>>>>>> HTTP/1.0" 200 561
>>>>>>
>>>>>> we have some external load balancers and server monitoring
>>>>>> software periodically hitting the application web page to see if it
>>>>>> is responding. I would like to know how remove these entries to
>>>>>> reduce the amount of "noise" that is in the  localhost_access_log
>>>>>> log file, but allow other entries (i.e. from OTHER IP addresses or
>>>>>> with other functions like "POST" or other strings like "HTTP/1.1"
>>>>>>
>>>>>> I have examined the information at the below link (unfortunately
>>>>>> there is no example there with detail on what I am attempting to
>>>>>> do).
>>>>>>
>>>>>> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
>>>>>>
>>>>>> Seems like I want to use the valve Access Log Valve Attributes:
>>>>>>
>>>>>> conditionIf
>>>>>>
>>>>>> or
>>>>>>
>>>>>> conditionUnless
>>>>>>
>>>>>> options from valve documentation, but it is not clear to me how to
>>>>>> do this (if this is the correct way ?).
>>>>>
>>>>>
>>>>>
>>>>> Yep, this is what you are looking for.
>>>>>
>>>>>> Server.xml currently has the following setup configuration:
>>>>>>
>>>>>>  >>>>> className="org.apache.catalina.valves.AccessLogValve"
>>>>>> directory="logs" prefix="localhost_access_log." suffix=".txt"
>>>>>> pattern="%h %l %u %t "%r" %s %b" />
>>>>>>
>>>>>> Is it possible to do this without programming (i.e. can I set the
>>>>>> valve components to simply filter on an ip address or key word
>>>>>> string (i.e. "Get /atb HTTP/1.0" and if that value is found in the
>>>>>> request, can I chose to then NOT write that entry to the
>>>>>> AccessLogValve). I have searched pretty thoroughly for some time on
>>>>>> how to do this, but the documentation simply does not provide
>>>>>> enough of an example on how to do this. I am not a programmer, but
>>>>>> would think that filtering entries out of logs based on criteria
>>>>>> would be a valuable feature to have.
>>>>>
>>>>>
>>>>>
>>>>> You have to have a way to set (or not) a request attribute in order to
>>>>> use conditionIf/conditionUnless. One way to do it without writing any
>>>>> of your own code is to use url-rewrite, which is more like
>>>>> url-do-whatever:
>>>>> http://tuckey.org/urlrewrite/
>>>>>
>>>>> You can configure that to set request attributes under certain
>>>>> criteria. Just have it set (or not) whatever attribute name you use
>>>>> for your conditional logging and you should be good to go.
>>>>>
>>>>> Hope that helps,
>>>>> - -chris
>>

Re: Tomcat Access Logging Valve ?

2015-02-14 Thread Jeff Kohut
Sent from Google Nexus Phone
On Feb 14, 2015 9:54 AM, "Rainer Jung"  wrote:
>
> Am 14.02.2015 um 12:46 schrieb Jeff Kohut:
>
>> On Fri, Feb 13, 2015 at 10:29 AM, Christopher Schultz <
>> ch...@christopherschultz.net> wrote:
>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA256
>>>
>>> Jeff,
>>>
>>> On 2/13/15 10:28 AM, Jeff Kohut wrote:
>>>>
>>>> I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1
>>>> platform.
>>>>
>>>> I would like to control the contents of what gets logged to the
>>>> Tomcat localhost_access_log
>>>>
>>>> specifically , I would like to remove logging of entries like :
>>>>
>>>> 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0"
>>>> 200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb
>>>> HTTP/1.0" 200 561
>>>>
>>>> we have some external load balancers and server monitoring
>>>> software periodically hitting the application web page to see if it
>>>> is responding. I would like to know how remove these entries to
>>>> reduce the amount of "noise" that is in the  localhost_access_log
>>>> log file, but allow other entries (i.e. from OTHER IP addresses or
>>>> with other functions like "POST" or other strings like "HTTP/1.1"
>>>>
>>>> I have examined the information at the below link (unfortunately
>>>> there is no example there with detail on what I am attempting to
>>>> do).
>>>>
>>>> http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
>>>>
>>>> Seems like I want to use the valve Access Log Valve Attributes:
>>>>
>>>> conditionIf
>>>>
>>>> or
>>>>
>>>> conditionUnless
>>>>
>>>> options from valve documentation, but it is not clear to me how to
>>>> do this (if this is the correct way ?).
>>>
>>>
>>> Yep, this is what you are looking for.
>>>
>>>> Server.xml currently has the following setup configuration:
>>>>
>>>>  >>> className="org.apache.catalina.valves.AccessLogValve"
>>>> directory="logs" prefix="localhost_access_log." suffix=".txt"
>>>> pattern="%h %l %u %t "%r" %s %b" />
>>>>
>>>> Is it possible to do this without programming (i.e. can I set the
>>>> valve components to simply filter on an ip address or key word
>>>> string (i.e. "Get /atb HTTP/1.0" and if that value is found in the
>>>> request, can I chose to then NOT write that entry to the
>>>> AccessLogValve). I have searched pretty thoroughly for some time on
>>>> how to do this, but the documentation simply does not provide
>>>> enough of an example on how to do this. I am not a programmer, but
>>>> would think that filtering entries out of logs based on criteria
>>>> would be a valuable feature to have.
>>>
>>>
>>> You have to have a way to set (or not) a request attribute in order to
>>> use conditionIf/conditionUnless. One way to do it without writing any
>>> of your own code is to use url-rewrite, which is more like
>>> url-do-whatever:
>>> http://tuckey.org/urlrewrite/
>>>
>>> You can configure that to set request attributes under certain
>>> criteria. Just have it set (or not) whatever attribute name you use
>>> for your conditional logging and you should be good to go.
>>>
>>> Hope that helps,
>>> - -chris
>>>
>>
>> Chris, Looks a bit complicated (but then I guess life is a bit
complicated
>> ;-) I was hoping for something built in. In looking at the explanation
and
>> a little at the support websites, it looks as if this is something to
>> rewrite what makes it to the actual webapps applications. I did not see
>> where it was used to be able to filter out the main tomcat access logs
(i.e
>> being able to control something so early as the Request and built in
Tomcat
>> logging), but I guess it may be possible to do that. I will look into
this
>> further if I have the time. As Andre pointed out in a follow up post, I
>> could just filter the access log into another file externally and do my
>> cleanup that way.
>> Thank you for taking the time to answer and provide something to look
into
>> further.

Re: Tomcat Access Logging Valve ?

2015-02-14 Thread Jeff Kohut
On Sat, Feb 14, 2015 at 4:48 AM, André Warnier  wrote:

> Jeff Kohut wrote:
>
>> I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1 platform.
>>
>> I would like to control the contents of what gets logged to the Tomcat
>>  localhost_access_log
>>
>> specifically , I would like to remove logging of entries like :
>>
>> 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0" 200 573
>> 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb HTTP/1.0" 200 561
>>
>>
> Naive question : why make it complicated and add overhead to your Tomcat
> process in order to do that ?
> Why not leaving the access log as it is, and use an external filtering
> program as and when you need it ?
> like
> grep -v -e "^GET \/atb " access.log > clean_access.log
> comes to mind..
>
> Or, if you have several patterns to filter out :
> grep -v -f file_with_patterns access.log > clean_access.log
>
> In addition, one might argue that this leaves in existence at least one
> version of the access log which is really accurate, if you ever need it.
>
> I will consider your suggestion, as it does not look like I may have the
> option to do what I originally would have preferred to do with built in
> Tomcat functionality. Sorry if my question seemed naive, but since Tomcat
> had options to control what was written out to the access log file, I
> thought it might also have some options to control if ANYTHING was written
> to the access log for certain entries(and possible in the configuration
> itself.I suppose if everyone was an expert, then there would be no need for
> these mailing lists. Thank you for your time and response.
>
   Jeff

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


Re: Tomcat Access Logging Valve ?

2015-02-14 Thread Jeff Kohut
On Fri, Feb 13, 2015 at 10:29 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Jeff,
>
> On 2/13/15 10:28 AM, Jeff Kohut wrote:
> > I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1
> > platform.
> >
> > I would like to control the contents of what gets logged to the
> > Tomcat localhost_access_log
> >
> > specifically , I would like to remove logging of entries like :
> >
> > 10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0"
> > 200 573 10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb
> > HTTP/1.0" 200 561
> >
> > we have some external load balancers and server monitoring
> > software periodically hitting the application web page to see if it
> > is responding. I would like to know how remove these entries to
> > reduce the amount of "noise" that is in the  localhost_access_log
> > log file, but allow other entries (i.e. from OTHER IP addresses or
> > with other functions like "POST" or other strings like "HTTP/1.1"
> >
> > I have examined the information at the below link (unfortunately
> > there is no example there with detail on what I am attempting to
> > do).
> >
> > http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
> >
> > Seems like I want to use the valve Access Log Valve Attributes:
> >
> > conditionIf
> >
> > or
> >
> > conditionUnless
> >
> > options from valve documentation, but it is not clear to me how to
> > do this (if this is the correct way ?).
>
> Yep, this is what you are looking for.
>
> > Server.xml currently has the following setup configuration:
> >
> >   > className="org.apache.catalina.valves.AccessLogValve"
> > directory="logs" prefix="localhost_access_log." suffix=".txt"
> > pattern="%h %l %u %t "%r" %s %b" />
> >
> > Is it possible to do this without programming (i.e. can I set the
> > valve components to simply filter on an ip address or key word
> > string (i.e. "Get /atb HTTP/1.0" and if that value is found in the
> > request, can I chose to then NOT write that entry to the
> > AccessLogValve). I have searched pretty thoroughly for some time on
> > how to do this, but the documentation simply does not provide
> > enough of an example on how to do this. I am not a programmer, but
> > would think that filtering entries out of logs based on criteria
> > would be a valuable feature to have.
>
> You have to have a way to set (or not) a request attribute in order to
> use conditionIf/conditionUnless. One way to do it without writing any
> of your own code is to use url-rewrite, which is more like
> url-do-whatever:
> http://tuckey.org/urlrewrite/
>
> You can configure that to set request attributes under certain
> criteria. Just have it set (or not) whatever attribute name you use
> for your conditional logging and you should be good to go.
>
> Hope that helps,
> - -chris
>

Chris, Looks a bit complicated (but then I guess life is a bit complicated
;-) I was hoping for something built in. In looking at the explanation and
a little at the support websites, it looks as if this is something to
rewrite what makes it to the actual webapps applications. I did not see
where it was used to be able to filter out the main tomcat access logs (i.e
being able to control something so early as the Request and built in Tomcat
logging), but I guess it may be possible to do that. I will look into this
further if I have the time. As Andre pointed out in a follow up post, I
could just filter the access log into another file externally and do my
cleanup that way.
Thank you for taking the time to answer and provide something to look into
further.


> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJU3iZ0AAoJEBzwKT+lPKRYWwgQAJ5DbuAXSfLFsrEW28fO8o3s
> BaSlltKTATrxY1LqBHGl/6HHTxs9qedE2LWRfoF6532GtVBB8bhWkb4pu/UWmO5x
> mVCsfHPL3EOpAeCioXnavm17O+7+fs/dYiaXHqynLQlINUTTvUnMgXYciBtIsMGx
> O8NPRRSrL8LZu2jD6VC0z3ruvvfq3aXFhyvTaBQWxme1OuETmu1LudVt9CrHA1ZY
> e9Mj4QM3GoXcZJwDH/ZbTQJUymEgXQNj3tyLYqPT6FuMLOGHTDJ9ok9kKxyw461p
> 9a73H6HpDSCCG3zc/eAudW7YPkxyjM0zez/B0PrGrz28zp5nnrqgFWzHvAIzVD/W
> 8F0+GBrHebMBlQ9nU1SQChq2mveDJ38kIq7mdm8j4Ncl2Y8W3Umq6YUWSGh3MNmG
> EtX4KpXE2gT+k5JuCI1E3v+6B/jP+1cv4onjN6y7ZaYjd3fM4nAQWA5N9K/xmPaO
> qgj4obHTFM76iseit5KgkRihJNAsCLmiQVqQ9KsJUKZe16xMcTLcLh3SAZRW+f07
> JJmNiKipaHBpOhWwXH4ZN6CIfXOsx/MKn3o+FjQzodSkv6/6E3l2J4niemy7xIY7
> z+ywCKa2ij6mFYHnmmfJEBdZ+5r19ESLasJPP5OdpFHbczY3o0LamYkuXQ9fzENU
> 89hMIQXCyw7qCmlTfvCF
> =EZML
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat Access Logging Valve ?

2015-02-13 Thread Jeff Kohut
I am running Tomcat  7.0.54 on a Windows 2008 R1 with SP1 platform.

I would like to control the contents of what gets logged to the Tomcat
 localhost_access_log

specifically , I would like to remove logging of entries like :

10.239.54.8 - - [13/Feb/2015:00:00:07 -0600] "GET /atb HTTP/1.0" 200 573
10.239.58.29 - - [13/Feb/2015:00:00:08 -0600] "GET /atb HTTP/1.0" 200 561

we have some external load balancers and server monitoring software
periodically hitting the application web page to see if it is responding. I
would like to know how remove these entries to reduce the amount of "noise"
that is in the  localhost_access_log  log file, but allow other entries
(i.e. from OTHER IP addresses or with other functions like "POST" or other
strings like "HTTP/1.1"

I have examined the information at the below link (unfortunately there is
no example there with detail on what I am attempting to do).

http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html

Seems like I want to use the valve Access Log Valve Attributes:

conditionIf

or

conditionUnless

options from valve documentation, but it is not clear to me how to do this
(if this is the correct way ?).

Server.xml currently has the following setup configuration:




Is it possible to do this without programming (i.e. can I set the valve
components to simply filter on an ip address or key word string (i.e. "Get
/atb HTTP/1.0" and if that value is found in the request, can I chose to
then NOT write that entry to the AccessLogValve). I have searched pretty
thoroughly for some time on how to do this, but the documentation simply
does not provide enough of an example on how to do this. I am not a
programmer, but would think that filtering entries out of logs based on
criteria would be a valuable feature to have.

Any example would be greatly appreciated

Thanks
Jeff

Sent from Google Nexus Phone


RE: tomcat errors

2015-02-11 Thread Jeff Kohut
Did you try restarting the whole server (i.e. Operating System restart?)

Sent from Google Nexus Phone
On Feb 10, 2015 1:45 PM, "Wirth, Kevin"  wrote:

> Yes, that is the log I am looking at and it is blank.
>
> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Tuesday, February 10, 2015 2:41 PM
> To: Tomcat Users List
> Subject: Re: tomcat errors
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Kevin,
>
> On 2/10/15 2:33 PM, Wirth, Kevin wrote:
> > The localhost.date log is empty.  Would it be in a different file?
>
> Look for anything in the logs/ directory. In a default configuration, the
> logs for your application would probably have gone to localhost-*.log.
>
> - -chris
>
> > -Original Message- From: Konstantin Kolinko
> > [mailto:knst.koli...@gmail.com] Sent: Tuesday, February 10, 2015
> > 2:29 PM To: Tomcat Users List Subject: Re: tomcat errors
> >
> > 2015-02-10 20:36 GMT+03:00 Wirth, Kevin :
> >> Hello.  I have been chasing this error for the last day and I am at a
> >> loss of what the problem is.  The application was working fine until
> >> Friday night when san maintenance was done and the sql database was
> >> shut down.  The application server was still up though.  Now the
> >> application will not start and its throwing these messages.  Its
> >> tomcat 7.0.57 running on windows 2012 with a sql 2012 database.  The
> >> application is sailpoint identityiq.  Any help would be great.
> >>
> >> Feb 10, 2015 12:29:39 PM org.apache.catalina.core.StandardContext
> >>  startInternal SEVERE: Error listenerStart Feb 10, 2015 12:29:39 PM
> >> org.apache.catalina.core.StandardContext startInternal SEVERE:
> >> Context [/identityiq] startup failed due to previous errors
> >
> > Some fatal error prevented your web application from starting. You
> > need to look for those _previous_ errors.  They are likely in a
> > different file (localhost..log).
> >
> >
> >> Feb 10, 2015 12:29:39 PM
> >> org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC driver
> >> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
> >> unregister it when the web application was stopped. To prevent a
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >
> > Memory leak = your server is likely to run out of memory if you reload
> > this application often. It is either an error in your web application
> > or a misconfiguration.
> >
> > http://wiki.apache.org/tomcat/MemoryLeakProtection
> >
> >
> > If java process has run out of memory (an OutOfMemoryError happened),
> > you have to kill and restart it.
> >
> > Best regards, Konstantin Kolinko
> >
> > -
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> > Astoria Federal Savings is now Astoria Bank.  We can now be contacted
> > at our new email addresses @astoriabank.com.
> >
> >
> > This e-mail and any attachments that accompany it are confidential and
> > may be legally privileged. It is intended solely for the use of the
> > individual(s) to whom it was intended to be addressed. Access to this
> > e-mail by anyone else is unauthorized. If you are not the intended
> > recipient, please immediately return the e-mail to the sender and
> > delete the original and any copy from your computer. If the reader of
> > this message is not the intended recipient, or an employee or agent
> > responsible for delivering this message to its intended recipient, you
> > are herewith notified that any dissemination, distribution, copying or
> > retention of this communication or the information contained herein is
> > strictly prohibited.
> >
> > -
> >
> >
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJU2l7fAAoJEBzwKT+lPKRYAfEQAKsd3zW7eNxJcjNTPnswGZ/0
> 2f1GrRvaiUu6GWwcRxywlZMA9nRoQz8ei5QroaizQ4UkywAG+kkwihUJ5/Hw4USS
> p6mCC8rMbpqVMiPNQjUCAlytCb+P28WuY2yCb6+UgjuROuW1/maje3cSSuoZHaqI
> +1fFtCK5QkGkIk71rOSgeDFhPHZw+tByx/nl5sOkqwxV94BC9sP/xa8d41sa/j8s
> pPYkSSbBPocMmoc2c/wGTf58RInTe5j2KLW4uifY9bA774E36f04lg7nJEZnZgG4
> EV5LurmWNxMb+lJYUz8rpqY2ihub+HI2FzKl3++LDTy+9WBTw6oKzDIgqGj5yK3O
> SjPB3xnBYU2lTj8KusmZmUAar9+F147U2pir9rm7ou0s8zhsHOT0dL3YkJnH7W9t
> ze9FRuo1m6TJ+pCwMwnSjdDaI1jHEmg5rviHGjOM+EYZlNE3VRvbIYKHRrn/TkIG
> /FcTc7CBzJhNIeBGNOJICoXLGWWS7/+L+fIGLbtE5/YeiYh/1Q0/9QFD8WghSlwK
> ymKv0N0+Yh1JK1zwaK9JShE3mSVho1GM+f4HgOXAnfqxVKnA4pkiAANXw1RvTegP
> fggnLkTN9dpOZmEzBjuQCRNS/FqzhZpe0imWzAjXKW8AKoTZK8eBu5LzYW7IYSxY
> p389VzxAqLVyH3c7Hqiy
> =uHjy
> -END PGP SIGNATURE-
>
> 

Re: JDBC Fails to connect to SQL Server

2015-01-30 Thread Jeff Kohut
On Fri, Jan 30, 2015 at 9:01 AM, Aniket Bhoi  wrote:

> Hi,
>
> I have Apache Solr hosted on Tomcat 6.
>
> There have been no changes to the code on Tomcat whatsoever.However for the
> last few days I now see this error in the Log files:
>
> SEVERE: Full Import failed
> Throwable occurred:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
> execute query: SELECT ID, ENTRY_TYPE_REF, PROFILE_REF, ITEM_REF, TITLE,
> ABSTRACT, SOLUTION, SOLUTION_HTML, FREE_TEXT, DATE_UPDATED, ENTRY_TYPE,
> PROFILE_TYPE, SERVICE_TYPE FROM INFRA_KO_V Processing Document # 1
> at
>
> org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.(JdbcDataSource.java:251)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:208)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
> at
>
> org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:58)
> at
>
> org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:71)
> at
>
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:233)
> at
>
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:579)
> at
>
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:260)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:184)
> at
>
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
> at
>
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:392)
> at
>
> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:373)
> *Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver
> could not establish a secure connection to SQL Server by using Secure
> Sockets Layer (SSL) encryption. Error: "SQL Server did not return a
> response. The connection has been closed.".*
> at
>
> com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
> at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)
> at
>
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)
> at
>
> com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
> at
>
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
> at
>
> com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:160)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSource.java:127)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcDataSource.java:361)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource.access$200(JdbcDataSource.java:39)
> at
>
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.(JdbcDataSource.java:238)
> ... 11 more
> *Caused by: java.io.IOException: SQL Server did not return a response. The
> connection has been closed.*
> at
>
> com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:513)
> at
>
> com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:570)
> at
>
> com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:562)
> at
>
> com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:757)
> at
>
> com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:745)
> at com.ibm.jsse2.b.a(b.java:286)
> at com.ibm.jsse2.b.a(b.java:67)
> at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:313)
> at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:63)
> at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:316)
> at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:220)
> at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)
> ... 20 more
>
> I can confirmthat there has been no change to firewall settings etc .
>
> Need help on this.
>
> Regards
> Aniket
>

Assuming no changes on the calling side (Application/OS), is it possible
that the Windows MS SQL server has been recently patched and restarted.
There are periodic OS, security updates to Windows and sometimes they
involve Certificates (i.e. SSL). It could be that a previously allowed
Certificate is no longer working due to expiration, encryption length no
longer being sufficient, etc...


Re: Tomcat sending 411 "Length Required" due to Chunked Transfer Encoding

2015-01-30 Thread Jeff Kohut
Thank you for pointing out my error in assuming that it was Tomcat's fault.
I have forwarded the issue to the application vendor to see if they can
fix. I appreciate your time in responding to my question as well as giving
me additional information with which to attempt to debug and/or correct the
issue (i.e. the filter option) I will consider this question closed.
THanks,
Jeff

On Thu, Jan 29, 2015 at 4:58 PM, Konstantin Kolinko 
wrote:

> 2015-01-30 1:29 GMT+03:00 Jeff Kohut :
> > My first post to Tomcat list, pardon me if I make any mistakes,
> >
> > Any help you can provide would be greatly appreciated.
> >
> > I have a Tomcat Server (V 7.0.54) running under Windows 2008 R2 With
> > Service Pack 1 (and up to date on Security as well as OS patches). That
> > server is running a vendor supplied group of applications via .war file
> as
> > normal. to receive Soap/XML data from remote computer and process and
> > return data back to calling application.
> >
> > The remote calling application hosted by IBM Websphere Application Server
> > (running Axis2 jars) that is sending XML Soap data via a Post to the
> Tomcat
> > Web server on port 8080/8443. If the amount of data is relatively small
> > (i.e. 14 K) we have no problem receiving the data as Websphere is using
> > Length Http 1.1 header and Tomcat sends the data to the application with
> no
> > issue. However as the data gets larger, Websphere begins using Chunked
> > Transfer Encoding and apparently Tomcat does not seem to like this as it
> > returns Http 411 "Length Required" message. I have searched Tomcat site,
> > and Tomcat indicates that is support Chunked encoding (part of the MUST
> > supported parts of the HTTP 1.1 RFC standard.
> >
> > My connector in Tomcat is configured:
> >
> >  >connectionTimeout="2"
> >redirectPort="8443" />
> >
> > I have tried forcing BIO,NIO, and APR with no luck to see if the
> > implementations might handle Chunked Encoding differently.
> >
> > I also have a more complicated 8443 SSL port that also works, until
> Chunked
> > encoding is used, and then it also responds with 411 Length Required
> error.
> >
> > I am able to replicate the problem by using SoapUI to send the same Soap
> > formatted XML Data. It works fine sending all sizes of data UNTIL I
> enable
> > Chunked Encoding Threshold which is smaller than the XML payload size
> > (threshold means to not Chunk until data is larger than Threshold), When
> > Chunking starts, Tomcat responds with 411 Length required.
> >
> > To finally work around this issue, I have put an Apache 2.4 server in
> front
> > of Tomcat, and have enable the mod_proxy_http, and am using an Apache
> > SetEnv variable setting of : SetEnv proxy-sendcl 1
> > The proxy-sendcl tells Apache to send the "Length" , and then Tomcat and
> > application are happy with the data (i.e. no 411 method sent back).
> >
> > As I stated above, Tomcat indicates it supports Chunked Encoding on it's
> > site, but it acts as if it is not happy with it.
> >
> > We have looked at packet traces and it appears that the Chunks are
> > formatted correctly (we are getting an initial Chunk(s) and then the last
> > Chunk is zero with Cr Lf following it as it seems to indicate in RFC.
> >
> > Has anyone else seen this issue and is there any way to alter the Tomcat
> > behavior with Chunked encoded data?
> >
> > We found an IBM Websphere article that seems to admit to the problem, but
> > they indicate that they should not have to offer a method to disable
> > chunked encoding as some who seem to have encountered this problem
> suggest.
> > IBM states that since Http 1.1 mandates support of Chunked Encoding, then
> > HTTP 1.1. servers should support Chunked encoding correctly. FYI, I took
> > the time to recreate the problem in C# code, and as soon as I turn on
> > Chunked Encoding, the 411 errors is present from that application also
> when
> > sending data to Tomcat Server.
>
>
> Tomcat 7 does not send status code 411 (a constant is declared in
> HttpServletResponse class but it is never used). That response code is
> coming from a web application that you are using.
>
> You may try debugging.
> http://wiki.apache.org/tomcat/FAQ/Developing#Debugging
> with a breakpoint on sendError(int,String), setStatus(int) methods of
> org.apache.catalina.connector.Response.
>
> It should be possible to implement a javax.servlet.Filter to cache a
> request and feed it to the web application for further processing, but
> it would be better to fix the web application itself.
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat sending 411 "Length Required" due to Chunked Transfer Encoding

2015-01-30 Thread Jeff Kohut
Thank you for pointing out my error in assuming that it was Tomcat's fault.
I have forwarded the issue to the application vendor to see if they can
fix. I appreciate your time in responding to my question. I will consider
this questions closed.

On Thu, Jan 29, 2015 at 5:02 PM, Mark Thomas  wrote:

> On 29/01/2015 22:29, Jeff Kohut wrote:
> > My first post to Tomcat list, pardon me if I make any mistakes,
> >
> > Any help you can provide would be greatly appreciated.
> >
> > I have a Tomcat Server (V 7.0.54) running under Windows 2008 R2 With
> > Service Pack 1 (and up to date on Security as well as OS patches). That
> > server is running a vendor supplied group of applications via .war file
> as
> > normal. to receive Soap/XML data from remote computer and process and
> > return data back to calling application.
> >
> > The remote calling application hosted by IBM Websphere Application Server
> > (running Axis2 jars) that is sending XML Soap data via a Post to the
> Tomcat
> > Web server on port 8080/8443. If the amount of data is relatively small
> > (i.e. 14 K) we have no problem receiving the data as Websphere is using
> > Length Http 1.1 header and Tomcat sends the data to the application with
> no
> > issue. However as the data gets larger, Websphere begins using Chunked
> > Transfer Encoding and apparently Tomcat does not seem to like this as it
> > returns Http 411 "Length Required" message.
>
> 
>
> The mistake you have made is assuming that it is Tomcat internal code
> that is returning the 411. It isn't. Tomcat never sends that response
> code. It is the application that is processing the data and failing to
> handle the lack of content-length when chunked encoding is used.
>
> For the record, Tomcat handles chunked request bodies quite happily and
> we have a bunch of unit tests that cover this.
>
> You need to complain to the vendor that provides the applications you
> are running on your Tomcat instance.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat sending 411 "Length Required" due to Chunked Transfer Encoding

2015-01-29 Thread Jeff Kohut
My first post to Tomcat list, pardon me if I make any mistakes,

Any help you can provide would be greatly appreciated.

I have a Tomcat Server (V 7.0.54) running under Windows 2008 R2 With
Service Pack 1 (and up to date on Security as well as OS patches). That
server is running a vendor supplied group of applications via .war file as
normal. to receive Soap/XML data from remote computer and process and
return data back to calling application.

The remote calling application hosted by IBM Websphere Application Server
(running Axis2 jars) that is sending XML Soap data via a Post to the Tomcat
Web server on port 8080/8443. If the amount of data is relatively small
(i.e. 14 K) we have no problem receiving the data as Websphere is using
Length Http 1.1 header and Tomcat sends the data to the application with no
issue. However as the data gets larger, Websphere begins using Chunked
Transfer Encoding and apparently Tomcat does not seem to like this as it
returns Http 411 "Length Required" message. I have searched Tomcat site,
and Tomcat indicates that is support Chunked encoding (part of the MUST
supported parts of the HTTP 1.1 RFC standard.

My connector in Tomcat is configured:



I have tried forcing BIO,NIO, and APR with no luck to see if the
implementations might handle Chunked Encoding differently.

I also have a more complicated 8443 SSL port that also works, until Chunked
encoding is used, and then it also responds with 411 Length Required error.

I am able to replicate the problem by using SoapUI to send the same Soap
formatted XML Data. It works fine sending all sizes of data UNTIL I enable
Chunked Encoding Threshold which is smaller than the XML payload size
(threshold means to not Chunk until data is larger than Threshold), When
Chunking starts, Tomcat responds with 411 Length required.

To finally work around this issue, I have put an Apache 2.4 server in front
of Tomcat, and have enable the mod_proxy_http, and am using an Apache
SetEnv variable setting of : SetEnv proxy-sendcl 1
The proxy-sendcl tells Apache to send the "Length" , and then Tomcat and
application are happy with the data (i.e. no 411 method sent back).

As I stated above, Tomcat indicates it supports Chunked Encoding on it's
site, but it acts as if it is not happy with it.

We have looked at packet traces and it appears that the Chunks are
formatted correctly (we are getting an initial Chunk(s) and then the last
Chunk is zero with Cr Lf following it as it seems to indicate in RFC.

Has anyone else seen this issue and is there any way to alter the Tomcat
behavior with Chunked encoded data?

We found an IBM Websphere article that seems to admit to the problem, but
they indicate that they should not have to offer a method to disable
chunked encoding as some who seem to have encountered this problem suggest.
IBM states that since Http 1.1 mandates support of Chunked Encoding, then
HTTP 1.1. servers should support Chunked encoding correctly. FYI, I took
the time to recreate the problem in C# code, and as soon as I turn on
Chunked Encoding, the 411 errors is present from that application also when
sending data to Tomcat Server.

Thanks,
Jeff