Re: how to block bad request?

2023-01-09 Thread Jason Wee
Hi Mark,

Thank you. I enabled debugging and able to reproduce (close to
matching, but not exact same output)

send null byte




$ echo -e '\x00' | nc myhost.com 80
HTTP/1.1 400
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1939
Date: Mon, 09 Jan 2023 08:58:52 GMT
Connection: close

HTTP Status 400 – Bad
Requestbody
{font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b
{color:white;background-color:#525D76;} h1 {font-size:22px;} h2
{font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a
{color:black;} .line
{height:1px;background-color:#525D76;border:none;}HTTP
Status 400 – Bad RequestType
Exception ReportMessage Invalid character found in
method name [0x00...]. HTTP method names must be
tokensDescription The server cannot or will not process
the request due to something that is perceived to be a client error
(e.g., malformed request syntax, invalid request message framing, or
deceptive request
routing).Exceptionjava.lang.IllegalArgumentException:
Invalid character found in method name [0x00...]. HTTP method names
must be tokens
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:418)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:260)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:845)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1563)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.basejava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.basejava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.basejava.lang.Thread.run(Thread.java:834)
Note The full stack trace of the root cause is
available in the server logs.CustomServer


the log file


09-Jan-2023 08:58:50.239 FINE [https-jsse-nio-8474-exec-3]
org.apache.coyote.AbstractProcessorLight.process Socket:
[org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@573dbc7:org.apache.tomcat.util.net.SecureNioChannel@304f418e:java.nio.channels.SocketChannel[connected
local=/142.222.222.222:8080 remote=/194.111.111.111:9385]], Status in:
[OPEN_READ], State out: [OPEN]
09-Jan-2023 08:58:52.867 FINE [http-nio-8084-exec-6]
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP
request header
java.lang.IllegalArgumentException: Invalid character found in method
name [0x00...]. HTTP method names must be tokens
at 
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:418)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:260)
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:845)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1563)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
09-Jan-2023 08:58:52.867 FINE [http-nio-8084-exec-6]
org.apache.coyote.http11.Http11Processor.badRequest The HTTP/1.1
request did not provide a host header
09-Jan-2023 08:58:52.868 FINE [http-nio-8084-exec-6]
org.apache.coyote.AbstractProcessorLight.process Socket:
[org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@19369f2d:org.apache.tomcat.util.net.NioChannel@34663eed:java.nio.channels.SocketChannel[connected
local=/142.222.222.222:8080 remote=/210.111.111.111:53328]], Status
in: [OPEN_READ], State out: [CLOSED]



==> .access_log.2023-01-09.txt <==
210.111.111.111 - 210.111.111.111 - - [09/Jan/2023:08:58:52 +] '-'
400 1939 '-' '-' 686 -



in production

206.189.134.129 - 206.189.134.129 - - [09/Jan/2023:06:11:06 +] '-'
400 - '-' '-' 0 -



The different is

%b - Bytes sent, excluding HTTP headers, or '-' if zero
%D - Time taken to process the request in microseconds


so I guess the attacker check if the port is opened without sending
any bytes and tomcat took 0 second to process.


Christopher,

no, X-Forwarded-For and %h values are not the same.

On Fri, Jan 6, 2023 at 6:30 AM Christopher Schultz
 wrote:
>
> Mark, Jason,
>
> On 1/4/23 09:07, Mark Thomas wrote:
> > On 04/01/2023 04:09, Jason Wee wrote:
> >> Hi,
> >>
> >> Happy new year everyone.
> >>
> >

how to block bad request?

2023-01-03 Thread Jason Wee
Hi,

Happy new year everyone.

Background of my production setup. Using tomcat 10 and in linux
environment, using the following accesslog valve

%a %{X-Forwarded-For}i %h %l %u %t '%r' %s %b '%{Referer}i'
'%{User-Agent}i' %D %S

api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:27:36 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:27:36 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:27:36 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:30:42 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:30:42 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:30:42 +0100] '-' 400 - '-' '-' 0 -
api.access_log.2022-12-20.txt:94.102.61.23 - 94.102.61.23 - -
[20/Dec/2022:01:30:42 +0100] '-' 400 - '-' '-' 0 -

I often see the above registered in accesslog and have the following questions

1. how/where to find more information about such requests? example how
to reproduce of such request, how to enable debug to give more details
about such request, etc?
2. how to block such requests (at tomcat or at firewall or any other way)?
3. what impact it has to tomcat (or service) if these requests come in
huge amounts and in a short time.

Thank you and happy to hear any other comments/opinions too.

Kind regards,
Jason

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



Re: Question about upgrade from Tomcat 7 to Tomcat 9.0.67

