Re: After OS update from RHEL 6.3 to 6.10 seeing 503 error

2020-07-30 Thread Satish Chhatpar 02
Hi Chris,

Thanks for replying.

No updates/changes done to Tomcat.





Yes with OS update httpd package got updated.


ID | Action(s)  | Package
---
15 | Downgrade  | httpd-2.2.15-26.el6.x86_64 EE
15 | Downgraded |   2.2.15-69.el6.x86_64 EE
14 | Updated| httpd-2.2.15-26.el6.x86_64 EE
14 | Update |   2.2.15-69.el6.x86_64 EE








No updates/changes to mod_jk

I have not checked tomcat logs. I shall check and share.

Thanks
Satish



From: Coty Sutherland 
Sent: Thursday, July 30, 2020 2:55 PM
To: Tomcat Users List 
Subject: Re: After OS update from RHEL 6.3 to 6.10 seeing 503 error


EXTERNAL EMAIL - Do not reply, click links or open attachments unless you 
recognise the sender and know the content is safe. If suspicious, report via 
the Report Message/Phishing button.



On Wed, Jul 29, 2020 at 4:41 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Satish,
>
> On 7/29/20 2:56 PM, Satish Chhatpar 02 wrote:
> > After  OS update from RHEL 6.6  to 6.10, seeing 503 error.
> >
> > Need help to fix this.
> >
> >
> >
> > 
> > 503 Service Temporarily Unavailable
> > 
> > Service Temporarily Unavailable
> > The server is temporarily unable to service your
> > request due to maintenance downtime or capacity
> > problems. Please try again later.
> > Additionally, a 404 Not Found
> > error was encountered while trying to use an ErrorDocument to handle the
> request.
> > 
> >
> >
> > Tomcat version is 6.0.53
> >
> > mod_jk/1.2.37
> >
> >
> >
> > Server version: Apache/2.2.15 (Unix)
> > Server built:   Feb 19 2018 06:33:11
> > Server's Module Magic Number: 20051115:25
> > Server loaded:  APR 1.3.9, APR-Util 1.3.9
> > Compiled using: APR 1.3.9, APR-Util 1.3.9
> > Architecture:   64-bit
> > Server MPM: Prefork
> >   threaded: no
> > forked: yes (variable process count)
> > Server compiled with
> >  -D APACHE_MPM_DIR="server/mpm/prefork"
> >  -D APR_HAS_SENDFILE
> >  -D APR_HAS_MMAP
> >  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> >  -D APR_USE_SYSVSEM_SERIALIZE
> >  -D APR_USE_PTHREAD_SERIALIZE
> >  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> >  -D APR_HAS_OTHER_CHILD
> >  -D AP_HAVE_RELIABLE_PIPED_LOGS
> >  -D DYNAMIC_MODULE_LIMIT=128
> >  -D HTTPD_ROOT="/etc/httpd"
> >  -D SUEXEC_BIN="/usr/sbin/suexec"
> >  -D DEFAULT_PIDLOG="run/httpd.pid"
> >  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> >  -D DEFAULT_LOCKFILE="logs/accept.lock"
> >  -D DEFAULT_ERRORLOG="logs/error_log"
> >  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> >  -D SERVER_CONFIG_FILE="conf/httpd.conf"
> >
> >
> >
> > In access logs I  404
> >
> >   "GET /commerce/servlet/gben-OrderStatusWebService HTTP/1.1" 404 - 0
> "-" "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/45.0.2454.85 Safari/537.36"
> >
> >
> > In error log I see
> >
> > Response header name 'Cache/Control' contains invalid characters,
> aborting request
> >
> >
> >
> > in mod_jk log  I see
> >
> >
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (485): socket TCP_NODELAY set to On
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (522): socket SO_KEEPALIVE set to On
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (609): trying to connect socket 39 to
> 10.80.1.84:8901
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [trace]
> nb_connect::jk_connect.c (227): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> nb_connect::jk_connect.c (273): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (635): socket 39 [172.16.133.13:46132 ->
> 10.80.1.84:8901] connected
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_open_socket::jk_connect.c (638): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> ajp_handle_cping_cpong::jk_ajp_common.c (880): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1178): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1184): sending to ajp13
> pos=4 len=5 max=16
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 12 34 00
> 01 0A 00 00 00 00 00 00 00 00 00 00 00  - .4..
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_tcp_socket_sendfull::jk_connect.c (841): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_tcp_socket_sendfull::jk_connect.c (871): exit
> > [Wed Jul 29 19:24:31.878 2020] 

