Re: non www to www URL Rewrite

2017-11-13 Thread shivashankar manukondu
Please make it these changes in your webserver

Regards,
Siva

On Sat, Nov 11, 2017 at 10:17 AM, RAVIRAJ SHAH <me.raviraj...@gmail.com>
wrote:

> Thanks shiv,
>
> But no luck it is not working
> I did configuration as below
>
> Created rewrite.config file in
> ../conf/Catalina/example.com
>
> RewriteCond %{HTTP_HOST} ^example\.com [NC]
> RewriteCond %{HTTPS} ^on$
> RewriteRule ^(.*)$ https://www.example.com/$[R=permanent,L,NE]
>
> And added valve as below in server.xml
>  unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> 
>
> Do guide if anything to correct or any other solution
>
> On Fri, Nov 10, 2017, 14:43 shivashankar manukondu <
> sivasankar.m...@gmail.com> wrote:
>
> > Hi,
> >
> > If you want both should be accessible then try to use "ServerAlias"
> option
> >
> > If you want redirect all requests then try
> >
> > RewriteCond %{HTTP_HOST} ^example\.com [NC]
> > RewriteCond %{HTTPS} ^on$#if you don't want https then make off
> > RewriteRule ^(.*)$ https://www.example.com/$ [R=permanent,L,NE]  #
> > flags based on your requirement
> >
> > Please remember the above rules will be work based on all your existing
> > rewrite rules.
> >
> >
> > Regards,
> > Siva
> >
> >
> >
> > On Thu, Nov 9, 2017 at 10:58 AM, RAVIRAJ SHAH <me.raviraj...@gmail.com>
> > wrote:
> >
> > > Hi Andre,
> > >
> > > Thanks for quick reply
> > > yes it is pointing to same public IP
> > >
> > > Thanks,
> > > Raviraj
> > >
> > >
> > >
> > > Thanks & Regards,
> > > Raviraj Shah
> > >
> > >
> > > On 8 November 2017 at 22:50, André Warnier (tomcat) <a...@ice-sa.com>
> > wrote:
> > >
> > > > On 08.11.2017 17:35, RAVIRAJ SHAH wrote:
> > > >
> > > >> Sorry for my language
> > > >> my query with example
> > > >>
> > > >> Let's say my website domain is "example.com"
> > > >> Now I want to redirect "example.com" to "www.example.com"
> > > >> Kindly share how I can achieve it
> > > >>
> > > >
> > > > Well first, you need the 2 entries in the DNS server for "
> example.com
> > ".
> > > > You need :
> > > > example.com --> public Internet IP address of your server (A)
> > > > www.example.com --> public  Internet IP address of your server (B)
> > > >
> > > > and A == B
> > > >
> > > > otherwise it will never work.
> > > > Do you have that ?
> > > >
> > > > You can check this by getting a command-line window somewhere and
> > > entering
> > > > :
> > > > nslookup example.com
> > > > nslookup www.example.com
> > > > and both should give the same IP address.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >> On Wed, Nov 8, 2017, 19:08 André Warnier (tomcat) <a...@ice-sa.com>
> > > wrote:
> > > >>
> > > >> On 08.11.2017 14:30, RAVIRAJ SHAH wrote:
> > > >>>
> > > >>>> Anybody please help
> > > >>>>
> > > >>>
> > > >>> I think that you first try to communicate more clearly what you
> want
> > to
> > > >>> achieve.
> > > >>> "redirect non-www URL to www URL only"
> > > >>> does not appear to make much sense.
> > > >>>
> > > >>> Also please send your message to the list as *plain text*, not
> html.
> > > >>> It will make it easier to read configuration lines below which look
> > > like
> > > >>> URL's.
> > > >>>
> > > >>>
> > > >>>
> > > >>>> On Tue, Nov 7, 2017, 12:00 RAVIRAJ SHAH <me.raviraj...@gmail.com>
> > > >>>> wrote:
> > > >>>>
> > > >>>> Dear All,
> > > >>>>>
> > > >>>>> Kindly request you to help to resolve this issue
> > > >>>>>
> > > >>>>> Problem Statement :
> > > >>>>> we want to redirect non-www URL to www URL only
> > > >>>>>
> > > >>>>> Current setup :
> > > >>>>>
> > > >>>>> Defined rewrite valve in server.xml as below
> > > >>>>>
> > > >>>>>
> > > >>>>>  > > >>>>> autoDeploy=
> > > >>>>> "true">
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>>> > >>>>>
> > > >>>> />
> > > >>>
> > > >>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> 
> > > >>>>>
> > > >>>>> Created rewrite.config file in ../conf/Catalina//
> > > >>>>>
> > > >>>>>
> > > >>>>> *RewriteCond %{HTTP_HOST} !^(.*)\.yourdomain\.com$ [NC]
> RewriteRule
> > > >>>>>
> > > >>>> ^(.*)$
> > > >>>
> > > >>>> http://www.yourdomain.com <http://www.yourdomain.com>/$1
> [R=301,L]*
> > > >>>>>
> > > >>>>> *kindly do needful*
> > > >>>>>
> > > >>>>> Thanks & Regards,
> > > >>>>> Raviraj Shah
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>
> > > >>>
> > > >>> 
> -
> > > >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > >
> > > > 
> -
> > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > > > For additional commands, e-mail: users-h...@tomcat.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> > --
> >
> > Regards
> > Siva
> > #068860592040
> >
>