2022-10-05 Thread Jason Wee
i would normally do a diff between your current version and the next
tomcat version you want to upgrade to and go through the diff slowly.
it is better to be careful and note the changes than sorry later.

On Wed, Oct 5, 2022 at 9:17 PM Mark Thomas  wrote:
>
>
>
> On 05/10/2022 09:17, Terry ST SY/OGCIO wrote:
> > Hi ,
> >
> > we would like to upgrade Tomcat 7 to Tomcat 9.0.67.
> >
> > Check on the major changes on Tomcat 7 to Tomcat 9. (One of the major 
> > change we initially spotted is the BIO connector used in Tomcat 7 for 
> > connector setup was removed in Tomcat 9: 
> > https://tomcat.apache.org/migration-9.html#BIO_connector_removed)
> >
> > For your reference, Http11Protocol was used in Tomcat 7, but since Tomcat 9 
> > removed it, we tried to Http11NioProtocol with same parameters in the 
> > tomcat config in “conf/server.xml. Is it a proper method for migrate the 
> > BIO connector ( Tomcat 7 ) to NIO connector ( Tomcat 9 ) ?
>
> Generally, I'd recommend the following:
>
> 1. Review the server.xml you use for Tomcat 7 and note each deviation
> from the defaults
> 2. Start with the default server.xml for 9.0.x and for each of the
> additional/changed settings noted in step 1, determine if you still
> need to apply it in Tomcat 9.
>
> The HttpNioProtocol is the default in 9.0.x. Generally, the settings
> will translate from 7.0.x but you should still review them to ensure
> they remain appropriate for your environment.
>
> Mark
>
> -
> 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



Re: Tomcat unresponsive

2022-09-29 Thread Jason Wee
could be waiting for i/o or some others... what tomcat version ?

On Thu, Sep 29, 2022 at 5:57 PM Christoph Empl
 wrote:
>
> Hello,
>
> i’m facing a problem that my tomcat seems to become unresponsive if it’s 
> under a certain load.
>
> Most threads in threaddumps look like this:
>
>
> "https-jsse-nio-21030-exec-133" #13306 daemon prio=5 os_prio=0 cpu=17099.37ms 
> elapsed=897.51s tid=0x7f6270063b00 nid=0x1e5c38 in Object.wait()  
> [0x7f6109df4000]
>
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
>
> at java.lang.Object.wait(java.base@17.0.3/Native Method)
>
> - waiting on  available>
>
> at 
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1325)
>
> - locked <0x00050f48a720> (a 
> java.util.concurrent.Semaphore)
>
> at 
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1226)
>
> at 
> org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:805)
>
> at 
> org.apache.coyote.http11.Http11InputBuffer.access$400(Http11InputBuffer.java:42)
>
> at 
> org.apache.coyote.http11.Http11InputBuffer$SocketInputBuffer.doRead(Http11InputBuffer.java:1185)
>
> at 
> org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:151)
>
> at 
> org.apache.coyote.http11.Http11InputBuffer.endRequest(Http11InputBuffer.java:655)
>
> at 
> org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1192)
>
> at 
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:439)
>
> at 
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
>
> at 
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
>
> at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
>
> at 
> org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>
> - locked <0x00050f48a730> (a 
> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
>
> at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
>
> at 
> org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
>
> at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>
> at java.lang.Thread.run(java.base@17.0.3/Thread.java:833)
>
>
> I’m suspecting a slow network. Does anybody have another idea?
>
>
> Thanks, Christoph

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



Re: Regarding IPv6 support

2022-08-03 Thread Jason Wee
check if tomcat is listening on ipv6, using ss or netstat command.
need more details about your environment, how requests are pass to
container, etc...

On Wed, Aug 3, 2022 at 3:26 PM Nitish Chitta  wrote:
>
> I have done the required changes i.e added the IPv6 address to the
> connector that the server should listen on. Do I have to add any other
> property or am I missing something?
>
> On Wed, Aug 3, 2022 at 12:51 PM Jason Wee  wrote:
>
> > yes, it should, read here
> > https://tomcat.apache.org/tomcat-7.0-doc/config/http.html
> >
> > On Wed, Aug 3, 2022 at 3:19 PM Nitish Chitta 
> > wrote:
> > >
> > > Hello Team,
> > > I wanted to know if Tomcat 7 supports requests with IPv6 addresses in the
> > > URL as I am getting an HTTP 404 error when trying to hit the server with
> > an
> > > IPv6 address.
> > >
> > > Thanks & Regards,
> > > Nitish
> >
> > -
> > 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



Re: Regarding IPv6 support

2022-08-03 Thread Jason Wee
yes, it should, read here
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

On Wed, Aug 3, 2022 at 3:19 PM Nitish Chitta  wrote:
>
> Hello Team,
> I wanted to know if Tomcat 7 supports requests with IPv6 addresses in the
> URL as I am getting an HTTP 404 error when trying to hit the server with an
> IPv6 address.
>
> Thanks & Regards,
> Nitish

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



Re: Compile JSP pages dynamically using Tomcat 6.0.45

2022-06-13 Thread Jason Wee
yes, i think so, it is ecj that did the compilation not the jre/jdk...

max version u can go with tomcat6 is java8, see

} else if(opt.equals("1.7")) {
settings.put(CompilerOptions.OPTION_Source,
 CompilerOptions.VERSION_1_7);
} else if(opt.equals("1.8")) {
settings.put(CompilerOptions.OPTION_Source,
 "1.8"); // CompilerOptions.VERSION_1_8
} else {
log.warn("Unknown source VM " + opt + " ignored.");
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_5);
}