Re: Request for Help

2020-07-30 Thread Igal Sapir
On Wed, Jul 29, 2020 at 8:54 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Mohan,
>
> On 7/29/20 10:32, Mohan T wrote:
> > This is build using cruise control .  We have a similar
> > environment wherein this deliverable is working fine without any
> > error. We too k the deliverable from the working environment and
> > moved to the new environment and started the tomcat.
> Do you know if your build process "pre-compiles" JSP files into .class
> files? Have you upgraded Tomcat to a new version since it was working?
>
> Tomcat periodically upgrades the JDT compiler shipped with Tomcat and
> it may not always be backward-compatible with previously-pre-compiled
> JSP files.
>
> If this is the issue -- and I'm not claiming for sure that it is --
> then a re-build of your web application using the compiler shipped
> with the newer version of Tomcat should fix your issue.
>

I wonder also if it's possible that you have two different JAR files with
two different versions of JDT on the classpath?

If that's the case then one version is loaded, but when it tries to call
the method that it expects to have, the other version is found and the
method is not there.

Igal



>
> - -chris
>
> > -Original Message- From: James Moliere
> >  Sent: Wednesday, July 29, 2020 7:53 PM To:
> > Tomcat Users List  Subject: Re: Request
> > for Help
> >
> > Is the war file being built with maven? ...gradle?  ...or using
> > Eclipse?
> >
> > James
> >
> > On Tue, Jul 28, 2020 at 9:34 PM Mohan T  wrote:
> >
> >> Dear All,
> >>
> >>
> >>
> >> In one of the  environments we are using apache-tomcat-8.5.35.
> >>
> >>
> >>
> >> On server start we are getting this exception
> >>
> >> org.apache.catalina.core 28-Jul-2020 13:46:13.407 SEVERE
> >> [localhost-startStop-1]
> >> org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> >> [RVW_Banner] in web application [/security] threw load()
> >> exception
> >>
> >> java.lang.NoSuchMethodError:org.eclipse.jdt.internal.compiler.Compile
> r.(Lorg/eclipse/jdt/internal/compiler/env/INameEnvironment;Lorg/ec
> lipse/jdt/internal/compiler/IErrorHandlingPolicy;Lorg/eclipse/jdt/intern
> al/compiler/impl/CompilerOptions;Lorg/eclipse/jdt/internal/compiler/ICom
> pilerRequestor;Lorg/eclipse/jdt/internal/compiler/IProblemFactory;)V
> >>
> >>
> at
> >> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
> :
> >>
> >>
> 480)
> >>
> >> Any inputs to overcome this could help us in this.
> >>
> >> Thanks
> >>
> >> Mohan
> >>
> >>
> >>
> >> DISCLAIMER: This communication contains information which is
> >> confidential and the copyright of Ramco Systems Ltd, its
> >> subsidiaries or a third party ("Ramco"). This email may also
> >> contain legally privileged information. Confidentiality and legal
> >> privilege attached to this communication are not waived or lost
> >> by reason of mistaken delivery to you.This email is intended to
> >> be read or used by the addressee only. If you are not the
> >> intended recipient, any use, distribution, disclosure or copying
> >> of this email is strictly prohibited without the express written
> >> approval of Ramco. Please delete and destroy all copies and email
> >> Ramco at le...@ramco.com immediately. Any views expressed in this
> >> communication are those of the individual sender, except where
> >> the sender specifically states them to be the views of Ramco.
> >> Except as required by law, Ramco does not represent, warrant
> >> and/or guarantee that the integrity of this communication has
> >> been maintained nor that the communication is free of errors,
> >> virus, interception or interference. If you do not wish to
> >> receive such communications, please forward this communication to
> >> market...@ramco.com and express your wish not to receive such
> >> communications henceforth.
> >>
> >
> >
> > -- ---v---v---v---v---v---v---v--- James Moliere
> > james.moli...@j2.com ---v---v---v---v---v---v---v---
> >
> > --
> >
> >
> > This email, its contents and attachments contain information from
> > J2 Global, Inc. and/or its affiliates which may be privileged,
> > confidential or otherwise protected from disclosure. The
> > information is intended to be for the addressee(s) only. If you are
> > not an addressee, any disclosure, copy, distribution or use of the
> > contents of this message is prohibited. If you have received this
> > email in error, please notify the sender by reply email and delete
> > the original message and any copies.
> >
> > DISCLAIMER: This communication contains information which is
> > confidential and the copyright of Ramco Systems Ltd, its
> > subsidiaries or a third party (“Ramco”). This email may also
> > contain legally privileged information. Confidentiality and legal
> > privilege attached to this communication are not waived or lost by
> > reason of mistaken delivery to you.This email is intended to be
> > read or used by the addressee 