-- 

Regards
Siva
#068860592040


Re: non www to www URL Rewrite

2017-11-10 Thread shivashankar manukondu
Hi,

If you want both should be accessible then try to use "ServerAlias" option

If you want redirect all requests then try

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{HTTPS} ^on$#if you don't want https then make off
RewriteRule ^(.*)$ https://www.example.com/$ [R=permanent,L,NE]  #
flags based on your requirement

Please remember the above rules will be work based on all your existing
rewrite rules.


Regards,
Siva



On Thu, Nov 9, 2017 at 10:58 AM, RAVIRAJ SHAH 
wrote:

> Hi Andre,
>
> Thanks for quick reply
> yes it is pointing to same public IP
>
> Thanks,
> Raviraj
>
>
>
> Thanks & Regards,
> Raviraj Shah
>
>
> On 8 November 2017 at 22:50, André Warnier (tomcat)  wrote:
>
> > On 08.11.2017 17:35, RAVIRAJ SHAH wrote:
> >
> >> Sorry for my language
> >> my query with example
> >>
> >> Let's say my website domain is "example.com"
> >> Now I want to redirect "example.com" to "www.example.com"
> >> Kindly share how I can achieve it
> >>
> >
> > Well first, you need the 2 entries in the DNS server for "example.com".
> > You need :
> > example.com --> public Internet IP address of your server (A)
> > www.example.com --> public  Internet IP address of your server (B)
> >
> > and A == B
> >
> > otherwise it will never work.
> > Do you have that ?
> >
> > You can check this by getting a command-line window somewhere and
> entering
> > :
> > nslookup example.com
> > nslookup www.example.com
> > and both should give the same IP address.
> >
> >
> >
> >
> >
> >> On Wed, Nov 8, 2017, 19:08 André Warnier (tomcat) 
> wrote:
> >>
> >> On 08.11.2017 14:30, RAVIRAJ SHAH wrote:
> >>>
>  Anybody please help
> 
> >>>
> >>> I think that you first try to communicate more clearly what you want to
> >>> achieve.
> >>> "redirect non-www URL to www URL only"
> >>> does not appear to make much sense.
> >>>
> >>> Also please send your message to the list as *plain text*, not html.
> >>> It will make it easier to read configuration lines below which look
> like
> >>> URL's.
> >>>
> >>>
> >>>
>  On Tue, Nov 7, 2017, 12:00 RAVIRAJ SHAH 
>  wrote:
> 
>  Dear All,
> >
> > Kindly request you to help to resolve this issue
> >
> > Problem Statement :
> > we want to redirect non-www URL to www URL only
> >
> > Current setup :
> >
> > Defined rewrite valve in server.xml as below
> >
> >
> >  > autoDeploy=
> > "true">
> >
> >
> >
> >>
>  />
> >>>
> 
> >
> >
> > 
> >
> > Created rewrite.config file in ../conf/Catalina//
> >
> >
> > *RewriteCond %{HTTP_HOST} !^(.*)\.yourdomain\.com$ [NC] RewriteRule
> >
>  ^(.*)$
> >>>
>  http://www.yourdomain.com /$1 [R=301,L]*
> >
> > *kindly do needful*
> >
> > Thanks & Regards,
> > Raviraj Shah
> >
> >
> >
> 
> >>>
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >>> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>>
> >>>
> >>>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>