i suggest you really consider upgrade tomcat.

my path was tomcat6 - > tomcat8 -> tomcat10

On Mon, Jun 13, 2022 at 6:21 PM Pavan Kumar Tiruvaipati
 wrote:
>
> Hi,
>
> Does ecj 4.6.1 support jsp compilation without JDK ? We would like to
> replace JDK with JRE.
>
>
> Regards,
> Pavan
>
> On Mon, Jun 13, 2022 at 3:46 PM Jason Wee  wrote:
>
> > yes, i used to use tomcat version 6.0.29 then upgraded to 6.0.53
> > eventually jsp cannot compile to java 8 spec, so i have to upgrade ecj
> > to version 4.6.1 and using jdk8u74. But these were all I can recalled.
> >
> > hth
> >
> > On Mon, Jun 13, 2022 at 5:48 PM Pavan Kumar Tiruvaipati
> >  wrote:
> > >
> > > Hi,
> > >
> > > Our application is running on Tomcat 6.0.45.
> > >
> > >
> > > *Operation System* - Linux & Windows
> > >
> > > Due to security reasons, we are replacing JDK 1.8 with JRE 1.8.
> > >
> > > We understand that Tomcat is bundled with Eclipse JDT compiler -
> > > ecj-4.3.1.jar.
> > >
> > > It will take care of dynamic compilation of JSP pages (Correct me if I'm
> > > wrong)
> > >
> > > But It's unable to recompile JSP pages without JDK.
> > >
> > >
> > > Does Tomcat 6.0.45 or any higher version require JDK to compile JSP
> > pages ?
> > >
> > > Please let us know if you need any more information.
> > >
> > >
> > > Regards,
> > >
> > > Pavan
> >
> > -
> > 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



Re: Compile JSP pages dynamically using Tomcat 6.0.45

2022-06-13 Thread Jason Wee
yes, i used to use tomcat version 6.0.29 then upgraded to 6.0.53
eventually jsp cannot compile to java 8 spec, so i have to upgrade ecj
to version 4.6.1 and using jdk8u74. But these were all I can recalled.

hth

On Mon, Jun 13, 2022 at 5:48 PM Pavan Kumar Tiruvaipati
 wrote:
>
> Hi,
>
> Our application is running on Tomcat 6.0.45.
>
>
> *Operation System* - Linux & Windows
>
> Due to security reasons, we are replacing JDK 1.8 with JRE 1.8.
>
> We understand that Tomcat is bundled with Eclipse JDT compiler -
> ecj-4.3.1.jar.
>
> It will take care of dynamic compilation of JSP pages (Correct me if I'm
> wrong)
>
> But It's unable to recompile JSP pages without JDK.
>
>
> Does Tomcat 6.0.45 or any higher version require JDK to compile JSP pages ?
>
> Please let us know if you need any more information.
>
>
> Regards,
>
> Pavan

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



Re: Upgrade tomcat 7 to 10.

2022-05-26 Thread Jason Wee
As what Christopher Schultz mentioned, "including switching package
names", i.e. from javax to jakarta.. when I did the webapp migration
to tomcat 10, I had to make all the libraries to reference jakarta
though, including taglib-mailer, jsp  and so on.

hth

Jason