Re: Upgrade: tomcat8w.exe //ES//example - dump Java Options and other information to tomcat9

2020-07-30 Thread Igal Sapir
Hans,

On Tue, Jul 28, 2020 at 5:51 AM Hans Schou  wrote:

>
>
> > Fra: Christopher Schultz 
>
> > Seems like it would be kind of awesome to have a feature like //PS//
> which would dump-out the service as a .BAT file, like:
>
> >  C:> tomcat9w.exe //PS//my-service-name
>
> Yes, that would be great.
> And with JAVA_HOME also.
>
> Right now I have solved my upgrade task with a script which can only
> upgrade from Tomcat 8.5 to 9.0
> As I can not see from command line which tomcat are being used, I had to
> look that up first.
> Then I also have to check if the instance is running Java 8 or Java 11.
> I run tomcat8w.exe to get and set Java options and memory usage.
>
> Here is the script:
>
> IF [%1] == [] (
> ECHO Error
> EXIT /B
> )
> SET INSTANCE=%1
> SET JAVA_HOME=D:\Java\jdk1.8
> rem SET JAVA_HOME=D:\Java\jdk11
> SET CATALINA_HOME=D:\Apache\tomcat-8.5
> SET CATALINA_BASE=D:\tomcat\%INSTANCE%
> %CATALINA_HOME%\bin\tomcat8w.exe //ES//%INSTANCE%
> PAUSE
> "C:\Program Files (x86)\Notepad++\notepad++.exe"
> %CATALINA_BASE%\conf\server.xml
> PAUSE
> NET STOP %INSTANCE%
> CALL %CATALINA_HOME%\bin\service remove %INSTANCE%
> SET CATALINA_HOME=D:\Apache\tomcat-9.0
> CALL %CATALINA_HOME%\bin\service install %INSTANCE%
> %CATALINA_HOME%\bin\tomcat9.exe //US//%INSTANCE% ^
>  --Startup auto ^
>  --DisplayName "Apache Tomcat 9.0 %INSTANCE%" ^
>  --Description "Tomcat 9.0 %CATALINA_BASE% %CATALINA_HOME%"
> PAUSE
> NET START %INSTANCE%
> %CATALINA_HOME%\bin\tomcat9w.exe //ES//%INSTANCE%
>
>
You should be able to set the Java Options with service.bat.  There is an
Environment variable called JvmArgs [1] which is appended to JvmOptions and
allows you to add different Java Options, e.g. set it like so before
calling `service.bat install`:

set "JvmArgs=-Dsome.property=SomeValue;-XX:+HeapDumpOnOutOfMemoryError"

For the heap size set the JvmMs and JvmMx environment variables.

Igal

[1] https://github.com/apache/tomcat/blob/master/bin/service.bat#L228



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


Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
On Thu, Jul 30, 2020 at 12:30 PM Igal Sapir  wrote:

