Re: Apache Tomcat/9.0.52 - New Install has 2 Tomcat Services Running?

2021-09-20 Thread Mark Eggers

Terrence,

On 9/20/2021 11:49 AM, Terrence Rideau wrote:

I have a new Linux install of Apache Tomcat/9.0.52.   When I start Tomcat using 
"/bin/systemctl start tomcat" it starts with 2 Tomcat services.

My webapp runs but I have a issue importing and the application support team 
thinks it is related to my having 2 Tomcat Services.

How do I remove the 2nd Tomcat service or is this normal?

Terrence


I think that we'll need a lot more information before we can be helpful.

Things like:

1. What platform?
2. How did you install Tomcat?
3. How did you enable Tomcat with systemd / systemctl?
4. What's the content of /etc/systemd/system/multi-user.target.wants?

If this is a custom systemd script, then maybe post that with all 
secrets (passwords, etc.) replaced.


I have two types of systems that use systemd - CentOS 7 and Ubuntu 
20.04. I wrote my own systemctl script and installed Tomcat from 
tomcat.apache.org using the tar.gz file.


My script is sort of hackish, so I'm not really keen to share it. It's 
also different between CentOS 7 and Ubuntu due to the way positional 
parameters seem to be handled in Ubuntu vs. CentOS 7.


Or maybe it's my lack of understanding concerning systemd (more likely).

Anyway, start with that set of questions, and hopefully someone will be 
able to help out.


. . . just my two cents
/mde/



OpenPGP_signature
Description: OpenPGP digital signature


Apache Tomcat/9.0.52 - New Install has 2 Tomcat Services Running?

2021-09-20 Thread Terrence Rideau
I have a new Linux install of Apache Tomcat/9.0.52.   When I start Tomcat using 
"/bin/systemctl start tomcat" it starts with 2 Tomcat services.  

My webapp runs but I have a issue importing and the application support team 
thinks it is related to my having 2 Tomcat Services.

How do I remove the 2nd Tomcat service or is this normal?

Terrence  

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



Apache Tomcat/9.0.52 - New Install has 2 Tomcat Services Running?

2021-09-20 Thread Terrence Rideau
I have a new Linux install of Apache Tomcat/9.0.52.   When I start Tomcat using 
"/bin/systemctl start tomcat" it starts with 2 Tomcat services.  
My webapp runs with one error related to import and the application support 
team thinks it is related to my having 2 Tomcat Services.
How do I remove the 2nd Tomcat service or is this normal?
Terrence  

ApacheCon starts tomorrow!

2021-09-20 Thread Rich Bowen
ApacheCon @Home starts tomorrow! Details at 
https://www.apachecon.com/acah2021/index.html


(Note: You're receiving this because you are subscribed to one or more 
user lists for Apache Software Foundation projects.)


We've got three days of great content lined up for you, spanning 14 
project communities. And we're very excited about the keynotes, with 
presentations from David Nalley, Ashley Wolfe, Mark Cox, Alison Parker, 
and Michael Weinberg. And we'll be hearing from our Platinum sponsors in 
their keynotes as well! (Schedule is at 
https://www.apachecon.com/acah2021/tracks/)


You can still register today, at 
https://www.apachecon.com/acah2021/register.html


We especially want to thank our sponsors, who have made this event possible:

Strategic sponsor: Google
Platinum sponsors: Huawei, Tencent, Instaclustr, and Apple
Gold sponsors: AWS, Aiven, Gradle, Replicated, Red 
Hat, Baidu, Fiter, Cerner, Dremio, and Didi
Silver sponsors: Bamboo, SpereEx, Microsoft, Imply, Securonix, DataStax, 
and Crafter Software

Bronze sponsor: Technical Arts

Please join us on our Slack for discussion before, during, and after the 
event! http://s.apache.org/apachecon-slack


And follow us on Twitter - https://twitter.com/apachecon - for tips and 
announcements during the event.


See you tomorrow!


--
Rich Bowen, VP Conferences
The Apache Software Foundation
https://apachecon.com/
@apachecon

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



NIO write operation timeout with 8.5.x NioBlockingSelector

2021-09-20 Thread Mathias S
Hi all,

we are using tomcat-embed (Tomcat 8.5.70) in our product which also contains a 
custom NIO implementation.
So i think i cannot give you a configuration to reproduce the issue.

Anyway, i will explain in short what happens.
It is within the included BlockPoller class in the NioBlockingSelector.
Within the run method: (in 8.5.70 it is in line 376)

sk.interestOps(sk.interestOps() & (~sk.readyOps()));
if ( sk.isReadable() ) {
countDown(attachment.getReadLatch());
}
if (sk.isWritable()) {
countDown(attachment.getWriteLatch());
}

It may happen that after the interestOps are reset, another thread will set the 
writeable flag to false (within our custom NIO)
In that case the writeLatch will not be count down and the write operation is 
blocked until timeout.

>From my point of view is will be better this way:

- sk.interestOps(sk.interestOps() & (~sk.readyOps()));
if ( sk.isReadable() ) {
+sk.interestOps(sk.interestOps() & (~SelectionKey.OP_READ));
countDown(attachment.getReadLatch());
}
if (sk.isWritable()) {
+sk.interestOps(sk.interestOps() & (~SelectionKey.OP_WRITE));
countDown(attachment.getWriteLatch());
}

This should fix it for tomcat 8.5.x.
If i understand the SelectionKey java doc right, the writable flag may be 
updated by the selector during a selection operation.

What do you think about?

Kind regards,
Mathias



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