On Fri, May 27, 2022 at 8:53 AM Rodrigo Cunha  wrote:
>
> >
> > I suspect you should be able to upgrade your Tomcat from 7 to 10 in one
> > shot, but you might want to go from 7->9 and wait a little on 10.
> >
> Yes, it is! but not in a production environment. I want to upgrade in only
> one shot.
>
> On Thu, May 26, 2022 at 8:32 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > Rodrigo,
> >
> > On 5/26/22 17:16, Rodrigo Cunha wrote:
> > > i need upgrade my tomcat server from 7 to 10. I don't saw in internet
> > > nothing about that. Commonly i upgraded in steps, 7 to 8, 8 to 9 and 9 to
> > > 10.
> > > Are there a problem upgrade from 7 to 10?
> >
> > I suspect you should be able to upgrade your Tomcat from 7 to 10 in one
> > shot, but you might want to go from 7->9 and wait a little on 10.
> >
> > Why?
> >
> > Tomcat 10 is significantly different because it implements a new version
> > of the servlet and related specifications, including switching package
> > names, etc. There *is* an automated conversion tool that can be used at
> > deployment-time to convert your pre-Jakarta-EE application to a
> > Jakarta-EE application, but you might not want to trust it immediately
> > in production without a whole lot of testing. So I recommend Tomcat 9 at
> > first.
> >
> > YMMV
> >
> > Something that is critically important is that, when upgrading, you
> > don't even try to re-use the existing server.xml file you have for your
> > Tomcat 7 installation. Instead, look at the differences between your
> > current server.xml file and an unmodified one from the original
> > distribution of Tomcat 7, and make some notes. Then, make similar
> > changes to the original server.xml file from the new Tomcat.
> >
> > -chris
> >
>
>
> --
> Atenciosamente,
> Rodrigo da Silva Cunha
> São Gonçalo, RJ - Brasil

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



Re: tomcat 9.50 - rewrite rule question

2022-03-19 Thread Jason Wee
have you try?

RewriteRule ^/apex/f?p=1001  /apex/myapp [R,L]

On Sat, Mar 19, 2022 at 2:05 PM rupali singh  wrote:
>
> Hi Team,
>
> We are using tomcat 9.54 version.
> Need help in rewriting rule.
>
> background   : We have an Oracle apex server ( version 21.1)  and tomcat is
> installed on the same server. We have F5 url which redirects to apex
> installed on tomcat  eg https://xyz.ae/apex/f?p=1001
>    so xyz.ae is published on our F5 which
> redirects internally to tomcat server on port 8080.
>
> we want to redirect  https://xyz.ae/apex/f?p=1001
>    to
>  https://xyz.ae/apex/myapp    as it's difficult
> for business users to remember f?p=1001 
>
> i have prepared context.xml and rewrite.config rule but redirection not
> working and there is no error in catalina.log
>
> in access log we are getting 404.
>
> i have tried steps mentioned in
> https://stackoverflow.com/questions/38618473/tomcat-9-rewrite-with-ords-and-oracle-apex
>
> rewrite.config content
>
> RewriteCond %{REQUEST_URI} ^/myapp$
> RewriteRule ^/myapp$ https://xyz.ae/apex/myapp [R,L]
>
>
> please advise how to resolve the issue
> --
> Thanks and Regards,
> Rupali

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



Re: javax.servlet vs jakarta.servlet?

2021-12-27 Thread Jason Wee
yeap, also take note libs that depend on the new namespace and taglibs

On Tue, Dec 28, 2021 at 8:35 AM Michael B Allen  wrote:
>
> Hello Tomcat Users,
>
> Does anyone have a sense of how many people are using the jakarta.servlet API?
>
> I have a product that includes some classes that use javax.servlet and
> I'm trying to figure out how to support people who want to use
> jakarta.servlet. I plan to install Tomcat 10 momentarily but I assume
> one just has to add whatever javax.servlet jar to make Tomcat 10 work
> with a javax.servlet lib or app?
>
> Mike
>
> --
> Michael B Allen
> Java Active Directory Integration
> http://www.ioplex.com/
>
> -
> 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



Re: tomcat hangs

2021-09-09 Thread Jason Wee
must be the problem of your webapp... show all webapp codes?

On Thu, Sep 9, 2021 at 6:51 PM Mehrdad Taagholi
 wrote:
>
> HiI use apache tomcat 8.0.32 and oracle-jdk-8u66 and redhat 6.After working 
> with the system for a few hours and the load on the system increases, 
> suddenly the tomcat hangs and no logs are printed and it is not possible to 
> connect via jvisualvm and I can not get any dump and I have to reload 
> Tomcat.I have increased maxthreads and use the HttpProtocol protocol.Please 
> suggest a way to fix the my tomact.

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



Re: java.lang.ClassNotFoundException: javax.servlet.Filter

2021-02-15 Thread Jason Wee
No problem, just wanna understand better if this will tackle in the near future.

On another note, I did custom patch on one of the lib,
https://github.com/jasonwee/jakarta-taglibs-mailer for my own usage.

I guess I will do the same for this lib if I found time. If you want a
custom or specific patch, please also let me know so I can contribute
back to the tomcat community.

Thank.

Jason