> On Thu, Jul 30, 2020 at 12:25 PM Igal Sapir  wrote:
>
>> Mark,
>>
>> On Thu, Jul 30, 2020 at 12:21 PM Igal Sapir  wrote:
>>
>>> Mark,
>>>
>>> On Thu, Jul 30, 2020 at 12:14 PM Mark Thomas  wrote:
>>>
 On July 30, 2020 5:49:41 PM UTC, Igal Sapir  wrote:
 >Hello,
 >
 >I have the following in web.xml:
 >
 >  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
 >  - A default servlet from Tomcat, with init-param listings=true
 >  - A welcome-file of "index.cfm"
 >
 >My expectation is that for a request to a given directory, if a file
 >named
 >index.cfm exists then it would be passed to the Lucee servlet, and if
 >not,
 >the Directory Listings will be displayed.
 >
 >Instead, requests to a given directory are forwarded to Lucee, which
 >return
 >a 404.
 >
 >Is it possible to configure Tomcat so that it would check if the file
 >exists before matching the URI pattern of the welcome file?  This (as
 >all
 >Directory Listings, I would hope) is for a Development setup so it's OK
 >if
 >the check adds a few more microseconds to the request.
 >
 >Thanks,
 >
 >Igal

 Look at the resourceOnlyServlets attribute on Context.

>>>
>>> Calling context.getResourceOnlyServlets() returns "jsp".
>>>
>>> Should I set it explicitly to something else?
>>>
>>
>> I see the JavaDoc comment.  I will add the CFMLServlet and try it out.
>>
>
> Calling context.getResourceOnlyServlets("CFMLServlet") solves the issue.
>

I meant setResourceOnlyServlets("CFMLServlet") obviously ;)

Igal


>
> Brilliant!  Thanks Mark and Chris,
>
> Igal
>
>


Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
Mark,

On Thu, Jul 30, 2020 at 12:21 PM Igal Sapir  wrote:

> Mark,
>
> On Thu, Jul 30, 2020 at 12:14 PM Mark Thomas  wrote:
>
>> On July 30, 2020 5:49:41 PM UTC, Igal Sapir  wrote:
>> >Hello,
>> >
>> >I have the following in web.xml:
>> >
>> >  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
>> >  - A default servlet from Tomcat, with init-param listings=true
>> >  - A welcome-file of "index.cfm"
>> >
>> >My expectation is that for a request to a given directory, if a file
>> >named
>> >index.cfm exists then it would be passed to the Lucee servlet, and if
>> >not,
>> >the Directory Listings will be displayed.
>> >
>> >Instead, requests to a given directory are forwarded to Lucee, which
>> >return
>> >a 404.
>> >
>> >Is it possible to configure Tomcat so that it would check if the file
>> >exists before matching the URI pattern of the welcome file?  This (as
>> >all
>> >Directory Listings, I would hope) is for a Development setup so it's OK
>> >if
>> >the check adds a few more microseconds to the request.
>> >
>> >Thanks,
>> >
>> >Igal
>>
>> Look at the resourceOnlyServlets attribute on Context.
>>
>
> Calling context.getResourceOnlyServlets() returns "jsp".
>
> Should I set it explicitly to something else?
>

I see the JavaDoc comment.  I will add the CFMLServlet and try it out.

Thanks!

Igal


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


Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
On Thu, Jul 30, 2020 at 12:25 PM Igal Sapir  wrote:

> Mark,
>
> On Thu, Jul 30, 2020 at 12:21 PM Igal Sapir  wrote:
>
>> Mark,
>>
>> On Thu, Jul 30, 2020 at 12:14 PM Mark Thomas  wrote:
>>
>>> On July 30, 2020 5:49:41 PM UTC, Igal Sapir  wrote:
>>> >Hello,
>>> >
>>> >I have the following in web.xml:
>>> >
>>> >  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
>>> >  - A default servlet from Tomcat, with init-param listings=true
>>> >  - A welcome-file of "index.cfm"
>>> >
>>> >My expectation is that for a request to a given directory, if a file
>>> >named
>>> >index.cfm exists then it would be passed to the Lucee servlet, and if
>>> >not,
>>> >the Directory Listings will be displayed.
>>> >
>>> >Instead, requests to a given directory are forwarded to Lucee, which
>>> >return
>>> >a 404.
>>> >
>>> >Is it possible to configure Tomcat so that it would check if the file
>>> >exists before matching the URI pattern of the welcome file?  This (as
>>> >all
>>> >Directory Listings, I would hope) is for a Development setup so it's OK
>>> >if
>>> >the check adds a few more microseconds to the request.
>>> >
>>> >Thanks,
>>> >
>>> >Igal
>>>
>>> Look at the resourceOnlyServlets attribute on Context.
>>>
>>
>> Calling context.getResourceOnlyServlets() returns "jsp".
>>
>> Should I set it explicitly to something else?
>>
>
> I see the JavaDoc comment.  I will add the CFMLServlet and try it out.
>