-- 

Regards
Siva
#068860592040


Re: FW: [error] SSL0266E: Handshake Failed, Could not establish SSL proxy connection

2017-10-11 Thread shivashankar manukondu
Hi,

Can you post the web and tomcat servers configuration files.

I hope you have added CA root certificate to the backend truststore?

Regards,
Siva

On Wed, Oct 11, 2017 at 3:05 PM, Gali, Vamsi A <
vamsi_a_g...@keybank.com.invalid> wrote:

> Igor,
>
> Thank you for the response!
>
> Since the request is failing at SSL handshake, Tomcat doesn’t even record
> anything not even the access log. I tried enabling debug at tomcat but
> nothing is captured during the request initiation.
>
> Thank you,
> Vamsi Gali
>
> -Original Message-
> From: Igor Cicimov [mailto:icici...@gmail.com]
> Sent: Wednesday, October 11, 2017 4:09 AM
> To: Tomcat Users List
> Subject: Re: FW: [error] SSL0266E: Handshake Failed, Could not establish
> SSL proxy connection
>
> On 11 Oct 2017 1:50 am, "Gali, Vamsi A" 
> wrote:
>
> Hello,
>
> Any help is appreciated on this issue.
>
> Thank you,
> Vamsi Gali
>
>
> -Original Message-
> From: Gali, Vamsi A
> Sent: Thursday, October 05, 2017 12:03 PM
> To: 'Tomcat Users List'
> Subject: RE: [error] SSL0266E: Handshake Failed, Could not establish SSL
> proxy connection
>
> Hello,
> I just realized that I didn’t provide the environment info & following are
> the details:
>
> Tomcat:  apache-tomcat-7.0.75
> IHS: HIS v8.5.5.x
> OS: RHEL
>
> We have IHS→mod_proxy(on IHS) → Tomcat.
> I know that IHS isn’t the suggested webserver to use with Tomcat but it’s
> in use.
> [error] SSL0266E: Handshake Failed, Could not establish SSL proxy
> connection
>
> When Tomcat is accessed through webserver url, it throws ‘500’ with the
> following stack on the IHS Error log:
>
> [Thu Oct 00 09:20:20 2017] [debug] proxy_util.c(2313): proxy: HTTPS: fam 2
> socket created to connect to TOMCAT2 [Thu Oct 00 09:20:20 2017] [debug]
> proxy_util.c(2419): proxy: HTTPS: connection complete to  TOMCAT-IP:PORT
> (TOMCAT2) [Thu Oct 00 09:20:20 2017] [error] SSL0266E: Handshake Failed,
> Could not establish SSL proxy connection.
> [Thu Oct 00 09:20:20 2017] [info] [client TOMCAT-IP] [7fa404014a60] [13789]
> SSL0240I: SSL Handshake Failed, Socket has been closed. Client sent fatal
> alert [level 2 (fatal), description 40 (handshake_failure)] [TOMCAT-IP:PORT
> -> IHS:PORT] [09:20:20.000967434] 0ms [Thu Oct 00 09:20:20 2017] [debug]
> [client  TOMCAT-IP] [7fa404014a60] Handshake transcript:
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  client_version [Thu
> Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP] gsksslDissector_8Bits
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]03
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]
> gsksslDissector_8Bits
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]03
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  TLSV12 [Thu Oct 00
> 09:20:20 2017] [debug] [client  TOMCAT-IP]  random [Thu Oct 00 09:20:20
> 2017] [debug] [client  TOMCAT-IP] gsksslDissector_32Bits
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]9xx
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]
> gsksslDissector_Opaque
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]Length: 28
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]1x 62 xx B3 1F 44
> xx 8E D2 xx x7 17 xx 59 x9 x9 .b...D...)...Y..
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]x1 91 19 08 25 xx
> DC xx E1 xx 20 xx %..o.9 x
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  session_id [Thu Oct
> 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  Length: 00 [Thu Oct 00
> 09:20:20 2017] [debug] [client  TOMCAT-IP]  cipher_suites [Thu Oct 00
> 09:20:20 2017] [debug] [client  TOMCAT-IP]  Length: 14 [Thu Oct 00
> 09:20:20 2017] [debug] [client  TOMCAT-IP]  0x Fx x6 00 00 xx
> 00 xx 00 xx 00 xx 00 xx   ..V/.5
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]
> tls_ri_scsv,tls_fallback_scsv,tls_rsa_with_rc4_128_sha,tls_
> rsa_with_aes_128_cbc_sha,tls_rsa_with_aes_256_cbc_sha,tls_
> rsa_with_3des_ede_cbc_sha,tls_rsa_with_rc4_128_md5
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]
> compression_methods [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]
> Length: 01 [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  00
> .
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  Extensions [Thu Oct
> 00 09:20:20 2017] [debug] [client  TOMCAT-IP]  Length: 00
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP]   Extension Count: 0
> [Thu Oct 00 09:20:20 2017] [debug] [client  TOMCAT-IP] end handshake
> transcript [Thu Oct 00 09:20:20 2017] [debug] proxy_util.c(2442): proxy:
> HTTPS: pre_connection setup failed (500) [Thu Oct 00 09:20:20 2017] [debug]
> proxy_util.c(2022): proxy: HTTPS: has released connection for TOMCAT2
> 
> 
> 