On Mon, Feb 15, 2021 at 11:35 PM Woonsan Ko  wrote:
>
> On Mon, Feb 15, 2021 at 7:19 AM Jason Wee  wrote:
> >
> > okay, currently there is no custom application code, I just build two
> > of the libs and place into tomcat lib using the tomcat documentation.
> >
> > Do you mean I have to change the reference? Example
> > https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
> > ?
>
> It should be your decision. ;-)
> Please see the linked page from the download page:
> - https://tomcat.apache.org/whichversion.html
>
> For example, I think you may stick with Tomcat 9, or you may ask or
> help the libraries to be compatible with Jakarta EE in their own
> communities.
> It is up to you.
>
> Regards,
> Woonsan
>
> >
> > Jason
> >
> > On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas  wrote:
> > >
> > > On 15/02/2021 08:26, Jason Wee wrote:
> > > > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib 
> > > > directory
> > > >
> > > > tomcat-cxf-3.4.1.jar
> > > > tomcat-owb-2.0.20.jar
> > > >
> > > > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> > > >
> > > > and when i start tomcat, I get the following exception
> > >
> > > Quoting from the top of the Tomcat 10 download page:
> > >
> > > "Users of Tomcat 10 onwards should be aware that, as a result of the
> > > move from Java EE to Jakarta EE as part of the transfer of Java EE to
> > > the Eclipse Foundation, the primary package for all implemented APIs has
> > > changed from javax.* to jakarta.*. This will almost certainly require
> > > code changes to enable applications to migrate from Tomcat 9 and earlier
> > > to Tomcat 10 and later. A migration tool is under development to aid
> > > this process."
> > >
> > > https://tomcat.apache.org/download-10.cgi
> > >
> > > Mark
> > >
> > >
> > > >
> > > > ==> localhost.2021-02-15.log <==
> > > > 15-Feb-2021 16:19:04.700 INFO [main]
> > > > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > > > [ApacheTomcatCXFServlet] as unavailable
> > > > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > > > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > > > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > > > exception
> > > > java.lang.ClassNotFoundException: javax.servlet.Filter
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > > at 
> > > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > > > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > > > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > > > at 
> > > > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > > > at 
> > > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > &

Re: java.lang.ClassNotFoundException: javax.servlet.Filter

2021-02-15 Thread Jason Wee
okay, currently there is no custom application code, I just build two
of the libs and place into tomcat lib using the tomcat documentation.

Do you mean I have to change the reference? Example
https://github.com/apache/openwebbeans/blob/master/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationListener.java#L36
?

Jason

On Mon, Feb 15, 2021 at 6:19 PM Mark Thomas  wrote:
>
> On 15/02/2021 08:26, Jason Wee wrote:
> > Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory
> >
> > tomcat-cxf-3.4.1.jar
> > tomcat-owb-2.0.20.jar
> >
> > reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html
> >
> > and when i start tomcat, I get the following exception
>
> Quoting from the top of the Tomcat 10 download page:
>
> "Users of Tomcat 10 onwards should be aware that, as a result of the
> move from Java EE to Jakarta EE as part of the transfer of Java EE to
> the Eclipse Foundation, the primary package for all implemented APIs has
> changed from javax.* to jakarta.*. This will almost certainly require
> code changes to enable applications to migrate from Tomcat 9 and earlier
> to Tomcat 10 and later. A migration tool is under development to aid
> this process."
>
> https://tomcat.apache.org/download-10.cgi
>
> Mark
>
>
> >
> > ==> localhost.2021-02-15.log <==
> > 15-Feb-2021 16:19:04.700 INFO [main]
> > org.apache.catalina.core.ApplicationContext.log Marking servlet
> > [ApacheTomcatCXFServlet] as unavailable
> > 15-Feb-2021 16:19:04.700 SEVERE [main]
> > org.apache.catalina.core.StandardContext.loadOnStartup Servlet
> > [ApacheTomcatCXFServlet] in web application [/rest] threw load()
> > exception
> > java.lang.ClassNotFoundException: javax.servlet.Filter
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at 
> > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at 
> > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> > at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
> > at 
> > java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> > at 
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
> > at 
> > org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
> > at 
> > org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
> > at 
> > org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
> > at 
> > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
> > at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
> > at 
> > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)

java.lang.ClassNotFoundException: javax.servlet.Filter

2021-02-15 Thread Jason Wee
Using Apache Tomcat 10.0.2, build owb and cxf and placed into lib directory

tomcat-cxf-3.4.1.jar
tomcat-owb-2.0.20.jar

reading reference,  https://tomcat.apache.org/tomcat-10.0-doc/cdi.html

and when i start tomcat, I get the following exception