Calling context.getResourceOnlyServlets("CFMLServlet") solves the issue.

Brilliant!  Thanks Mark and Chris,

Igal


Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
Mark,

On Thu, Jul 30, 2020 at 12:14 PM Mark Thomas  wrote:

> On July 30, 2020 5:49:41 PM UTC, Igal Sapir  wrote:
> >Hello,
> >
> >I have the following in web.xml:
> >
> >  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
> >  - A default servlet from Tomcat, with init-param listings=true
> >  - A welcome-file of "index.cfm"
> >
> >My expectation is that for a request to a given directory, if a file
> >named
> >index.cfm exists then it would be passed to the Lucee servlet, and if
> >not,
> >the Directory Listings will be displayed.
> >
> >Instead, requests to a given directory are forwarded to Lucee, which
> >return
> >a 404.
> >
> >Is it possible to configure Tomcat so that it would check if the file
> >exists before matching the URI pattern of the welcome file?  This (as
> >all
> >Directory Listings, I would hope) is for a Development setup so it's OK
> >if
> >the check adds a few more microseconds to the request.
> >
> >Thanks,
> >
> >Igal
>
> Look at the resourceOnlyServlets attribute on Context.
>

Calling context.getResourceOnlyServlets() returns "jsp".

Should I set it explicitly to something else?

Thank you,

Igal



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


Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
Chris,

On Thu, Jul 30, 2020 at 11:20 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

>
> On 7/30/20 13:49, Igal Sapir wrote:
> > Hello,
> >
> > I have the following in web.xml:
> >
> > - A servlet named Lucee, mapped to by URI pattern "*.cfm" - A
> > default servlet from Tomcat, with init-param listings=true - A
> > welcome-file of "index.cfm"
> >
> > My expectation is that for a request to a given directory, if a
> > file named index.cfm exists then it would be passed to the Lucee
> > servlet, and if not, the Directory Listings will be displayed.
>
> This is what I would expect as well. I believe this is how httpd
> works, for example. I believe the default welcome-file list includes
> index.jsp and that's how the JSP servlet is invoked. So this really
> should be working.
>

That's what I thought.  I wonder if Lucee should do something differently
here?  But then again I expect Lucee to never see this request in the first
place.


>
> > Instead, requests to a given directory are forwarded to Lucee,
> > which return a 404.
>
> So Lucee sees a request to /foo/bar instead of /foo/bar/index.cfm?
>
> What does the original request look like -- what is the URL being
> requested by the user-agent?
>

I have the following file structure:

$ tree /test/LuceeDebugWebapp/webapp/
/test/LuceeDebugWebapp/webapp/
├── dir
│   └── hello.txt
├── index.cfm

The dir subdirectory does not have a welcome page, so I'm using Google
Chrome to go to http://localhost:48080/dir/ and expecting to see a
directory listing with hello.txt.  Instead I get a 404 from Lucee, and in
the error message the statement:

  Page /dir/index.cfm [/test/LuceeDebugWebapp/webapp/dir/index.cfm] not
found

curl calls show the same:

calling / or /index.cfm returns the expected 200 OK as expected

$ curl -I http://localhost:48080/
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Length: 5774
Date: Thu, 30 Jul 2020 19:14:32 GMT

$ curl -I http://localhost:48080/index.cfm
HTTP/1.1 200
Content-Type: text/html;charset=UTF-8
Content-Length: 5774
Date: Thu, 30 Jul 2020 19:14:40 GMT