Re: Tomcat Auto Shutdown issues

2017-04-30 Thread shivashankar manukondu
Hi,

Looks like it is not able to unregistered during closing the DataSource -
which causes memory leak, and Tomcat complains about it.

Check in your web application if any jdbc unregister method using, also try
to move your jdbc drivers to tomcat common lib directory instead of using
in web application.

Regards,
Siva

On Sun, Apr 30, 2017 at 6:47 AM, Naga Ramesh 
wrote:

> Naveen,
>
> Can u provide the setenv changes and total system RAM and free RAM output
> for need to investigation
>
> Regards,
> Ramesh
> On Apr 29, 2017 8:53 PM, "Naveen Nandyala - Vendor" <
> naveen.nandy...@walmart.com> wrote:
>
> > Hi Team,
> >
> > We are using Tomcat "7.0.61.0", and running on SUSE Linux
> > Enterprise Server 11 (x86_64), Version 11, and PatchLevel 3.  Our tomcat
> > instance is going down due to below message, and its not a normal
> shutdown
> > we are not sure why and who is causing to throw this messages and causing
> > tomcat instance go down.  Can anyone provide some inputs for cause of
> this
> > and how can we debug what is causing.
> >
> > Below is op from catalina logs.
> >
> >
> > Apr 26, 2017 12:38:41 PM org.apache.coyote.AbstractProtocol pause
> > INFO: Pausing ProtocolHandler ["http-nio-61034"]
> > Apr 26, 2017 12:38:41 PM org.apache.catalina.core.StandardService
> > stopInternal
> > INFO: Stopping service Catalina
> > Apr 26, 2017 12:38:52 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesJdbc
> > SEVERE: The web application [/MainframeJobRequest] registered the JDBC
> > driver [com.ibm.db2.jcc.DB2Driver] but failed to unregister it when the
> web
> > application was stopped. To prevent a memory leak
> > , the JDBC Driver has been forcibly unregistered.
> > Apr 26, 2017 12:38:52 PM org.apache.coyote.AbstractProtocol stop
> > INFO: Stopping ProtocolHandler ["http-nio-61034"]
> > Apr 26, 2017 12:38:52 PM org.apache.coyote.AbstractProtocol destroy
> >
> >
> >
> > Warm Regards,
> > Naveen Kumar Reddy N
> >
> >
> >
>