==> localhost.2021-02-15.log <==
15-Feb-2021 16:19:04.700 INFO [main]
org.apache.catalina.core.ApplicationContext.log Marking servlet
[ApacheTomcatCXFServlet] as unavailable
15-Feb-2021 16:19:04.700 SEVERE [main]
org.apache.catalina.core.StandardContext.loadOnStartup Servlet
[ApacheTomcatCXFServlet] in web application [/rest] threw load()
exception
java.lang.ClassNotFoundException: javax.servlet.Filter
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at 
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at 
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at 
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2433)
at 
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:864)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at 
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187)
at 
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
at 
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
at 
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1043)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:984)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4851)
at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5160)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1093)
at 
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1810)
at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at 
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at 
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1013)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at 
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at 

owb and cxf module should include in the release source package

2021-02-08 Thread Jason Wee
Reading https://tomcat.apache.org/tomcat-10.0-doc/cdi.html ,

```
cd $TOMCAT_SRC/modules/owb
mvn clean && mvn package
```

this is not included in the release source package but can only be
found https://github.com/apache/tomcat/tree/master/modules , is this
intentional or the documentation need to specify that to reference owb
and cxf module at github instead?

Jason

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



Re: tomcat http error code 502

2020-10-25 Thread Jason Wee
Thanks Chris, I took a look at tomcat codebase, I cannot pinpoint too
where is the code that actually logs error 502 to accesslog too.

> 1. Any proxy or load-balancer you have between the client and the Tomcat node
> 2. Any application deployed on that Tomcat node that may be returning a 502 
> response
thanks, this is helpful, I have checked my codebase, the 502 that
client receives would probably be at client proxy.

Jason

On Thu, Oct 22, 2020 at 9:44 PM Christopher Schultz
 wrote:
>
> Jason,
>
> On 10/22/20 01:36, Jason Wee wrote:
> > using tomcat 8.5.42 and have the following questions
> >
> > * will tomcat log http error 502 in accesslog?
>
> I don't see why not.
>
> > * under what situation will tomcat return 502?
>
> I do not see any code in Tomcat which responds with SC_BAD_GATEWAY (or
> 502 without using the constant).
>
> If you are seeing thism, I would first investigate:
>
> 1. Any proxy or load-balancer you have between the client and the Tomcat
> node
> 2. Any application deployed on that Tomcat node that may be returning a
> 502 response
>
> -chris
>
> -
> 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



tomcat http error code 502

2020-10-21 Thread Jason Wee
Hi,

using tomcat 8.5.42 and have the following questions

* will tomcat log http error 502 in accesslog?

* under what situation will tomcat return 502?

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



Re: Issue found during migration of Tomcat version 6.0.35 to 8.5.5

2020-06-15 Thread Jason Wee
guess looks like jar not found, full stacktrace would be helpful.

On Mon, Jun 15, 2020 at 8:17 PM Lavitesh Verma 
wrote:

> Hi Team,
>
>
>
> Below are the details of the system and tomcat version
>
> Old tomcat version: *Apache Tomcat/6.0.35*
>
> New tomcat version: *Apache Tomcat/8.5.5*
>
> Operating System: *SunOS *
>
> OS Version: *5.10*
>
> Architecture: *sparcv9*
>
> JVM Version: *1.8.0_101-b13*
>
> Vendor: *Oracle Corporation*
>
>
>
> We are trying to migrate Apache Tomcat version 6.0.35 to 8.5.5.
>
>
>
> We found the issue javax.xml.stream.FactoryConfigurationError: Provider
> com.ctc.wstx.stax.WstxInputFactory not found in localhost logs.
>
>
>
>
>
> Could you please assist on how we could resolve the issue.
>
>
>
> Thanks & Regards
>
> *Lavitesh Verma*
>
> Software Engineering Associate
>
> Amdocs Global SmartOps
>
> [image: download12]+91.9810157771
>
> *OOO – 06/16 – 06/19*
>
> [image: cid:image001.jpg@01D2912B.17505E90]
>
>
>
> *This email and the information contained herein is proprietary and
> confidential and subject to the Amdocs Email Terms of Service, which you
> may review at* *https://www.amdocs.com/about/email-terms-of-service*
> 
>


Re: OpenSSL config for Tomcat 7

2020-02-28 Thread Jason Wee
when you stack them, do you mean you cat those certificates into one pem file?

On Sat, Feb 29, 2020 at 8:22 AM John Beaulaurier -X (jbeaulau -
ADVANCED NETWORK INFORMATION INC at Cisco)
 wrote:
>
> Hello,
>
> We're running Tomcat 7 and need to implement SSL. We are using APR/OpenSSL, 
> but I can't get the intermediate certificates pulled in when starting Tomcat. 
> The
> server certificate is recognized and used but not the other two. I have tried 
> the following in PEM format.
>
>
>   *   Stacking them in one file and using the "SSLCertificateFile" directive
>   *   Using the "SSLCertificateFile" directive for the server cert, and 
> "SSLCertificateChainFile" directive for the CA and root cert
>
>
>  *   APR 1.4.8
>  *   Tomcat 7.0.39
>
> Any additional information needed please let me know. Any insight would be 
> greatly appreciated.
>
> Regards
> -John
>
>

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