calling /dir without a trailing slash returns a 302 to /dir/ as expected

$ curl -I http://localhost:48080/dir
HTTP/1.1 302
Location: /dir/
Transfer-Encoding: chunked
Date: Thu, 30 Jul 2020 19:12:36 GMT

calling /dir/ returns a 404 -- NOT EXPECTED

$ curl -I http://localhost:48080/dir/
HTTP/1.1 404
Content-Type: text/html;charset=UTF-8
Content-Length: 6875
Date: Thu, 30 Jul 2020 19:13:27 GMT


>
> Can you post your exact config?
>

Effective web.xml pasted below [1]


>
> > Is it possible to configure Tomcat so that it would check if the
> > file exists before matching the URI pattern of the welcome file?
>
> ??
>
> > This (as all Directory Listings, I would hope) is for a
> > Development setup so it's OK if the check adds a few more
> > microseconds to the request.
>
> Resources can be configured to cache file-check misses (I think!), so
> it would be pretty fast if you needed it to be.
>

Awesome, though I would not expose directory listings in a non-dev
environment.

Here are a few more details on this specific setup, even though I've seen
this with standard Tomcat deployments, and can set up one for sanity check:

- This is an Embedded Tomcat
- I point to web.xml with context.setAltDDName()
- I call tomcat.setAddDefaultWebXmlToWebapp(false) to prevent the unneeded
loading of JSP etc

Also, if this seems to be a bug then I'd be happy to look deeper into it
and solve it.  I just thought that maybe I was doing something wrong.

Thank you,

Igal

[1]
INFO: Effective web.xml:

http://xmlns.jcp.org/xml/ns/javaee;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd;
 version="4.0"
 metadata-complete="true">

  
default

org.apache.catalina.servlets.DefaultServlet

  listings
  true


  debug
  0

1
  
  
CFMLServlet
lucee.loader.servlet.CFMLServlet
1
  
  
RESTServlet
lucee.loader.servlet.RestServlet
2
  

  
CFMLServlet
*.cfm
  
  
CFMLServlet
*.cfc
  
  
RESTServlet
%2Frest%2F*
  
  
default
%2F
  

  


  

  

index.cfm
index.html
index.htm
  

  UTF-8
  UTF-8



>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8jD1QACgkQHPApP6U8
> pFjfWBAAj10KspESQkhIcfOKAdFFTHrXbyxmFH6PBlvqusaZ2e/TTpf69wxN8Evp
> f2x2VNuUaE58LLKQGusey0V1a0lGtETHVAcZWiZeY57yiWV9AYkdW88LJY4aXGyr
> TZE5PT12VTt7Dr6xAL7Jc9kjLy2oBp+X0a0cP+XVUVsmvwt5vS0t5l/5qpskR9Fn
> MvpA0PFeQerUt83849AZ1PfMcqnQZz8ufjCfRixA8J3E7ztTkEZ4CnH90pAbve1W
> LBi89ks4DigMJnTJzEbyucCQjqbNj+hbZju7nvPNYPiGTvtdqbjMGMLb+MPr0O9D
> c+i2fPgBaysJrYXnLWTLMulE3yeq6M/cA8IEmYQ8tApIchQy8yklvaEjRTHyuI+A
> 

Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Mark Thomas
On July 30, 2020 5:49:41 PM UTC, Igal Sapir  wrote:
>Hello,
>
>I have the following in web.xml:
>
>  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
>  - A default servlet from Tomcat, with init-param listings=true
>  - A welcome-file of "index.cfm"
>
>My expectation is that for a request to a given directory, if a file
>named
>index.cfm exists then it would be passed to the Lucee servlet, and if
>not,
>the Directory Listings will be displayed.
>
>Instead, requests to a given directory are forwarded to Lucee, which
>return
>a 404.
>
>Is it possible to configure Tomcat so that it would check if the file
>exists before matching the URI pattern of the welcome file?  This (as
>all
>Directory Listings, I would hope) is for a Development setup so it's OK
>if
>the check adds a few more microseconds to the request.
>
>Thanks,
>
>Igal