-- 

Regards
Siva
#068860592040


Re: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8 Internal Logging - RollingFileAppender does not (cannot?) create new Log File

2017-04-13 Thread shivashankar manukondu
Hi,

If you do not have any concern to use Timebased then you can try this
option and also working with Log4J2.



Regards,
Siva

On Thu, Apr 13, 2017 at 5:21 PM, Ankit Agarwal <
ankit_agar...@yahoo.com.invalid> wrote:

>
>
>
>
> On Thursday, April 13, 2017 7:43 AM, "Berneburg, Cris J. - US" <
> cberneb...@caci.com> wrote:
>
>
>  Ankit
>
> -Original Message-
> From: Berneburg, Cris J. - US
> Sent: Thursday, April 13, 2017 10:35 AM
> To: Tomcat Users List
> Subject: RE: Using Log4J2 2.8 (via the 1.2 API Bridge) for Tomcat8
> Internal Logging - RollingFileAppender does not (cannot?) create new Log
> File
>
> >> The only problem is that Tomcat only supports the Log4J
> >> 1.x API. It doesn't natively support Log4J2 so we have
> >> to use the 1.x -> 2.x Bridge and some things do not work.
> >
> > OK, can you get it basically working with the older Log4J
> > instead, without the fancy stuff, just to investigate?
> >
> > Also, I don't know the interface between Tomcat/Log4J.  I
> > would have guessed that Log4J would need to conform to the
> > Apache Commons Logging API, not the other way around.  But
> > again, I'm new to this.
>
> Below is something interesting that Mark Thomas (current Tomcat
> maintainer) has to say about Tomcat and Log4J/2:
>
> -Original Message-
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Tuesday, April 11, 2017 1:22 PM
> To: Tomcat Users List
> Subject: Re: tomcat-embed-logging-juli not updated in Maven Central?
>
> > log4j is no longer supported. Its replacement, log4j2, can
> > hook directly into the java.util.logging framework. Therefore,
> > there is no need for the separate modules. The classes from
> > the tomcat-embed-logging-juli JAR were merged into the core JAR.
>
> Thanks for your reply Cris. The note from Mark is interesting.
> However, I couldn't find any instructions on how to get Log4J2 working
> natively, i.e., without the 1.x -> 2.x Bridge. The Tomcat documentation
> hasn't been updated either.
> I'd be happy to test out Log4J2 native logging in Tomcat as well as
> document the same, if someone can point me to how to set this up.
>
> Thanks,Ankit
>
>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>
>  ���
> ��ХF�V�7V'67&��R���âW6W'2�V�7V'67&���6B�6�R��&
> pФf�"FF�F6G2�R���âW6W'2ֆV�F��6B�6�R��Р
>
>




-- 

Regards
Siva
#068860592040


Re: rotate catalina.out

2017-04-13 Thread shivashankar manukondu
Is there any possibility loss the log information in case if we use any
external tools like Log4j, logrotete

Regards,
Siva

On Wed, Apr 12, 2017 at 4:32 PM, Rainer Jung <rainer.j...@kippdata.de>
wrote:

> Am 12.04.2017 um 16:15 schrieb Mark Thomas:
>
>> On 12/04/17 14:13, shivashankar manukondu wrote:
>>
>>> Hi,
>>>
>>> Do we have any default catalina.out
>>> <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8
>>> without using any external tool like Log4J or logrotate.
>>>
>>
>> No. But since catalina.out is only what is written to stdout is should
>> be mostly (ideally entirely) empty.
>>
>
> Aren't we currently still copying everything to STDOUT by default?
>
> In logging.properties:
>
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler,
> java.util.logging.ConsoleHandler
>
> So once people switch this to production style config
>
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler
>
> your statement would apply.
>
> Regards,
>
> Rainer
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 

Regards
Siva
#068860592040


rotate catalina.out

2017-04-12 Thread shivashankar manukondu
Hi,

Do we have any default catalina.out
 rotation in the tomcat8
without using any external tool like Log4J or logrotate.

Also should not be loss any logs while rotating.

-- 

Regards
Manu