Re: Unable to start tomcat

2020-02-25 Thread Jason Wee
have you try google?
https://stackoverflow.com/questions/4415175/an-operation-on-a-socket-could-not-be-performed-because-the-system-lacked-suffi

On Wed, Feb 26, 2020 at 2:47 PM  wrote:
>
> Dear Jason,
>
> Thank for your reply. I am unable to understand below hint. Will you
> please help me out. What action should I take to start my tomcat. And how
> I can see my buffer space or queue size.
>
> --
> This looks informative and should give u hint and where you should
> begin troubleshooting.
>
> org.apache.tomcat.jni.Error: 730055: An operation on a socket could not
> be performed because the system lacked sufficient buffer space or because
> a queue was full.
>
> On Wed, Feb 26, 2020 at 2:30 PM  wrote:
> >
> > Dear Team
> >
> > I have updated JRE from jre1.8.0_25 to jre1.8.0_211 on my window server
> > 2012. and My tomcat version is apache-tomcat-8.0.41.
> > It was running fine last 6 hours but now I am getting error while
> stating
> > the tomcat
> >
> > 26-Feb-2020 11:22:23.600 SEVERE [main]
> > org.apache.tomcat.util.net.AprEndpoint.allocatePoller Poller creation
> > failed
> >  org.apache.tomcat.jni.Error: 730055: An operation on a socket could not
> > be performed because the system lacked sufficient buffer space or
> because
> > a queue was full.
> > at org.apache.tomcat.jni.Poll.create(Native Method)
> > at
> >
> org.apache.tomcat.util.net.AprEndpoint.allocatePoller(AprEndpoint.java:881)
> > at
> >
> org.apache.tomcat.util.net.AprEndpoint$Poller.init(AprEndpoint.java:1431)
> > at
> >
> org.apache.tomcat.util.net.AprEndpoint.startInternal(AprEndpoint.java:707)
> > at
> >
> org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:828)
> > at
> > org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:491)
> > at
> >
> org.apache.catalina.connector.Connector.startInternal(Connector.java:986)
> > at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> > at
> >
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:459)
> > at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> > at
> >
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
> > at
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:483)
> > at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
> > at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
> >
> > Please suggest .
> >
> > Thanks & Regards
> > Deepak Kumar
> > CCIL - IT
> > 022-61546230
> > CIN of CCIL- U65990MH2001PLC131804
> > "Disclaimer and confidentiality clause -
> >  This message and any attachments relating to official business of CCIL
> OR ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the
> original addressee only.
> > The message may contain information that is confidential and subject to
> legal privilege.
> > Any views expressed in this message are those of the individual sender.
> > If you have received this message in error, please notify the original
> sender immediately and destroy the message and copies thereof and any
> attachments contained in it .
> >  If you are not the intended recipient of this message, you are hereby
> notified that you must not disseminate, copy, use, distribute, or take any
> action in connection therewith.
> >  CCIL cannot ensure that the integrity of this communication has been
> maintained nor that it is free of errors, viruses, interception and/or
> interference.
> > CCIL is not liable whatsoever for loss or damage resulting from the
> opening of this message and/or attachments and/or the use of the
> information contained in this message and/or attachments."
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
> "Disclaimer and confidentiality clause -
>  This message and any attachments relating to official business of CCIL OR 
> ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original 
> addressee only.
> The message may contain information that is confidential and subject to legal 
> privilege.
> Any views expressed in this message are those of the individual sender.
> If you have received this message in error, please notify the original sender 
> immediately and destroy the message and copies thereof and any attachments 
> contained in it .
>  If you 

Re: Unable to start tomcat

2020-02-25 Thread Jason Wee
This looks informative and should give u hint and where you should
begin troubleshooting.

org.apache.tomcat.jni.Error: 730055: An operation on a socket could not
be performed because the system lacked sufficient buffer space or because
a queue was full.