Look at the resourceOnlyServlets attribute on Context.

Mark

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



Re: Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Igal,

On 7/30/20 13:49, Igal Sapir wrote:
> Hello,
>
> I have the following in web.xml:
>
> - A servlet named Lucee, mapped to by URI pattern "*.cfm" - A
> default servlet from Tomcat, with init-param listings=true - A
> welcome-file of "index.cfm"
>
> My expectation is that for a request to a given directory, if a
> file named index.cfm exists then it would be passed to the Lucee
> servlet, and if not, the Directory Listings will be displayed.

This is what I would expect as well. I believe this is how httpd
works, for example. I believe the default welcome-file list includes
index.jsp and that's how the JSP servlet is invoked. So this really
should be working.

> Instead, requests to a given directory are forwarded to Lucee,
> which return a 404.

So Lucee sees a request to /foo/bar instead of /foo/bar/index.cfm?

What does the original request look like -- what is the URL being
requested by the user-agent?

Can you post your exact config?

> Is it possible to configure Tomcat so that it would check if the
> file exists before matching the URI pattern of the welcome file?

??

> This (as all Directory Listings, I would hope) is for a
> Development setup so it's OK if the check adds a few more
> microseconds to the request.

Resources can be configured to cache file-check misses (I think!), so
it would be pretty fast if you needed it to be.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8jD1QACgkQHPApP6U8
pFjfWBAAj10KspESQkhIcfOKAdFFTHrXbyxmFH6PBlvqusaZ2e/TTpf69wxN8Evp
f2x2VNuUaE58LLKQGusey0V1a0lGtETHVAcZWiZeY57yiWV9AYkdW88LJY4aXGyr
TZE5PT12VTt7Dr6xAL7Jc9kjLy2oBp+X0a0cP+XVUVsmvwt5vS0t5l/5qpskR9Fn
MvpA0PFeQerUt83849AZ1PfMcqnQZz8ufjCfRixA8J3E7ztTkEZ4CnH90pAbve1W
LBi89ks4DigMJnTJzEbyucCQjqbNj+hbZju7nvPNYPiGTvtdqbjMGMLb+MPr0O9D
c+i2fPgBaysJrYXnLWTLMulE3yeq6M/cA8IEmYQ8tApIchQy8yklvaEjRTHyuI+A
c5VevIygXT0xZj+vJDvACpDRxvfOtWmPwlx8KOOVkKHSBD98BPObg4lf2BgrdOvM
gBe32NXWWK+/yWjNrd3a24f+a5NC6KEa1CZjMUh1mSt7JsvYU0tT4HTU8r2aGics
/t/vkyzAdxz7zzssEBSi0dS9bO738Bp8KTqwu6q4TVlrQsDT60hUJ3lPKTIf7omI
tg18UBONNHF4lpbgDjlk6ypIf9xjJmbwKHRDlWWY/yJmHATe2lghYvMus/TEHEin
/QusGjCKwmwSO85i1QmGRcn3Oqw97AYSkOLdwSd3dIDQMARQaLY=
=Qdek
-END PGP SIGNATURE-

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



Can Directory Listing and Welcome File List coexist?

2020-07-30 Thread Igal Sapir
Hello,

I have the following in web.xml:

  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
  - A default servlet from Tomcat, with init-param listings=true
  - A welcome-file of "index.cfm"

My expectation is that for a request to a given directory, if a file named
index.cfm exists then it would be passed to the Lucee servlet, and if not,
the Directory Listings will be displayed.

Instead, requests to a given directory are forwarded to Lucee, which return
a 404.

Is it possible to configure Tomcat so that it would check if the file
exists before matching the URI pattern of the welcome file?  This (as all
Directory Listings, I would hope) is for a Development setup so it's OK if
the check adds a few more microseconds to the request.

Thanks,

Igal


Re: After OS update from RHEL 6.3 to 6.10 seeing 503 error