On Wed, Feb 26, 2020 at 2:30 PM  wrote:
>
> Dear Team
>
> I have updated JRE from jre1.8.0_25 to jre1.8.0_211 on my window server
> 2012. and My tomcat version is apache-tomcat-8.0.41.
> It was running fine last 6 hours but now I am getting error while stating
> the tomcat
>
> 26-Feb-2020 11:22:23.600 SEVERE [main]
> org.apache.tomcat.util.net.AprEndpoint.allocatePoller Poller creation
> failed
>  org.apache.tomcat.jni.Error: 730055: An operation on a socket could not
> be performed because the system lacked sufficient buffer space or because
> a queue was full.
> at org.apache.tomcat.jni.Poll.create(Native Method)
> at
> org.apache.tomcat.util.net.AprEndpoint.allocatePoller(AprEndpoint.java:881)
> at
> org.apache.tomcat.util.net.AprEndpoint$Poller.init(AprEndpoint.java:1431)
> at
> org.apache.tomcat.util.net.AprEndpoint.startInternal(AprEndpoint.java:707)
> at
> org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:828)
> at
> org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:491)
> at
> org.apache.catalina.connector.Connector.startInternal(Connector.java:986)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:459)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
> at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)
>
> Please suggest .
>
> Thanks & Regards
> Deepak Kumar
> CCIL - IT
> 022-61546230
> CIN of CCIL- U65990MH2001PLC131804
> "Disclaimer and confidentiality clause -
>  This message and any attachments relating to official business of CCIL OR 
> ANY OF IT'S SUBSIDIARIES is proprietary to CCIL and intended for the original 
> addressee only.
> The message may contain information that is confidential and subject to legal 
> privilege.
> Any views expressed in this message are those of the individual sender.
> If you have received this message in error, please notify the original sender 
> immediately and destroy the message and copies thereof and any attachments 
> contained in it .
>  If you are not the intended recipient of this message, you are hereby 
> notified that you must not disseminate, copy, use, distribute, or take any 
> action in connection therewith.
>  CCIL cannot ensure that the integrity of this communication has been 
> maintained nor that it is free of errors, viruses, interception and/or 
> interference.
> CCIL is not liable whatsoever for loss or damage resulting from the opening 
> of this message and/or attachments and/or the use of the information 
> contained in this message and/or attachments."

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



org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun

2019-08-06 Thread Jason Wee
Hi,

we are using tomcat version 8.5.20 and we encounter the following exceptions

24-Jul-2019 23:24:45.398 SEVERE [https-jsse-nio-8443-exec-104]
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
 java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:244)
at 
org.apache.tomcat.util.net.TLSClientHelloExtractor.skipBytes(TLSClientHelloExtractor.java:221)
at 
org.apache.tomcat.util.net.TLSClientHelloExtractor.(TLSClientHelloExtractor.java:118)
at 
org.apache.tomcat.util.net.SecureNioChannel.processSNI(SecureNioChannel.java:276)
at 
org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:174)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

and it happened a lot of times in a day everyday. However, when
upgrade tomcat to version 8.5.43 (current latest), the exception no
longer happened.

We would like to understand better which patch that fix the problem
above. Can anyone give links to the fixes?

Thank you and apache tomcat is a great product!

Jason

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



Re: Does Tomcat server printout System.out.print infor?

2019-05-11 Thread Jason Wee
default tomcat , when you print, logging should goes to catalina.out.
In any case, check logging.properties in tomcat directory on where the
logging configured.

as for realm, it can be configure in the context element, which mean
in the META-INF/context.xml, see
https://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html#Configuring_a_Realm

On Sun, May 12, 2019 at 10:40 AM Karen Goh  wrote:
>
> Hello experts,
>
> Currently, I am uploading a new .war file up to my hosting company.
>
> However, I am puzzled how things work and would like to check what is the 
> norm out there.
>
> They are using httpd apache server and tomcat.
>
> Basically, I have subscribed a private Tomcat server so I get an instance of 
> Tomcat server - 8.0.27.
>
> But, the re-start of server is not in my control.
>
> I would like to know if this is the normal environment in a web hosting 
> company ?
>
> Another thing is that, in my newly uploaded war file, I don't get to see any 
> System.out.println infor in my code, which I believe it should be printed 
> out, as per my last log file indication in the web hosting company.
>
> What they told me is
> "Only if there is system level operation. For example, unloading/reloading a 
> war file would have logged."
>
> So, please help me know if it is not possible to see system.out.print infor 
> as what I have put in the code in my java class ?
>
> Another thing is that I am going to put in the Tomcat Realm for the log-in 
> module and I am wondering where is the privacy since I do not have the full 
> control over Tomcat in this web hosting environment ?
>
> Thanks & regards,
> Karen
>
>
> -
> 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



Re: ecj-4.6.3 no longer required?

2019-03-26 Thread Jason Wee
which 8.5.x u were referring? i just checked 8.5.39 has ecj in lib directory.

On Wed, Mar 27, 2019 at 1:58 AM David Cleary  wrote:
>
> I'm current updating our server that is based on Tomcat 8.5.x and found that 
> ecj-4.6.3.jar is no longer in the distribution. The changelog does not note 
> that it has been removed. I just want to confirm that I should remove this 
> library as part of the Tomcat update.
>
> Thanks
> Dave

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