2020-07-30 Thread Coty Sutherland
On Wed, Jul 29, 2020 at 4:41 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> Satish,
>
> On 7/29/20 2:56 PM, Satish Chhatpar 02 wrote:
> > After  OS update from RHEL 6.6  to 6.10, seeing 503 error.
> >
> > Need help to fix this.
> >
> >
> >
> > 
> > 503 Service Temporarily Unavailable
> > 
> > Service Temporarily Unavailable
> > The server is temporarily unable to service your
> > request due to maintenance downtime or capacity
> > problems. Please try again later.
> > Additionally, a 404 Not Found
> > error was encountered while trying to use an ErrorDocument to handle the
> request.
> > 
> >
> >
> > Tomcat version is 6.0.53
> >
> > mod_jk/1.2.37
> >
> >
> >
> > Server version: Apache/2.2.15 (Unix)
> > Server built:   Feb 19 2018 06:33:11
> > Server's Module Magic Number: 20051115:25
> > Server loaded:  APR 1.3.9, APR-Util 1.3.9
> > Compiled using: APR 1.3.9, APR-Util 1.3.9
> > Architecture:   64-bit
> > Server MPM: Prefork
> >   threaded: no
> > forked: yes (variable process count)
> > Server compiled with
> >  -D APACHE_MPM_DIR="server/mpm/prefork"
> >  -D APR_HAS_SENDFILE
> >  -D APR_HAS_MMAP
> >  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> >  -D APR_USE_SYSVSEM_SERIALIZE
> >  -D APR_USE_PTHREAD_SERIALIZE
> >  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> >  -D APR_HAS_OTHER_CHILD
> >  -D AP_HAVE_RELIABLE_PIPED_LOGS
> >  -D DYNAMIC_MODULE_LIMIT=128
> >  -D HTTPD_ROOT="/etc/httpd"
> >  -D SUEXEC_BIN="/usr/sbin/suexec"
> >  -D DEFAULT_PIDLOG="run/httpd.pid"
> >  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> >  -D DEFAULT_LOCKFILE="logs/accept.lock"
> >  -D DEFAULT_ERRORLOG="logs/error_log"
> >  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> >  -D SERVER_CONFIG_FILE="conf/httpd.conf"
> >
> >
> >
> > In access logs I  404
> >
> >   "GET /commerce/servlet/gben-OrderStatusWebService HTTP/1.1" 404 - 0
> "-" "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/45.0.2454.85 Safari/537.36"
> >
> >
> > In error log I see
> >
> > Response header name 'Cache/Control' contains invalid characters,
> aborting request
> >
> >
> >
> > in mod_jk log  I see
> >
> >
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (485): socket TCP_NODELAY set to On
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (522): socket SO_KEEPALIVE set to On
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (609): trying to connect socket 39 to
> 10.80.1.84:8901
> > [Wed Jul 29 19:24:31.877 2020] [912:139700310231008] [trace]
> nb_connect::jk_connect.c (227): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> nb_connect::jk_connect.c (273): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> jk_open_socket::jk_connect.c (635): socket 39 [172.16.133.13:46132 ->
> 10.80.1.84:8901] connected
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_open_socket::jk_connect.c (638): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> ajp_handle_cping_cpong::jk_ajp_common.c (880): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1178): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1184): sending to ajp13
> pos=4 len=5 max=16
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1184): 12 34 00
> 01 0A 00 00 00 00 00 00 00 00 00 00 00  - .4..
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_tcp_socket_sendfull::jk_connect.c (841): enter
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_tcp_socket_sendfull::jk_connect.c (871): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1212): exit
> > [Wed Jul 29 19:24:31.878 2020] [912:139700310231008] [trace]
> jk_is_input_event::jk_connect.c (986): enter
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> jk_is_input_event::jk_connect.c (1031): exit
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1245): enter
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> jk_tcp_socket_recvfull::jk_connect.c (892): enter
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> jk_tcp_socket_recvfull::jk_connect.c (921): exit
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> jk_tcp_socket_recvfull::jk_connect.c (892): enter
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [trace]
> jk_tcp_socket_recvfull::jk_connect.c (921): exit
> > [Wed Jul 29 19:24:31.880 2020] [912:139700310231008] [debug]
> ajp_connection_tcp_get_message::jk_ajp_common.c (1379): received from ajp13
> pos=0