Re: [External] Re: Problems deploying new .war application on Linux

2022-03-14 Thread Greg Huber

I’ve tried renaming the war file as ‘sru.war’ and placing it in webapps,
removing other references to ‘sru’ in the configuration.


I use ROOT.war and have no  stuff, just copy it into the 
webapps folder and use http://127.0.0.1:8080/ ie the default root app.


Does it explode the war file?

On 14/03/2022 14:44, Scott,Tim wrote:

From: Greg Huber 
Sent: Monday, March 14, 2022 2:23 PM
To: Tomcat Users List users@tomcat.apache.org<mailto:users@tomcat.apache.org>
Subject: [External] Re: Problems deploying new .war application on Linux
On the sever where did tomcat come from? a rpm?
Maybe as a test, download tomcat from tomcat.apache.org and see if it

makes a difference.

I always get my tomcats from tomcat.apache.org

.



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



Re: Problems deploying new .war application on Linux

2022-03-14 Thread Greg Huber

On the sever where did tomcat come from? a rpm?

Maybe as a test, download tomcat from tomcat.apache.org and see if it 
makes a difference.


On 14/03/2022 10:16, Scott,Tim wrote:

Hi all,

I’m struggling with this and am obviously not running into the right terms to 
Google.

I’ve put together a new application and got it working nicely through IntelliJ 
with Tomcat 9.0.59 on my PC but as we’re not going to ship my machine (and 
IntelliJ license!), I need it to run elsewhere.

I’ve subsequently found that it runs in the Tomcat on my PC without being 
launched by IntelliJ, so my focus was on what the difference in config might 
be. I’m using Tomcat 9.0.59 on my PC and on the Linux servers I’ve tried this 
on, although they were 9.0.34, 9.0.45, … now they’re 9.0.59.

I’m using Corretto JDK 11.0.14.1 on my PC. My first Linux (RHEL 7) machine was 
using Corretto 11.0.11.9 and is now 11.0.14.10.

I placed the .war file, named ‘sru.war’ into a webapps folders on a stopped 
Windows 2016 Tomcat 9.0.54 / Corretto 11.0.7.10 system and it worked first time 
– even after forgetting to remove the other .war for an older application.

Everything I’ve tried thus far on Linux has resulted in an http/404 (not 
deployed at all!) or http/500 response with:

javax.servlet.ServletException: Servlet.init() for servlet 
[org.oclc.olib.sru.SRUApplication] threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
…



Root Cause



java.lang.IllegalStateException: The resource configuration is not modifiable 
in this context.

  
org.glassfish.jersey.server.ResourceConfig$ImmutableState.register(ResourceConfig.java:248)

  
org.glassfish.jersey.server.ResourceConfig$ImmutableState.register(ResourceConfig.java:195)
…

These are paired with other errors:

java.lang.IllegalStateException: No valid CDI implementation found
 at 
javax.enterprise.inject.se.SeContainerInitializer.findSeContainerInitializer(SeContainerInitializer.java:106)
 at 
javax.enterprise.inject.se.SeContainerInitializer.newInstance(SeContainerInitializer.java:97)
 at 
org.glassfish.jersey.inject.cdi.se.CdiSeInjectionManager.completeRegistration(CdiSeInjectionManager.java:239)

The WEB-INF/lib folder contains “cdi-api-2.0.SP1.jar”.

I’ve been going down the rabbit hole of config tweaking by setting up and removing 
 entries in the server.xml and/or context.xml:
e.g. 

I’ve tried renaming the war file as ‘sru.war’ and placing it in webapps, 
removing other references to ‘sru’ in the configuration.

I think I’ve exhausted all possibilities of there being a duplicate ‘/sru’ 
context somehow, as many discussions indicate could be the cause. I haven’t 
explored the application itself to see if that is causing this problem – as the 
application works in one place with as close a configuration as I can get.

Annoyingly, I only need Linux for development and QA testing. It will be only 
deployed on Windows 2016 in phase 1 (and may never reach phase 2).

Any ideas where I should tweak next?

Thank you,
Tim

In case it helps, my immediate dependencies are summarised below. They mostly 
result from IntelliJ’s “create a new REST project”.

   *   javax.servlet:javax.servlet-api:4.0.1
   *   org.glassfish.jersey.containers:jersey-container-servlet:2.34
   *   org.glassfish.jersey.media:jersey-media-json-jackson:2.34
   *   org.glassfish.jersey.inject:jersey-cdi2-se:2.34
   *   org.glassfish.jersey.bundles:jaxrs-ri:2.13
   *   org.jboss.weld.se:weld-se-core:4.0.3.Final
   *   org.junit.jupiter:junit-jupiter-api:5.8.1
   *   org.junit.jupiter:junit-jupiter-engine:5.8.1
   *   javax.enterprise:cdi-api:2.0.SP1
   *   ch.qos.logback:logback-classic:1.2.10
   *   com.oracle.ojdbc:ojdbc8:19.3.0.0
   *   uk.org.lidalia:jul-to-slf4j-config:1.0.0
   *   org.slf4j:jul-to-slf4j:1.7.36
   *   org.eclipse.persistence:jakarta.persistence:2.2.3

--
Tim Scott
OCLC · Senior Software Engineer / Technical Product Manager

cc: IT file



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



Re: Configure Tomcat development using NetBeans IDE

2022-02-23 Thread Greg Huber

There have been lots of emails on this, sorry if I have missed something..

Although I don't use net beans, I use Eclipse with the venerable Sysdeo 
Tomcat Plugin (modified), and from my experience set reloadable = 
"false".  I would stop and restart tomcat for method signature changes, 
new classes etc.  It's quick and stops reload issues.


You should not need to reload tomcat for code unless, net beans cannot 
handle hot reload.



On 22/02/2022 17:59, John Barrow wrote:

Hi,

Firstly, this is actually a continuation of a previous thread
(specifically the email from Make Thomas, dated 21/02/2022 08:10)
discussing the specification for enhancing the reloading of webapps
after changes to the deployed files. This thread is titled ‘ is too quick to respond’ and remains active with
outstanding discussion points. However, in order to try and implement
the suggested changes, I needed to create a development environment
and so the thread quickly shifted into a bunch of configuration issues
which took the thread off topic.

Secondly, this email is quite long as I wanted to describe the steps I
took to get to where I am now (briefly, nearly there, just can't fully
test, unless all of them!). I have also included some suggestions for
alterations to the NetBeans configuration files that I am happy to
commit back to git if my understanding is correct./ deductions are
correct although one of them appears to be an issue with the ant build
and I am not confident enough to research this.

There are a couple of attachments that, as before, I have placed in my
shared Dropbox folder, accessed from

https://www.dropbox.com/sh/2ewipogzr48qcxi/AAAf3Rqv6WoRO9hyMC0W7P2za?dl=0

Mark, your insightful email has proved invaluable and having spent a
couple of days working through this, it has provided the catalyst for
me to be able to start joining the dots to achieving a full
development environment.

So, responding to each of your suggestions has taken me on a massive
learning curve, but

Firstly, I started back with a blank piece of paper.


If your eventual aim is to provide a pull request to address this issue then 
I'd recommend:
  - Fork the Tomcat project in GitHub
  - Checkout your clone

As a life-long supporter of Subversion, this was my first foray into
the world of git, but I believe, after a quick crash course, I have
managed to have forked and cloned Tomcat onto my laptop!


This is where using a clone would speed things up as you'd be able to fetch the 
update from Git.

Therefore, you can now assume that I can speed things up :)

I have built Tomcat using Ant.

Ran the amended 'ant ide-netbeans' script (checked GitHub to see what
changes had been made - the details of this change log request turned
out to be very useful later!)


Hmm. You shouldn't see any warnings about modules. A handful of warnings about 
deprecation are expected. If you still see these warnings then yes, please 
provide a copy so we can take a look.

Launched NetBeans and did a clean > deploy. The results are in my
shared DropBox folder (along with everything else) called "Ant Clean
and Build from Netbeans.txt" and it did actually look to have done a
successful build if you believe the summary line! While I did get
warnings about deprecated features as expected, I also had quite a
number of other warnings that looked a bit concerning (which you asked
me to submit to you)

e.g. - WARN aQute.bnd.plugin.jpms.JPMSModuleInfoPlugin - Can't find a
module name for imported package: jakarta.websocket

At this point, I still had a lot of red [!] against the Tests folder,
just as before and so the version amendment for jUnit didn't appear to
work, although I verified that it is the latest jUnit v4 build from
Mavens repository. As an aside, as I am sure you are aware, NetBeans
didn't support any later versions of jUnit using the Ant framework as
they believe that no-one should be using Ant anymore and should
migrate to Maven / Gradle!

So, rather than push back immediately, I thought I would spend some
time yesterday trying to figure it out, given that you had (by your
change) hinted which of the files might be related to my issue. Also,
your reference to tomcat\res\ide-support\netbeans\README.txt was
enlightening!

Anyway, to cut a long investigation short, I found two environments
that were out of sync.

As far as I can tell, in nbproject\project.xml, the classpath just
underneath the  element

 output/classes:output/testclasses:${base.path}/junit-4.13.2/junit-4.13.2.jar:${base.path}/easymock-4.3/easymock-4.3.jar:${base.path}/objenesis-3.2/objenesis-3.2.jar:${base.path}/cglib-3.3.0/cglib-nodep-3.3.0.jar:${base.path}/hamcrest/hamcrest-2.2.jar

should look more like


Re: manager best practice

2021-11-13 Thread Greg Huber

Chris,

Blimey, even with a long name it gets found, I guess we are always being 
snooped on.

401 Unauthorized
   /reallylongmanager1234567890/html: 3 Time(s)

6 	1(1.03%) 	0(0.00%) 	3.38 KiB(0.23%) 	FR France 	Mozilla/5.0 (Linux; 
U; Android 4.1.2; ja-jp; SC-06D Build/JZO54K) AppleWebKit/534.30 (KHTML, 
like Gecko) Version/4.0 Mobile Safari/534.30
7 	1(1.03%) 	0(0.00%) 	3.38 KiB(0.23%) 	Unknown 	Mozilla/5.0 (Windows NT 
10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36 	


I guess the default 401 page should be modified locally to just say 401 
Unauthorized and not mention Tomcat.

Cheers Greg

On 01/10/2021 22:09, Christopher Schultz wrote:

Greg,

On 9/28/21 06:52, Greg Huber wrote:

Hello,

Are there any best practice notes for the manager app?

eg, if include the app in webapps I get a context on my site, do I 
create a long name for the folder (the url) to hide it?


eg folder called reallylongmanager1234567890

so I get http://xxx.site/reallylongmanager1234567890

Or is there a better way?


Hiding the name is just security-by-obscurity. But in this case, it's 
a useful one if you want to go through the effort. No script kiddie is 
going to scan the internet for host/reallylongmanager1234567890, 
they'll try host/manager and, getting a 404, will move-on to others.


At $work, we enable the RemoteAddrValve and make sure it only allows 
connections from localhost. It turns out this is the default these 
days, so I may adjust my build process to stop doing that explicitly. 
We also require authentication so local miscreants, if they exist, 
can't mess with our applications. Well, at least non-root miscreants. ;)


We also run everything through a reverse proxy (httpd) and only map 
our "real" web applications from the outside world into the back-end 
Tomcat notes. This is the real protection: you can't get to our 
manager from the outside world at all.


-chris

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


Re: ROOT.xml and META-INF/context.xml

2021-11-07 Thread Greg Huber

OK, thanks.

Some older mobiles don't like samesite, and the CookieProcessor seems to 
mess with all the cookies.  JSESSIONID is the last cookie I need to add 
the samesite attribute, is there another way to set it, for example in a 
filter where I can check the useragent?


Cheers Greg

On 07/11/2021 15:15, Mark Thomas wrote:

On 07/11/2021 10:44, Greg Huber wrote:

Hello,

I am testing CookieProcessor for SameSite stuff.

In my dev environment,  I use ROOT.xml with

workDir="/home/me/project/work" />


I have a context.xml file in META-INF but it seems to ignore it. When 
I deploy via a war it is picked up OK.


A web application can only have one context.xml file. If you have 
deployed it via a $CATALINA_BASE/conf//ROOT.xml then any 
context.xml file in the application will be ignored.


When you deploy via a WAR, the context.xml will be used (and may be 
extracted).



webapp/META-INF/context.xml

webapp/WEB-INF/.


Is this normal logic?


Yes.

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



ROOT.xml and META-INF/context.xml

2021-11-07 Thread Greg Huber

Hello,

I am testing CookieProcessor for SameSite stuff.

In my dev environment,  I use ROOT.xml with

workDir="/home/me/project/work" />


I have a context.xml file in META-INF but it seems to ignore it. When I 
deploy via a war it is picked up OK.



webapp/META-INF/context.xml

webapp/WEB-INF/.


Is this normal logic?

Cheers Greg




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



manager best practice

2021-09-28 Thread Greg Huber

Hello,

Are there any best practice notes for the manager app?

eg, if include the app in webapps I get a context on my site, do I 
create a long name for the folder (the url) to hide it?


eg folder called reallylongmanager1234567890

so I get http://xxx.site/reallylongmanager1234567890

Or is there a better way?

Cheers Greg


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



Re: version change failure

2021-04-11 Thread Greg Huber
Think you can copy/test your war by using folder webapps-javaee rather 
than webapps,   then migrate jakarta.* later.


"Integration of the Apache Tomcat Migration Tool for Jakarta EE via the 
webapps-javaee directory"



On 11/04/2021 10:18, dana whitelow wrote:

Hi,I ran the migration tool against the sample.war

./migrate.sh sample.war webapp.war
Performing migration from source 
[/home/dana/servers/jakartaee-migration-0.2.0/bin/sample.war] to destination 
[/home/dana/servers/jakartaee-migration-0.2.0/bin/webapp.war] with Jakarta EE 
specification profile [TOMCAT]
Migration starting for archive [sample.war] using streaming
Migration finished for archive [sample.war]
Migration completed successfully in [66] milliseconds

The migrated  webapp.war did work in tomcat  apache-tomcat-10.0.5

BUT the web.xml header  remained unchanged
http://java.sun.com/xml/ns/j2ee;
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
     version="2.4">

should be https://jakarta.ee/xml/ns/jakartaee;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee 
https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd;
   version="5.0">

Is it possible to get hold of sample application or archetype  showing  the 
handling of a non-static file like jsp or servlet  preferably .xhtml
  welcome file in jakartee  even without the use of web.xml  for the welcome 
file because it is meant to be  optional  in jakartaee?
   
  
danawhite...@aol.com
  
  
-Original Message-

From: Усманов Азат Анварович 
To: Tomcat Users List ; dana whitelow 

Sent: Sat, 10 Apr 2021 20:59
Subject: RE: version change failure

Dana, Please see the migration -guide  (https://tomcat.apache.org/migration-10.html) 
 here is a quote from it "


Apache Tomcat 10 supports the Jakarta Servlet 5.0, Jakarta Server Pages 3.0, Jakarta 
Expression Language 4.0, JakartaWebSocket 2.0 and Jakarta Authentication 2.0 
specifications.

There is a significant breaking change between Tomcat 9.0.x and Tomcat 10.0.x. The Java 
package used by the specification APIs has changed from javax... to jakarta It will be 
necessary to recompile web applications against the new APIs. Alternatively, users can 
convert an existing WAR file from Java EE 8 to Jakarta EE 9 using the Apache Tomcat 
migration tool for Jakarta 
EE."

С уважением,
Азат Усманов
Отдел разработки программного обеспечения
Казанский инновационный университет имени В.Г.Тимирясова


От: dana whitelow 
Отправлено: 10 апреля 2021 г. 22:08
Кому: users@tomcat.apache.org 
Тема: version change failure

Hi ,
I changed tomcat version
from
8.5.38
to
10.0.5

The setup was running without web.xml and it was picking up index.jsp 
automatically
but with the new version there is a connection refused error.

what has changed  ?

Thanks

danawhite...@aol.com



Re: Looking for useless information. :-)

2021-03-06 Thread Greg Huber

According to my Wrox Professional Apache Tomcat c2002,

The first version of Tomcat was the 3.x series, and it served as the 
reference implementations of the Servlet 2.2 and JSP 1.1 
specifications.  The Tomcat 3.x series was descended from the original 
code Sun provided to the ASF in 1999.


In 2001, Tomcat 4.0 (codenamed Catalina) was releases, and was a 
complete redesign of the Tomcat architecture and had a new code base.  
The Tomcat 4.x series, is the reference implementation of the Servlet 
2.3 and JSP 1.2 specifications.


...Seems like yesterday ;-)

On 05/03/2021 21:59, Gavin McDonald wrote:

Back then, as part of the Jakarta project, I believe it was 19th April 2000


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



Re: [OT] Spring Security LDAPS authenticator won't trust TLS cert

2021-01-25 Thread Greg Huber

Maybe try removing the old cert as its not expired yet?


On 25/01/2021 16:10, Christopher Schultz wrote:


Alias name: letsencrypt
Creation date: Dec 12, 2016
Entry type: trustedCertEntry

Owner: CN=Let's Encrypt Authority X3, O=Let's Encrypt, C=US
Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co.
Serial number: a014142015385736a0b85eca708
Valid from: Thu Mar 17 12:40:46 EDT 2016 until: Wed Mar 17 12:40:46 
EDT 2021 


Re: Tomcat server not considering Mime Type - Request urgent help!!

2021-01-13 Thread Greg Huber
I have found getting browsers to handle objects correctly is problematic 
and needs to be specific to the use case in the html link.




On 13/01/2021 08:27, Jonnalagadda, Swathi (External) wrote:

Thank you for the email

We could see that when we try to open the xls file separately the browser shows 
dialogue box to save it so it is nothing to do with browser settings

Could you please advise if I am missing out any setting here.

Thanks
Swathi
-Original Message-
From: Mounika Reddy [mailto:spidermai...@gmail.com]
Sent: Wednesday, January 13, 2021 3:48 AM
To: Tomcat Users List
Cc: Mark Thomas
Subject: Re: Tomcat server not considering Mime Type - Request urgent help!!

CAUTION:   This email originated from outside the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.

Pls check http response headers for the request to confirm if it's returning 
proper headers.

Once they are in place then it may be to do with browser settings not 
processing headers.



On Tue, Jan 12, 2021, 2:48 PM Jonnalagadda, Swathi (External) < 
swathi.jonnalaga...@xerox.com> wrote:


Hi Team

We have an application deployed in tomcat9.0.38 server which generates
an xls file dynamically and saves at server end. When we try to access
the file using application frontend, it is neither showing up in excel
format nor showing up pop up to save the file instead it is showing
the content of xls file in xml format directly on the browser.

Below mime type is set both at web.xml of webapplicatio end and as
well as Tomcat9038/conf/web.xml


 xls
 application/vnd.ms-excel
 

Could you please help in resolving the issue ASAP


Thanks
Swathi


-
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: Dates on Linux vs. Windows - Resolved

2020-01-08 Thread Greg Huber
>From my past experience with dates and timestamps, it helps to pass the
time zone as a  jvm parameter when starting tomcat

-Duser.timezone=Europe/London



On Wed, 8 Jan 2020 at 05:05, Jerry Malcolm  wrote:

> First of all, a big thank you to everyone who responded to this one.  I
> doubt I'd have figured it out for days without your guidance and help.
>
> And the winner is the JVM timezone.  But the problem was NOT that
> the JVM wasn't set to US Central time.  The problem was that it WAS set
> to US Central, apparently inherited from the Linux OS TZ.  There was no
> parameter on the tomcat java command that set the timezone.  So I added
> one and set it to America/Chicago.  No change.  But since it appeared we
> were already double-dipping and converting from GMT to central twice
> (i.e. subtracting an additional 6 hours), I figured ok tell the JVM
> to stay in GMT and not do any conversions.  So now, the database returns
> Central time dates and times, but JVM no longer thinks it needs to
> convert again to 'more central'.
>
> This is about as convoluted and ugly as it gets.  And I don't make any
> claims of thinking I can give a rational explanation for why it works
> this way.  But it's on to fight a battle on another hill now.
>
> Just to summarize for anybody who comes along with a similar problem
> I original set the timezone of mySQL RDS instance to Central time when I
> created it months back (unchangable after it's set).  I set my Linux
> timezone to Central as well in order to make my log files have entries
> with the correct timestamps.  But as I described earlier, changing the
> OS timezone made the JVM also go to Central as well.  But the JVM
> apparently assumed the database was in GMT so it subtracted 6 more hours
> off the already-central time from the db.  I guess the real error was
> not initially leaving the MySQL RDS in GMT.  But since that's not
> changeable without recreating a whole new RDS instance, the next option
> is what I did with the jvm.   Makes total sense, right???  :-)
>
> Thanks again.
>
> Jerry
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat doesn't refreshes and still gives me an old error again and again

2019-09-10 Thread Greg Huber
Eclipse works the way it works, but what you can use is
https://marketplace.eclipse.org/content/eclipse-tomcat-plugin which is
basically an update of the mighty
http://www.eclipsetotale.com/tomcatPlugin.html

I use a blank dynamic web project, with a standard plugin setup, ie default
output folder ../../WEB-INF/classes.  I then fudge the WEB-INF/lib folder
by using a maven task to copy the jars from my war build process.  The
devloader is good but I could not find a way to play nicely with maven.

You then use the debugging as part of the plugin.




copy-webapp-jars



maven-compiler-plugin
3.8.0

1.8
1.8

false




default-compile
none




org.apache.maven.plugins
maven-dependency-plugin
3.1.1


copy-dependencies
package

copy-dependencies



${project.basedir}/src/main/webapp/WEB-INF/lib

false

false

true
provided

junit,org.hamcrest





org.apache.maven.plugins
maven-antrun-plugin
1.8


clear-jars

prepare-package

run

















On Wed, 4 Sep 2019 at 14:21, Karen Goh  wrote:

> Hi Expert,
>
> I am facing this problem - that Tomcat - 9.0.24 doesn't refreshes and it
> will give ma an error, even after I commented out a line.  But, after
> several cleaning - using Tomcat Directory clean, right-click on the project
> in Eclipse and do a run maven force update and project built, it will still
> give me an error that point out to a commented out line.
>
> Can I know if the above indicate a corrupted Tomcat instance or what
> should I do in order not to have the above problem crop up again and again?
>
> Eclipse
> Maven Java EE, JSP, JSTL
> OS : Windows10
> Tomcat : 9.0.24
>
> Thanks & regards,
> Karen
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: helping building JSVC for Tomcat 8.5.45

2019-09-05 Thread Greg Huber
Use the previous version, it seems to work ok.  The next release will
include the missing script.

On Thu, 5 Sep 2019 at 13:06, Goldstein, Craig A CIV DTIC ITS (USA)
 wrote:

> I pulled down tomcat 8.5.45 in the commons-daemon-1.2.0-native-src/unix
> the thedirectory is missing the necessary files to run the configure
> command. See contents of directory below.
>
> apache-tomcat-8.5.45/bin/commons-daemon-1.2.0-native-src/unix
>
> configure.in  INSTALL.txt  Makedefs.in  Makefile.in  man  native  support
>
>
>
>
> our older version has the correct files.
>
> tomcat-8.5.31/bin/commons-daemon-1.1.0-native-src/unix
> config.nice  config.status  configure  configure.in  INSTALL.txt
>  Makedefs  Makedefs.in  Makefile  Makefile.in  man  native  support
>
>
> Is there a mirror that has the correct build in it.
>
>


Re: building jsvc 1.2.0 for 9.0.24

2019-08-20 Thread Greg Huber
OK, thanks, I just copied it from the previous release this time.

If I run ./support/buildconf.sh from the unix dir I get:

./support/buildconf.sh: line 22: autoconf: command not found
./support/buildconf.sh: cannot generate configure script

So it wants autoconf to be installed now.  Can ./configure be created as
before in the build for ease of use?

Cheers Greg

On Tue, 20 Aug 2019 at 08:03, Mark Thomas  wrote:

> On August 19, 2019 8:24:00 AM UTC, Greg Huber  wrote:
> >Hello,
> >
> >I am trying to build commons-daemon-1.2.0 from the supplied
> >commons-daemon-native.tar.gz.  There seems to be a ./configure script
> >missing from the
> >apache-tomcat-9.0.24/bin/commons-daemon-1.2.0-native-src/unix folder.
> >
> >I have checked the INSTALL.txt from v1.1.0 and they are exactly the
> >same.
> >Is there something I have to do to create the ./configure (there is a
> >configure.in file)
>
> Sounds like a step was missed in the Commons Daemon release. I'll look
> into updating the docs so it doesn't get missed in future
>
> You should be able to call support/buildconf.sh to create the configure
> script.
>
> Mark
>
> >
> >what I normally do :
> >
> >export CFLAGS=-m64
> >export LDFLAGS=-m64
> >./configure
> >make
> >copy jsvc to bin folder
> >
> >Cheers Greg
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


building jsvc 1.2.0 for 9.0.24

2019-08-19 Thread Greg Huber
Hello,

I am trying to build commons-daemon-1.2.0 from the supplied
commons-daemon-native.tar.gz.  There seems to be a ./configure script
missing from the
apache-tomcat-9.0.24/bin/commons-daemon-1.2.0-native-src/unix folder.

I have checked the INSTALL.txt from v1.1.0 and they are exactly the same.
Is there something I have to do to create the ./configure (there is a
configure.in file)

what I normally do :

export CFLAGS=-m64
export LDFLAGS=-m64
./configure
make
copy jsvc to bin folder

Cheers Greg


Re: "Tomcat 9.0.x configuration file differences" broken

2019-03-20 Thread Greg Huber
for the fortunate, you can use http://meldmerge.org/  ok its local but
works well.

On Wed, 20 Mar 2019 at 09:58, Mark Thomas  wrote:

> On 20/03/2019 06:45, Dirk Gfrörer wrote:
> > Hello,
> >
> > before upgrading our Tomcats I usually check for any changes within the
> > catalina.policy, etc. files.
> >
> > I use this URL
> >
> > https://tomcat.apache.org/migration-9.html
> >
> > scroll down to the very bottom and than click on the "View Differences"
> > button. You get redirected to
> >
> >
> https://gitbox.apache.org/repos/asf?p=tomcat.git=blobdiff=conf%2Fcatalina.policy=9.0.16=9.0.17
> >
> >
> > which than shows:
> >
> > Forbidden
> > You don't have permission to access /repos/asf on this server.
> >
> >
> > Same is true for
> > http://tomcat.apache.org/migration-85.html
> >
> > Maybe someone on this list is able to check.
>
> The service that those URLs use has been temporarily disabled by ASF
> infra due to abusive traffic. They hope to be able to re-enable it soon.
> If not, we'll need to find an alternative solution.
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 9.0.14 startup fails

2018-12-29 Thread Greg Huber
I used your startup script as a test, there does seem to be some
differences between v13 and v14.  v13 starts OK but v14 fails, I can see
the temp/tomcat.pid being created but then disappears.


systemctl status -l tomcat
● tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor
preset: disabled)
   Active: inactive (dead)

Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
java.net.Socket.(Socket.java:211)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:513)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Dec 29 16:50:52 dev.boxshutdown.sh[22941]: at
java.lang.reflect.Method.invoke(Method.java:498)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:403)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:497)
Dec 29 16:50:52 dev.box shutdown.sh[22941]: The stop command failed.
Attempting to signal the process to stop through OS signal.
Dec 29 16:50:53 dev.box shutdown.sh[22941]: Tomcat stopped.


It seems to work OK using jsvc however.  There are no error logs.

Cheers Greg



On Sat, 29 Dec 2018 at 03:27, Steve Demy  wrote:

> Maybe there is a clue here:
>
> 1)  Eliminated systemd script and rebooted server.
> 2)  Manually started Tomcat using startup.sh run .  Tomcat starts normally.
> 3)  Manually stopped Tomcat using shutdown.sh.  Got stack trace:
>
> Using CATALINA_BASE:   /opt/tomcat
> Using CATALINA_HOME:   /opt/tomcat
> Using CATALINA_TMPDIR: /opt/tomcat/temp
> Using JRE_HOME:/usr
> Using CLASSPATH:
>  /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
> NOTE: Picked up JDK_JAVA_OPTIONS:
> --add-opens=java.base/java.lang=ALL-UNNAMED 
> --add-opens=java.base/java.io=ALL-UNNAMED
> --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
> Dec 28, 2018 9:57:32 PM org.apache.catalina.startup.Catalina stopServer
> SEVERE: Could not contact [localhost:8005] (base port [8005] and offset
> [0]). Tomcat may not be running.
> Dec 28, 2018 9:57:32 PM org.apache.catalina.startup.Catalina stopServer
> SEVERE: Error stopping Catalina
> java.net.ConnectException: Connection refused (Connection refused)
> at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.base/java.net
> .AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
> at java.base/java.net
> .AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
> at java.base/java.net
> .AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
> at java.base/java.net
> .SocksSocketImpl.connect(SocksSocketImpl.java:403)
> at java.base/java.net.Socket.connect(Socket.java:591)
> at java.base/java.net.Socket.connect(Socket.java:540)
> at java.base/java.net.Socket.(Socket.java:436)
> at java.base/java.net.Socket.(Socket.java:213)
> at
> org.apache.catalina.startup.Catalina.stopServer(Catalina.java:513)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
> org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:403)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:497)
>
> Tomcat is shut down - it is absent from the process list.  I think 8005 is
> being contacted *after* Tomcat is shut down, leading to the error.
>
> With systemd involved, the failed shutdown triggers a restart timer, which
> evokes a shutdown command, which fails in the same manner leading to the
> start/stop loop.
>
> Is this a new bug in 9.0.14 or do I have a configuration problem that
> manifests in 9.0.14 for the first time?
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: lingering mysql connections

2018-12-14 Thread Greg Huber
I resolved the same using this link

https://stackoverflow.com/questions/11872316/tomcat-guice-jdbc-memory-leak

I created the ContextFinalizer to cleanup on shut down.

Also, I had loads of strange sql issues which were resolved by switching to
maria db.

Cheers Greg

On Thu, 13 Dec 2018 at 20:51, Chris Cheshire  wrote:

> Tomcat 9.0.12, Debian, MySQL Server 5.7.23, Connector/J 5.1.46
>
> I am trying to fix a lingering database connection problem. When I
> reload a context via the tomcat manager, connections to the
> datasources are not being released in mysql. They are still on the 30
> second activity cycle from the eviction thread. I can see this via
> 'show processlist' in the mysql client - the 'time' column resets at
> 30, and each connection has unique process ids that I can track per
> reload.
>
> I have tomcat home and base split (multiple instances of tomcat across
> different users), with the connector/j jar in tomcat_base/lib.
>
> In my webapp's META-INF/context.xml I have 3 different datasources,
> config, data, sched. All have configuration like :
>
>auth="Container"
> type="javax.sql.DataSource"
> driverClassName="com.mysql.jdbc.Driver"
>
> url="jdbc:mysql://localhost:3306/$DBNAME$?useUnicode=truecharacterEncoding=utf8useSSL=false"
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> username="$USER$"
> password="$PASSWORD$"
> maxActive="2"
> maxIdle="1"
> minIdle="1"
> initialSize="1"
> maxWait="3"
> removeAbandoned="true"
> removeAbandonedTimeout="60"
> logAbandoned="true"
> validationQuery="/* ping */"
> testOnBorrow="true"
> testWhileIdle="true"
> timeBetweenEvictionRunsMillis="3"
> defaultAutoCommit="false"
> defaultIsolation="READ_COMMITTED" />
>
> Connections are obtained via
>
> Connection dbConn = ((DataSource)new
> InitialContext().lookup(resourceName)).getConnection()
>
> Connections are all closed via
>
> dbConn.close()
>
> (Simplified greatly, there's convenience methods with exception
> handling in there)
>
>
>
> In contextDestroyed() of a ServletContextListener I am calling
>
> AbandonedConnectionCleanupThread.checkedShutdown();
>
> I have an initialization servlet that must be manually called before
> the webapp is fully online - it is used to load encrypted
> configuration from the conf datasource. It does not touch the data
> datasource, only conf and sched by virtue of starting the quartz
> scheduler which is configured to use this datasource.
>
> My observation are :
> * It doesn't matter what order I declare the datasources, they are
> always getting opened in the order sched, conf, data (judging by
> increased thread/process ids in mysql).
> * When I start tomcat, I get 3 open connections in mysql, 1 to each of
> the databases referenced by the datasources. If I immediately reload
> via the manager, all 3 connections are destroyed and 3 new ones are
> opened.
> * Once I call the initialization servlet, and subsequently reload the
> web app via the manager, previous connections to conf and sched are
> still open in mysql, as well as new ones
> * If I access any part of the web app that uses the data datasource,
> those connections now also linger.
> * Once I stop tomcat (and the JVM) all lingering connections are
> closed in mysql.
> * If I put the connector/j jar in my WEB-INF/lib instead of
> tomcat_base/lib, I get the following warning on reload/shutdown
>
> 13-Dec-2018 20:19:53.968 WARNING [ajp-nio-8019-exec-3]
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc
> The web application [ct] registered the JDBC driver
> [com.mysql.jdbc.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has
> been forcibly unregistered.
>
> * There are no warnings or errors in catalina.out about abandoned
> connections during runtime, reload or shutdown of the tomcat instance.
> I have every connection being closed after use. (I have seen the
> warnings when I have made a code mistake however, so the thread is
> doing its job).
> * If I remove the abandoned connection and eviction thread
> configuration entirely, the connection activity timer resets on a 5
> second cycle in mysql. If I explicitly change
> timeBetweenEvictionRunsMillis to -1, the activity timer in mysql never
> resets (which implies that the default is not -1 as the documentation
> suggests)
>
> So it seems that once a datasource is accessed, connections to it
> perpetually linger in mysql until the JVM is shutdown.
>
> I have had this issue for a long time, through tomcat 7, 8.5 and 9,
> and multiple versions of mysql server and the connector., and also
> using the commons pool. On my sandboxes I tend to reload a lot as I
> deploy exploded, rather than deploy an entire WAR each 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-25 Thread Greg Huber
> > [Sun Nov 25 18:00:36.250346 2018] [core:notice] [pid 26421] SELinux
> policy enabled; httpd running as context system_u:system_r:httpd_t:s0

Unless its a requirement of your host services just disable selinux as it
adds complexity.  When apache/tomcat is up and running you can enable it
and then try and get it working with selinux.

On Sun, 25 Nov 2018 at 20:27, Lou Wallace  wrote:

> How will selinux help? Not sure what you mean...
>
> On Sun, Nov 25, 2018 at 3:16 PM Loai Abdallatif  >
> wrote:
>
> > try  selinux to permissive mode using #setenforce 0 to exclude it from
> > analyses
> >
> > On Sun, Nov 25, 2018 at 8:05 PM Lou Wallace 
> > wrote:
> >
> > > hey Greg,
> > >
> > > No obvious errors in mod_jk log. Only has five lines
> > >
> > > [Sun Nov 25 15:22:11.637 2018] [14159:139840145266816] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > > [Sun Nov 25 15:22:11.657 2018] [14159:139840145266816] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > > [Sun Nov 25 15:37:01.930 2018] [15407:140260327409792] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > > [Sun Nov 25 15:37:01.951 2018] [15407:140260327409792] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > > [Sun Nov 25 18:00:36.252 2018] [26421:139699565041792] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > > [Sun Nov 25 18:00:36.276 2018] [26421:139699565041792] [info]
> > > init_jk::mod_jk.c (3591): mod_jk/1.2.46 initialized
> > >
> > > error_log
> > >
> > > [Sun Nov 25 18:00:36.250346 2018] [core:notice] [pid 26421] SELinux
> > policy
> > > enabled; httpd running as context system_u:system_r:httpd_t:s0
> > > [Sun Nov 25 18:00:36.251392 2018] [suexec:notice] [pid 26421] AH01232:
> > > suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> > > [Sun Nov 25 18:00:36.252380 2018] [jk:warn] [pid 26421] No JkLogFile
> > > defined in httpd.conf. Using default /etc/httpd/logs/mod_jk.log
> > > [Sun Nov 25 18:00:36.252466 2018] [jk:warn] [pid 26421] No JkShmFile
> > > defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> > > [Sun Nov 25 18:00:36.273798 2018] [auth_digest:notice] [pid 26421]
> > AH01757:
> > > generating secret for digest authentication ...
> > > [Sun Nov 25 18:00:36.275236 2018] [lbmethod_heartbeat:notice] [pid
> 26421]
> > > AH02282: No slotmem from mod_heartmonitor
> > > [Sun Nov 25 18:00:36.276120 2018] [jk:warn] [pid 26421] No JkLogFile
> > > defined in httpd.conf. Using default /etc/httpd/logs/mod_jk.log
> > > [Sun Nov 25 18:00:36.276179 2018] [jk:warn] [pid 26421] No JkShmFile
> > > defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> > > [Sun Nov 25 18:00:36.280163 2018] [mpm_prefork:notice] [pid 26421]
> > AH00163:
> > > Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_jk/1.2.46 configured --
> > > resuming normal operations
> > > [Sun Nov 25 18:00:36.280201 2018] [core:notice] [pid 26421] AH00094:
> > > Command line: '/usr/sbin/httpd -D FOREGROUND'
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Sun, Nov 25, 2018 at 12:42 PM Greg Huber 
> wrote:
> > >
> > > > OK, sorry, if you are remote then 8080 port may not be open.
> > > >
> > > > You need to check tomcat app actually shows the page correctly.
> > > >
> > > > If the page http://IP/index.jsp <http://IP:8080/index.jsp>
> > > > just shows the jsp, have a look at the /var/log/httpd logs to see
> what
> > > its
> > > > doing,
> > > >
> > > > eg access.log
> > > > xxx.xxx.xxx.xxx.xxx - - [25/Nov/2018:07:28:08 +] "GET /index.jsp
> > > > HTTP/1.1" 200 27080 "
> > > >
> > > > also look in the error.log for errors
> > > >
> > > > mod_jk.log
> > > > [Sun Nov 25 07:27:10 2018][1452:140132954712192] [info]
> > init_jk::mod_jk.c
> > > > (3591): mod_jk/1.2.46 initialized
> > > >
> > > > You could try yum package links which is a command line browser.
> > > >
> > > > Name: links
> > > > Arch: x86_64
> > > > Epoch   : 1
> > > > Version : 2.13
> > > > Release : 1.el7
> > > > Size: 2.8 M
> > > > Repo: epel/x86_64
> > > > Summary : Web bro

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-25 Thread Greg Huber
OK, sorry, if you are remote then 8080 port may not be open.

You need to check tomcat app actually shows the page correctly.

If the page http://IP/index.jsp <http://IP:8080/index.jsp>
just shows the jsp, have a look at the /var/log/httpd logs to see what its
doing,

eg access.log
xxx.xxx.xxx.xxx.xxx - - [25/Nov/2018:07:28:08 +] "GET /index.jsp
HTTP/1.1" 200 27080 "

also look in the error.log for errors

mod_jk.log
[Sun Nov 25 07:27:10 2018][1452:140132954712192] [info] init_jk::mod_jk.c
(3591): mod_jk/1.2.46 initialized

You could try yum package links which is a command line browser.

Name: links
Arch: x86_64
Epoch   : 1
Version : 2.13
Release : 1.el7
Size: 2.8 M
Repo: epel/x86_64
Summary : Web browser running in both graphics and text mode
URL : http://links.twibright.com/
Licence : GPLv2+
Description : Links is a web browser capable of running in either graphics
or text mode.
: It provides a pull-down menu system, renders complex pages,
has partial HTML
: 4.0 support (including tables, frames and support for
multiple character sets
: and UTF-8), supports color and monochrome terminals and
allows horizontal
: scrolling.

On Sun, 25 Nov 2018 at 17:07, Lou Wallace  wrote:

> How can I do that from the command line shell? I tried it from browser and
> it timed out using http://IP:8080/index.jsp
>
>
> On Sun, Nov 25, 2018 at 11:54 AM Greg Huber  wrote:
>
> > >>But my .jsp web page is still showing as plain text
> >
> > With tomcat running does it show correctly ie
> > http://127.0.0.1:8080/../mypage.jsp
> >
> > then try http://127.0.0.1/../mypage.jsp
> >
> > ##
> >
> > tomcat server.xml using default port
> >  >connectionTimeout="2"
> >redirectPort="8443" />
> >
> >
> > On Sun, 25 Nov 2018 at 15:28, Lou Wallace 
> wrote:
> >
> > > hmm this is weird
> > >
> > > After adding
> > >
> > > #Options Indexes FollowSymLinks
> > > #No folders/files listed
> > > Options -Indexes -FollowSymLinks
> > >
> > > I decided to allow httpd.conf to try and load mod_jk.so again so I
> added
> > > back LoadModule jk_module /etc/httpd/modules/mod_jk.so and restarted
> > httpd
> > >
> > > then when I do apachectl -M I see as last entry in the list
> > >
> > > Loaded Modules:
> > >  core_module (static)
> > >  so_module (static)
> > >  http_module (static)
> > >  access_compat_module (shared)
> > >  actions_module (shared)
> > >  alias_module (shared)
> > >  allowmethods_module (shared)
> > >  auth_basic_module (shared)
> > >  auth_digest_module (shared)
> > >  authn_anon_module (shared)
> > >  authn_core_module (shared)
> > >  authn_dbd_module (shared)
> > >  authn_dbm_module (shared)
> > >  authn_file_module (shared)
> > >  authn_socache_module (shared)
> > >  authz_core_module (shared)
> > >  authz_dbd_module (shared)
> > >  authz_dbm_module (shared)
> > >  authz_groupfile_module (shared)
> > >  authz_host_module (shared)
> > >  authz_owner_module (shared)
> > >  authz_user_module (shared)
> > >  autoindex_module (shared)
> > >  cache_module (shared)
> > >  cache_disk_module (shared)
> > >  data_module (shared)
> > >  dbd_module (shared)
> > >  deflate_module (shared)
> > >  dir_module (shared)
> > >  dumpio_module (shared)
> > >  echo_module (shared)
> > >  env_module (shared)
> > >  expires_module (shared)
> > >  ext_filter_module (shared)
> > >  filter_module (shared)
> > >  headers_module (shared)
> > >  include_module (shared)
> > >  info_module (shared)
> > >  log_config_module (shared)
> > >  logio_module (shared)
> > >  mime_magic_module (shared)
> > >  mime_module (shared)
> > >  negotiation_module (shared)
> > >  remoteip_module (shared)
> > >  reqtimeout_module (shared)
> > >  rewrite_module (shared)
> > >  setenvif_module (shared)
> > >  slotmem_plain_module (shared)
> > >  slotmem_shm_module (shared)
> > >  socache_dbm_module (shared)
> > >  socache_memcache_module (shared)
> > >  socache_shmcb_module (shared)
> > >  status_module (shared)
> > >  substitute_module (shared)
> > >  suexec_module (shared)
> > >  unique_id_module (shared)
> > >  un

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-25 Thread Greg Huber
>Question 1: Are 10-my.conf and my.conf supposed to automatically be used by
>the system if they are in conf directory or do they need to be called from
>somewhere like httpd.conf?

Looking at httpd.conf
...
#
# Dynamic Shared Object (DSO) Support
#
Include conf.modules.d/*.conf
...
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
...

Does all the loading, from conf.modules.d and conf.dfolders.  So don't need
to do anything extra.

If you are running standard centos 7 there are should be no modules loaded
in httpd.conf?
rpm -q httpd
httpd-2.4.6-80.el7.centos.1.x86_64

>Question 2: Is there some other config file I need to edit to
>allow LoadModule jk_module /etc/httpd/modules/mod_jk.so to work when
>loaded?
>Because if I just add
>LoadModule jk_module /etc/httpd/modules/mod_jk.so
>to httpd I get the Apache shared memory error when I systemctl restart
>httpd and Apache fails to load

Maybe the shared memory error is because its loading in the incorrect
order?  If you just add the LoadModule to the end of httpd.conf it will be
in the wrong place.  Place it just after

Include conf.modules.d/*.conf

and see if it works.  But its best to use the /etc/httpd/conf.modules.d
folder!!





On Sun, 25 Nov 2018 at 15:28, Lou Wallace  wrote:

> It's there in  /etc/httpd/modules
> its file size is 1556784
>
> ls -l /etc/httpd/modules/mod_jk.so  shows
> -rwxr-xr-x. 1 root root 1556784
>
> apachectl -M  shows no mod_jk.so loaded
>
> Question 1: Are 10-my.conf and my.conf supposed to automatically be used by
> the system if they are in conf directory or do they need to be called from
> somewhere like httpd.conf? Because if I just add
> LoadModule jk_module /etc/httpd/modules/mod_jk.so
> to httpd I get the Apache shared memory error when I systemctl restart
> httpd and Apache fails to load
>
> Question 2: Is there some other config file I need to edit to
> allow LoadModule jk_module /etc/httpd/modules/mod_jk.so to work when
> loaded?
>
> And I just added
>
> #Options Indexes FollowSymLinks
> #No folders/files listed
> Options -Indexes -FollowSymLinks
>
> to httpd.conf
>
> Thanks for the continued help!!
>
>  Lou
>
>
> On Sun, Nov 25, 2018 at 5:28 AM Greg Huber  wrote:
>
> > There's the problem, make sure you have copied mod_jk.so to
> > /etc/httpd/modules/mod_jk.so
> >
> > My file size 1,556,816 bytes permission owner root and execute
> >
> > ls -l /etc/httpd/modules/mod_jk.so
> > -rwxrwxr-x 1 root root
> >
> > also check the x executable
> >
> > And apachectl -M (sorry not -S)
> > ...
> > jk_module (shared)
> > ...
> >
> > 10-my.conf and my.conf are preferred as when yum updates httpd it also
> > updates /etc/httpd/conf/httpd.conf.  If you change httpd.conf you then
> have
> > to merge the httpd.conf.rpmnew as it won't overwrite config.
> >
> > The only change I make in httpd.conf is to make sure there is no browsing
> >
> > #Options Indexes FollowSymLinks
> > #No folders/files listed
> > Options -Indexes -FollowSymLinks
> >
> >  Cheers Greg
> >
> >
> >
> > On Sat, 24 Nov 2018 at 22:02, Lou Wallace 
> wrote:
> >
> > > Here is what I see
> > >
> > > Loaded Modules:
> > >  core_module (static)
> > >  so_module (static)
> > >  http_module (static)
> > >  access_compat_module (shared)
> > >  actions_module (shared)
> > >  alias_module (shared)
> > >  allowmethods_module (shared)
> > >  auth_basic_module (shared)
> > >  auth_digest_module (shared)
> > >  authn_anon_module (shared)
> > >  authn_core_module (shared)
> > >  authn_dbd_module (shared)
> > >  authn_dbm_module (shared)
> > >  authn_file_module (shared)
> > >  authn_socache_module (shared)
> > >  authz_core_module (shared)
> > >  authz_dbd_module (shared)
> > >  authz_dbm_module (shared)
> > >  authz_groupfile_module (shared)
> > >  authz_host_module (shared)
> > >  authz_owner_module (shared)
> > >  authz_user_module (shared)
> > >  autoindex_module (shared)
> > >  cache_module (shared)
> > >  cache_disk_module (shared)
> > >  data_module (shared)
> > >  dbd_module (shared)
> > >  deflate_module (shared)
> > >  dir_module (shared)
> > >  dumpio_module (shared)
> > >  echo_module (shared)
> > >  env_module (shared)
> > >  expires_module (shared)
> > >  ext_filter_module (shared)
> > >  filter_module (shared)
> > &

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-25 Thread Greg Huber
>>But my .jsp web page is still showing as plain text

With tomcat running does it show correctly ie
http://127.0.0.1:8080/../mypage.jsp

then try http://127.0.0.1/../mypage.jsp

##

tomcat server.xml using default port



On Sun, 25 Nov 2018 at 15:28, Lou Wallace  wrote:

> hmm this is weird
>
> After adding
>
> #Options Indexes FollowSymLinks
> #No folders/files listed
> Options -Indexes -FollowSymLinks
>
> I decided to allow httpd.conf to try and load mod_jk.so again so I added
> back LoadModule jk_module /etc/httpd/modules/mod_jk.so and restarted httpd
>
> then when I do apachectl -M I see as last entry in the list
>
> Loaded Modules:
>  core_module (static)
>  so_module (static)
>  http_module (static)
>  access_compat_module (shared)
>  actions_module (shared)
>  alias_module (shared)
>  allowmethods_module (shared)
>  auth_basic_module (shared)
>  auth_digest_module (shared)
>  authn_anon_module (shared)
>  authn_core_module (shared)
>  authn_dbd_module (shared)
>  authn_dbm_module (shared)
>  authn_file_module (shared)
>  authn_socache_module (shared)
>  authz_core_module (shared)
>  authz_dbd_module (shared)
>  authz_dbm_module (shared)
>  authz_groupfile_module (shared)
>  authz_host_module (shared)
>  authz_owner_module (shared)
>  authz_user_module (shared)
>  autoindex_module (shared)
>  cache_module (shared)
>  cache_disk_module (shared)
>  data_module (shared)
>  dbd_module (shared)
>  deflate_module (shared)
>  dir_module (shared)
>  dumpio_module (shared)
>  echo_module (shared)
>  env_module (shared)
>  expires_module (shared)
>  ext_filter_module (shared)
>  filter_module (shared)
>  headers_module (shared)
>  include_module (shared)
>  info_module (shared)
>  log_config_module (shared)
>  logio_module (shared)
>  mime_magic_module (shared)
>  mime_module (shared)
>  negotiation_module (shared)
>  remoteip_module (shared)
>  reqtimeout_module (shared)
>  rewrite_module (shared)
>  setenvif_module (shared)
>  slotmem_plain_module (shared)
>  slotmem_shm_module (shared)
>  socache_dbm_module (shared)
>  socache_memcache_module (shared)
>  socache_shmcb_module (shared)
>  status_module (shared)
>  substitute_module (shared)
>  suexec_module (shared)
>  unique_id_module (shared)
>  unixd_module (shared)
>  userdir_module (shared)
>  version_module (shared)
>  vhost_alias_module (shared)
>  dav_module (shared)
>  dav_fs_module (shared)
>  dav_lock_module (shared)
>  lua_module (shared)
>  mpm_prefork_module (shared)
>  proxy_module (shared)
>  lbmethod_bybusyness_module (shared)
>  lbmethod_byrequests_module (shared)
>  lbmethod_bytraffic_module (shared)
>  lbmethod_heartbeat_module (shared)
>  proxy_ajp_module (shared)
>  proxy_balancer_module (shared)
> proxy_connect_module (shared)
>  proxy_express_module (shared)
>  proxy_fcgi_module (shared)
>  proxy_fdpass_module (shared)
>  proxy_ftp_module (shared)
>  proxy_http_module (shared)
>  proxy_scgi_module (shared)
>  proxy_wstunnel_module (shared)
>  ssl_module (shared)
>  systemd_module (shared)
>  cgi_module (shared)
>  jk_module (shared)
>
> So it says mod_jk is loaded
>
> But my .jsp web page is still showing as plain text
>
>
>
>
> On Sun, Nov 25, 2018 at 5:28 AM Greg Huber  wrote:
>
> > There's the problem, make sure you have copied mod_jk.so to
> > /etc/httpd/modules/mod_jk.so
> >
> > My file size 1,556,816 bytes permission owner root and execute
> >
> > ls -l /etc/httpd/modules/mod_jk.so
> > -rwxrwxr-x 1 root root
> >
> > also check the x executable
> >
> > And apachectl -M (sorry not -S)
> > ...
> > jk_module (shared)
> > ...
> >
> > 10-my.conf and my.conf are preferred as when yum updates httpd it also
> > updates /etc/httpd/conf/httpd.conf.  If you change httpd.conf you then
> have
> > to merge the httpd.conf.rpmnew as it won't overwrite config.
> >
> > The only change I make in httpd.conf is to make sure there is no browsing
> >
> > #Options Indexes FollowSymLinks
> > #No folders/files listed
> > Options -Indexes -FollowSymLinks
> >
> >  Cheers Greg
> >
> >
> >
> > On Sat, 24 Nov 2018 at 22:02, Lou Wallace 
> wrote:
> >
> > > Here is what I see
> > >
> > > Loaded Modules:
> > >  core_module (static)
> > >  so_module (static)
> > >  http_module (static)
> > >  access_compat_module (shared)
> > >  actions_module (shared)
> > >  alias_module (shared)
> > >  allowmethods_module (shared)
> > >  auth_basic

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-25 Thread Greg Huber
There's the problem, make sure you have copied mod_jk.so to
/etc/httpd/modules/mod_jk.so

My file size 1,556,816 bytes permission owner root and execute

ls -l /etc/httpd/modules/mod_jk.so
-rwxrwxr-x 1 root root

also check the x executable

And apachectl -M (sorry not -S)
...
jk_module (shared)
...

10-my.conf and my.conf are preferred as when yum updates httpd it also
updates /etc/httpd/conf/httpd.conf.  If you change httpd.conf you then have
to merge the httpd.conf.rpmnew as it won't overwrite config.

The only change I make in httpd.conf is to make sure there is no browsing

#Options Indexes FollowSymLinks
#No folders/files listed
Options -Indexes -FollowSymLinks

 Cheers Greg



On Sat, 24 Nov 2018 at 22:02, Lou Wallace  wrote:

> Here is what I see
>
> Loaded Modules:
>  core_module (static)
>  so_module (static)
>  http_module (static)
>  access_compat_module (shared)
>  actions_module (shared)
>  alias_module (shared)
>  allowmethods_module (shared)
>  auth_basic_module (shared)
>  auth_digest_module (shared)
>  authn_anon_module (shared)
>  authn_core_module (shared)
>  authn_dbd_module (shared)
>  authn_dbm_module (shared)
>  authn_file_module (shared)
>  authn_socache_module (shared)
>  authz_core_module (shared)
>  authz_dbd_module (shared)
>  authz_dbm_module (shared)
>  authz_groupfile_module (shared)
>  authz_host_module (shared)
>  authz_owner_module (shared)
>  authz_user_module (shared)
>  autoindex_module (shared)
>  cache_module (shared)
>  cache_disk_module (shared)
>  data_module (shared)
>  dbd_module (shared)
>  deflate_module (shared)
>  dir_module (shared)
>  dumpio_module (shared)
>  echo_module (shared)
>  env_module (shared)
>  expires_module (shared)
>  ext_filter_module (shared)
>  filter_module (shared)
>  headers_module (shared)
>  include_module (shared)
>  info_module (shared)
>  log_config_module (shared)
>  logio_module (shared)
>  mime_magic_module (shared)
>  mime_module (shared)
>  negotiation_module (shared)
>  remoteip_module (shared)
>  reqtimeout_module (shared)
>  rewrite_module (shared)
>  setenvif_module (shared)
>  slotmem_plain_module (shared)
>  slotmem_shm_module (shared)
>  socache_dbm_module (shared)
>  socache_memcache_module (shared)
>  socache_shmcb_module (shared)
>  status_module (shared)
>  substitute_module (shared)
> suexec_module (shared)
>  unique_id_module (shared)
>  unixd_module (shared)
>  userdir_module (shared)
>  version_module (shared)
>  vhost_alias_module (shared)
>  dav_module (shared)
>  dav_fs_module (shared)
>  dav_lock_module (shared)
>  lua_module (shared)
>  mpm_prefork_module (shared)
>  proxy_module (shared)
>  lbmethod_bybusyness_module (shared)
>  lbmethod_byrequests_module (shared)
>  lbmethod_bytraffic_module (shared)
>  lbmethod_heartbeat_module (shared)
>  proxy_ajp_module (shared)
>  proxy_balancer_module (shared)
>  proxy_connect_module (shared)
>  proxy_express_module (shared)
>  proxy_fcgi_module (shared)
>  proxy_fdpass_module (shared)
>  proxy_ftp_module (shared)
>  proxy_http_module (shared)
>  proxy_scgi_module (shared)
>  proxy_wstunnel_module (shared)
>  ssl_module (shared)
>  systemd_module (shared)
>  cgi_module (shared)
>
> No mod_jk
>
> On Sat, Nov 24, 2018 at 4:23 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Lou,
> >
> > On 11/24/18 12:19, Lou Wallace wrote:
> > > Hi Greg,
> > >
> > > I did this and restarted HTTPD. No error but no change.
> > >
> > > Not sure how 10-my.conf and my.conf are called, but I did create
> > > them as described.
> > >
> > > Also when I checked configtest
> > >
> > > [root@server2 conf]# apachectl configtest Syntax OK
> > >
> > > and apachectl -S
> > >
> > > [root@server2 conf]# apachectl -S VirtualHost configuration: *:443
> > > server2.us-west2-a.c.helpful-kingdom-220815.internal
> > > (/etc/httpd/conf.d/ssl.conf:56) ServerRoot: "/etc/httpd" Main
> > > DocumentRoot: "/var/www/html" Main ErrorLog:
> > > "/etc/httpd/logs/error_log" Mutex mpm-accept: using_defaults Mutex
> > > authdigest-opaque: using_defaults Mutex proxy-balancer-shm:
> > > using_defaults Mutex rewrite-map: using_defaults Mutex
> > > authdigest-client: using_defaults Mutex ssl-stapling:
> > > using_defaults Mutex proxy: using_defaults Mutex authn-socache:
> > > using_defaults Mutex ssl-cache: using_defaults Mutex default:
> > > dir="/run/httpd/" mechanism=default PidFile:
> > > "/run/httpd/httpd.pid" Define: _RH_HAS_HTTPPROTOCOLOPTIONS Define:
> > > DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="apache" id=48 Group:
> > > name="apache" id=48
> > >
> > > Looking forward to your thoughts.
> >
> > Try:
> >
> > $ apachectl -M
> >
> > I get something like this:
> >
> > Loaded Modules:
> >  core_module (static)
> >  log_config_module (static)
> >  logio_module (static)
> >  version_module (static)
> >  mpm_prefork_module (static)
> >  http_module (static)
> >  so_module (static)
> >  alias_module (shared)
> >  auth_basic_module 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-22 Thread Greg Huber
-Nov 21 18:32:37 server2 httpd[24339]: AH00526: Syntax error on line 63 of
-/etc/httpd/conf/httpd.conf:
-Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
-perhaps misspelled or defined by a module not included in the server
-configuration

Line 63?  possibly have not loaded mod_jk.so ?

To test config use :
apachectl configtest

List config:
apachectl -S


Don't change httpd.conf if possible.
>From my notes (this always works for me) :

Build mod_jk.so build
yum install httpd-devel
download tomcat-connectors-x.x.xx-src.tar.gz
extract and cd into the native folder
cd /opt/apache-tomcat/tomcat-connectors-x.x.xx-src/native
./configure --with-apxs=/usr/bin/apxs
make
copy file ./apache-2.0/mod_jk.so to /etc/httpd/modules
make clean
--
if you create a file /etc/httpd/conf.modules.d/10-my.conf (rather than
changing /etc/httpd/conf/httpd.conf)

/etc/httpd/conf.modules.d/10-my.conf:

LoadModule jk_module modules/mod_jk.so

--
if you create a file /etc/httpd/conf.d/my.conf (rather than changing
/etc/httpd/conf/httpd.conf)
/etc/httpd/conf.d/my.conf:



JkWorkersFile "/etc/httpd/conf.d/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"



ServerAdmin m...@www.me.com
DocumentRoot /var/www/html
ServerName www.me.com
ServerAlias me.com


Require all denied


Require all denied

...
JkMount  / worker1
JkMount  /* worker1
 ...





On Wed, 21 Nov 2018 at 18:41, Lou Wallace  wrote:

> Hey Greg,
>
> Thanks for the info. I changed both httpd.conf and workers.properties to
> your settings. Got the same error msg when I restarted httpd.
>
> When I checked journalist I get
>
> ● httpd.service - The Apache HTTP Server
>Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor
> preset: disabled)
>Active: failed (Result: exit-code) since Wed 2018-11-21 18:32:37 UTC;
> 3min 51s ago
>  Docs: man:httpd(8)
>man:apachectl(8)
>   Process: 24340 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited,
> status=1/FAILURE)
>   Process: 24339 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
> (code=exited, status=1/FAILURE)
>  Main PID: 24339 (code=exited, status=1/FAILURE)
> Nov 21 18:32:37 server2 systemd[1]: Starting The Apache HTTP Server...
> Nov 21 18:32:37 server2 httpd[24339]: AH00526: Syntax error on line 63 of
> /etc/httpd/conf/httpd.conf:
> Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
> perhaps misspelled or defined by a module not included in the server
> configuration
> Nov 21 18:32:37 server2 systemd[1]: httpd.service: main process exited,
> code=exited, status=1/FAILURE
> Nov 21 18:32:37 server2 kill[24340]: kill: cannot find process ""
> Nov 21 18:32:37 server2 systemd[1]: httpd.service: control process exited,
> code=exited status=1
> Nov 21 18:32:37 server2 systemd[1]: Failed to start The Apache HTTP Server.
> Nov 21 18:32:37 server2 systemd[1]: Unit httpd.service entered failed
> state.
> Nov 21 18:32:37 server2 systemd[1]: httpd.service failed.
>
>
>
> On Wed, Nov 21, 2018 at 11:31 AM Greg Huber  wrote:
>
> > For my centos/mod._jk I use :
> >
> > /etc/httpd/conf.d/my.conf :
> >
> > ...
> > JkWorkersFile "/etc/httpd/conf.d/workers.properties"
> > JkLogFile "/etc/httpd/logs/mod_jk.log"
> > JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> > 
> > JkMount  / worker1
> > JkMount  /* worker1
> > 
> >
> > workers.properties :
> > # Define 1 real worker using ajp13
> > worker.list=worker1
> > # Set properties for worker1 (ajp13)
> > worker.worker1.type=ajp13
> > worker.worker1.host=localhost
> > worker.worker1.port=8009
> > worker.worker1.socket_keepalive=1
> >
> >
> > On Wed, 21 Nov 2018 at 16:19, Lou Wallace 
> wrote:
> >
> > > Hi Everyone,
> > >
> > > So still having issues with mod_jk. I have downloaded
> > >
> > > wget
> > >
> > >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> > > wget
> > >
> > >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
> > >
> > > and make install, and everything seems fine
> > >
> > > I then edited the httpd.conf file and added
> > >
> > > LoadModule jk_module modules/mod_jk.so
> > >
> > > JkWorkersFile "/etc/httpd/conf/workers.

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Greg Huber
For my centos/mod._jk I use :

/etc/httpd/conf.d/my.conf :

...
JkWorkersFile "/etc/httpd/conf.d/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

JkMount  / worker1
JkMount  /* worker1


workers.properties :
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.socket_keepalive=1


On Wed, 21 Nov 2018 at 16:19, Lou Wallace  wrote:

> Hi Everyone,
>
> So still having issues with mod_jk. I have downloaded
>
> wget
>
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> wget
>
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
>
> and make install, and everything seems fine
>
> I then edited the httpd.conf file and added
>
> LoadModule jk_module modules/mod_jk.so
>
> JkWorkersFile "/etc/httpd/conf/workers.properties"
> JkLogFile "/var/log/mod_jk.log"
> JkLogLevel  info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
>
> then I edited workers.properties and added
>
> worker.list=app1,app2
>
> worker.app1.type=ajp13
> worker.app1.host=app1.example.com
> worker.app1.port=8201
> worker.app1.socket_timeout=10
>
> worker.app2.type=ajp13
> worker.app2.host=app2.example.com
> worker.app2.port=8201
> worker.app1.socket_timeout=10
>
> Then when I restart Apache using systemctl restart httpd I get
>
> Job for httpd.service failed because the control process exited with error
> code. See "systemctl status httpd.servic
> e" and "journalctl -xe" for details.
>
> So checking mod_jk log I see
>
> [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
>
> and the httpd log last entries are
>
> [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569] AH00170:
> caught SIGWINCH, shutting down gracefully
> [Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy
> enabled; httpd running as context system_u:system_r:httpd_t:s0
> [Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> [Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
> defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> [Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
> [Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
>
> I am not sure if the first 3 are connected to mod_jk, I included them for
> those who know far more then me (almost everyone I suspect) just in case
>
> And ideas, hints or thoughts?
>
> Thanks!
>
> Lou
>
> On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace 
> wrote:
>
> > Hi All,
> >
> > I am in need of some help in getting mod_jk installed on a new google
> > cloud server.
> >
> > Right now it has Apache, Tomcat, Java, mysql, perl and python installed.
> > But mod_jk isn't there.
> >
> > When I try yum install mod_jk it isn't found in any of the mirrors.
> >
> > I've been to the Tomcat site and when I try and get binaries or source it
> > sees I am on a windows pc and forces me to those directories.
> >
> > So, if someone can give me a simple set of commands to do this it would
> be
> > awesome. Also is there other tomcat connectors needed with java?
> >
> > Preferable it will be done from the ssh client on the cloud server.
> >
> > Thanks!
> >
> > Lou
> >
>


Re: mod_jk endpoints

2018-10-21 Thread Greg Huber
> So I'm using the 2016 1.2.40 version.

Think you have to build mod_jk to use the latest and greatest, this is what
I have in my notes (also from the website docs):

mod_jk.so build
yum install httpd-devel
download tomcat-connectors-x.x.xx-src.tar.gz
extract and cd into the native folder
cd /opt/apache-tomcat/tomcat-connectors-x.x.xx-src/native
./configure --with-apxs=/usr/bin/apxs
make
copy file ./apache-2.0/mod_jk.so to /etc/httpd/modules
make clean

(I only have a pretty much standard workers.properties so can't help much.)

On Sun, 21 Oct 2018 at 02:01, Jerry Malcolm  wrote:

> Thanks for the responses to my earlier post about websockets/JSPs.
> Http/2 is definitely the right answer for my issue there.
>
> HTTP/2 solved the problem with the throttling the multiple parallel
> requests with the browser connection limits.  But now opening that
> throttle has now exposed a different problem at the server.  Quick
> refresh I have an app that does not have many concurrent users at
> this time.  However it does periodically have a very large number of
> concurrent requests (AJAX/REST) from a single client.
>
> I now realize that with the browser limiting concurrent requests in
> HTTP/1.1, mod_jk was not getting overwhelmed.  But now that the
> floodgates have opened with HTTP/2, I realize that I have some serious
> configuration problems with mod_jk.  The requests are clogging up in
> mod_jk, timing out, and logging errors something like "cannot get
> endpoint for worker".  It then takes about 5 minutes for the clog to
> clear out before mod_jk is functional again for the other virtual hosts
> I'm hosting.
>
> Specifics... I'm using Apache 2.4.33, Tomcat 9.0.  I tried to download
> the latest mod_jk.so.  The latest mod_jk for httpd on the binaries
> download site is from 2016.  All the versions for the past 2 years are
> iis only... I assume that's ok???  So I'm using the 2016 1.2.40 version.
>
> My question is how do I increase the number of 'endpoints' that
> mod_jk has access to?  Is that a TC configuration or workers.properties
> setting?  I want to make sure mod_jk has enough resources/endpoints to
> pass (i.e.not 'block') all the requests it receives.  Once mod_jk is
> passing everything, I realize the flood might hit TC, and I may be back
> asking about increasing TC resources.  But for now, I just want to get
> mod_jk opened up.
>
> Thanks again.
>
> Jerry
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Weird problem: slow upload via Manager

2018-07-06 Thread Greg Huber
If you are not remote, can you just copy them to the IFS folder?

On 6 July 2018 at 00:23, James H. H. Lampert 
wrote:

> Earlier this week, on a customer AS/400 installation (Tomcat 7.0.67), we
> experienced the slowest WAR file upload we've ever encountered: several
> HOURS to install a roughly 100M WAR file (we customarily increase the
> max-file-size and max-request-size in manager/WEB-INF/web.xml from 50M to
> 500M). This on a system in which a 10M FTP download typically takes
> anywhere from 15 seconds to a minute or so.
>
> Has anybody ever heard of anything like this happening? Could there be
> something in the customer's firewall that's slowing down what Manager uses
> to transfer WAR files (I'm guessing either HTTP POST or PUT)?
>
> Any suggestions on alternate ways of getting WAR files onto the box?
>
> --
> James H. H. Lampert
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: How do we prevent directory access in apache

2018-05-29 Thread Greg Huber
In httpd.conf, uncomment: Options -Indexes -FollowSymLinks

Cheers Greg

On 29 May 2018 at 08:33, Olaf Kock  wrote:

> On 29.05.2018 05:07, Jins Raju Abraham wrote:
>
>> How do we prevent a directory access in apache. Tried searching this and
>> there are a lot of suggestion about doing it in the .htaccess file.
>>
>
> "Apache Tomcat" doesn't know about .htaccess files. "Apache httpd" does,
> but you won't get an answer related to it on the Tomcat mailing list.
>
> Tomcat doesn't display listings by default - search for "listing" in
> conf/web.xml where the default is documented and explicitly configured
>
> Olaf
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 9 ;jsessionid

2018-04-27 Thread Greg Huber
It was not the ;jsessionidxx, but changes to Spring StrictHttpFirewall, the
default config now does not allow some characters in the url :

   - Rejects URLs that are not normalized to avoid bypassing security
   constraints...
   - Rejects URLs that contain characters that are not printable ASCII
   characters.
   - Rejects URLs that contain semicolons.
   
<https://docs.spring.io/autorepo/docs/spring-security/4.2.x/apidocs/org/springframework/security/web/firewall/StrictHttpFirewall.html#setAllowSemicolon-boolean->
   - Rejects URLs that contain a URL encoded slash.
   
<https://docs.spring.io/autorepo/docs/spring-security/4.2.x/apidocs/org/springframework/security/web/firewall/StrictHttpFirewall.html#setAllowUrlEncodedSlash-boolean->
   - Rejects URLs that contain a backslash.
   
<https://docs.spring.io/autorepo/docs/spring-security/4.2.x/apidocs/org/springframework/security/web/firewall/StrictHttpFirewall.html#setAllowBackSlash-boolean->
   - Rejects URLs that contain a URL encoded percent.
   
<https://docs.spring.io/autorepo/docs/spring-security/4.2.x/apidocs/org/springframework/security/web/firewall/StrictHttpFirewall.html#setAllowUrlEncodedPercent-boolean->


26-Apr-2018 15:16:43.356 SEVERE [ajp-nio-8009-exec-2]
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
servlet [default] in context with path [] threw exception
 org.springframework.security.web.firewall.RequestRejectedException: The
request was rejected because the URL contained a potentially malicious
String ";"
at org.springframework.security.web.firewall.StrictHttpFirewall
.rejectedBlacklistedUrls(StrictHttpFirewall.java:265)
at org.springframework.security.web.firewall.StrictHttpFirewall
.getFirewalledRequest(StrictHttpFirewall.java:245)

Had to go with defaulting to COOKIE as
suggested, rather than overriding Spring defaults.

Cheers Greg


On 27 April 2018 at 13:23, Berneburg, Cris J. - US <cberneb...@caci.com>
wrote:

> Hi Greg
>
> -Original Message-
> From: Greg Huber [mailto:gregh3...@gmail.com]
> Sent: Thursday, April 26, 2018 4:53 AM
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: Tomcat 9 ;jsessionid
>
> > Hello,
> >
> > One thing I have noticed with Tomcat 9.0.x I get alot
> > ;jsessionid=xxx appended to my urls.  This did not happen with 8.5.x.
> >
> > /images/image_32x32.png;jsessionid=BF27C604B287CCF6DF3DBDB180C2CBEB
> >
> >  500 Internal Server Error
> >   /images/image_32x32.png;jsessionid= ... 23784378307846F: 1 Time(s)
> >   /images/image_32x32.png;jsessionid= ... 85D9B02C5A030FF: 1 Time(s)
> >
> > From previous experience this happens when there is no session.
> > I use struts and have used encode="false" on the tags to prevent this:
> >
> > 
> >
> > Also I have used (in the past) <%@ page session="false" %> but have
> > commented this out as it causes down stream problems for me.
> >
> > Would there be a reason why these has now started happening on 9?
> >
> > Cheers Greg
>
> A while ago we had problems in TC6 with new sessions being created for
> each image.  The issue was that there was an invalid character, underscore
> "_", in the URL.  I can't remember if Internet Explorer was acting
> weird(er) or if that was expected TC behavior for an invalid URL.
>
> Also, Chris Shultz mentioned that jsessionid appended to the URL can mean
> that cookies are not being used.
>
> Might your problem be more than one issue combined?
>
> --
> Cris Berneburg
> CACI Lead Software Engineer
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 9 ;jsessionid

2018-04-26 Thread Greg Huber
Chris,

>As for your image URLs failing due to those path parameters... why are
>they failing? Which component is generating those HTTP 500 responses?


​I did some more investigation and my app would not display the image with
the ;

http://www.myapp.co.uk/images/image_32x32.png;jsessionid=52FC7E289A9BDAB18ABBBE7D1C5CC85A
​


26-Apr-2018 15:16:43.356 SEVERE [ajp-nio-8009-exec-2]
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for
servlet [default] in context with path [] threw exception
 org.springframework.security.web.firewall.RequestRejectedException: The
request was rejected because the URL contained a potentially malicious
String ";"
at
org.springframework.security.web.firewall.StrictHttpFirewall.rejectedBlacklistedUrls(StrictHttpFirewall.java:265)
at
org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:245)


Something in spring security blocking the ; in the URL.

I will go back to 8.5.x to see if I still get the ;jsession on the URL's,
my thinking is probably always did have the jsessionid but they were not
blocked by spring security.

Cheers Greg



On 26 April 2018 at 14:11, Christopher Schultz <ch...@christopherschultz.net
> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 4/26/18 4:53 AM, Greg Huber wrote:
> > Hello,
> >
> > One thing I have noticed with Tomcat 9.0.x I get alot
> > ;jsessionid=xxx appended to my urls.  This did not happen with
> > 8.5.x.
> >
> > /images/image_32x32.png;jsessionid=BF27C604B287CCF6DF3DBDB180C2CBEB
> >
> >  500 Internal Server Error /images/image_32x32.png;jsessionid= ...
> > 23784378307846F: 1 Time(s) /images/image_32x32.png;jsessionid= ...
> > 85D9B02C5A030FF: 1 Time(s)
> >
> >
> >> From previous experience this happens when there is no session.
> >> I use
> > struts and have used encode="false" on the tags to prevent this:
> >
> > 
> >
> > Also I have used (in the past) <%@ page session="false" %> but
> > have commented this out as it causes down stream problems for me.
> >
> > Would there be a reason why these has now started happening on 9?
>
> I'm not sure about why Tomcat 9 specifically might be doing this if
> Tomcat <9 didn't, but this happens when:
>
> 1. An unauthenticated user makes a request
> 2. There was no session-id in the request
> 3. The server decided to create a session
> 4. The server can't prove that cookies are supported by the client
>
> When all those things happen, all URLs (when "encoded") should contain
> ";jsessionid=" path parameters because the client might not accept the
> Set-Cookie response header.
>
> You can explicitly disable URL-based session-tracking if you'd like in
> WEB-INF/web.xml:
>
>   
> COOKIE
>   
>
> This will of course require cookies. I'm not sure if that's okay for you
> .
>
> As for your image URLs failing due to those path parameters... why are
> they failing? Which component is generating those HTTP 500 responses?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrh0AMACgkQHPApP6U8
> pFgxbw//dyJKCTcfaHSIsFWC1VbPbe3glKZhq9iKROiJZohtc4+muXL00uwNA7tv
> SyX9B2WcknHInEO1jmN0aXdiTs8mri1iqJsLYyomwCWsyMlD0Ekkwk8C6BHdHVbv
> HExzFmQ0sChs6X37SYUpdbW8LMe/9g8aGgY4EbpTT7jzMk6cq+iXqLIpQEpbCFLX
> VnBY+8HJtKN7Asernrb44ZVrHhdVAv+jT8CcNMw96K2sMKm1fXYXqI1WD7Gx3sDO
> uQyb17mVNepK/6qnaJ6F6a3Rzmwf1+CDzi+LRtpX39/8ebkT1gC+8dpFZ2wrOb7P
> n1Gx+fEhoYS6g2F+ytcpJaKVId1s5AEJCWQoF+WkWdc+XN7qR2HBPGuYX0hh7KxQ
> 01+LSrN88j5GXvtFnFIzcMCrpUg1q7BVnLVVItusuDSbRJFBTt899ekYH1xfe/Vu
> TVuK4K6fSZPGw3vK7JxkYK0I7mjZrNonyqjDvr2mBcwrK2u98EnhuctwLYvF9ilt
> DGEb3prZHvr7cjceSJ/MAoff7OU/ZAnuCGYhRxpb1DHsVAaSMyxa3gqOMy025WHh
> WviCRORP/sru1YRvd33eS1ZhEtawcTpmP7meyDSTRSBI6tf61Gmw7tIr/vnQL4YJ
> Z/IaXFgjQJR57bxjG/G+/4xyDe3VB6W8V73tymC6l6mWYfwtGH4=
> =xqYE
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Tomcat 9 ;jsessionid

2018-04-26 Thread Greg Huber
Hello,

One thing I have noticed with Tomcat 9.0.x I get alot  ;jsessionid=xxx
appended to my urls.  This did not happen with 8.5.x.

/images/image_32x32.png;jsessionid=BF27C604B287CCF6DF3DBDB180C2CBEB

  500 Internal Server Error
   /images/image_32x32.png;jsessionid= ... 23784378307846F: 1 Time(s)
   /images/image_32x32.png;jsessionid= ... 85D9B02C5A030FF: 1 Time(s)


>From previous experience this happens when there is no session.  I use
struts and have used encode="false" on the tags to prevent this:



Also I have used (in the past) <%@ page session="false" %> but have
commented this out as it causes down stream problems for me.

Would there be a reason why these has now started happening on 9?

Cheers Greg


Tomcat 9 empty log files

2018-04-12 Thread Greg Huber
Hello,

For my tomcat 9 there are now two additional log files (which are always
empty) :

host-manager.2018-04-11.log
manager.2018-04-11.log

Where do these come from as my webapps directory is empty and does not have
any applications?

Cheers Greg


Re: Instances of org.apache.coyote.RequestInfo accumulate in RequestGroupInfo.processors and eventually result in OOME

2018-03-01 Thread Greg Huber
I found tomcat was being killed randomly by oom when it should have been
the virus scanner stuff, I had to reduce the threads as it was consuming
too much memory.

/etc/clamd.d/scan.conf

#MaxThreads 20
MaxThreads 5

I found this by monitoring the output from 'top' command.

Cheers Greg

On 1 March 2018 at 11:10, Industrious  wrote:

> Dear All,
>
> In case it is a duplicate I am sorry I had to send this message again
> because it seems it has not arrived to anybody and I have not got in
> my inbox too though it appeared in online archives.
>
> I am running Tomcat 8 on Ubuntu. After a few days of running
> successfully my Tomcat's JVM crashes or becomes absolutely
> unresponsive because of OOME errors similar to this in catalina.out:
> --- cut ---
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space
> SEVERE:Memory usage is low, parachute is non existent, your system may
> start failing.
> java.lang.OutOfMemoryError: Java heap space: failed reallocation of
> scalar replaced objects
>
> Exception: java.lang.OutOfMemoryError thrown from the
> UncaughtExceptionHandler in thread "http-nio-80-exec-2"
> --- cut ---
>
> I was using a VM with 600MB of RAM. Soon I started having problems
> when Linux was killing Tomcat (OOM killer) as it considered its JVM as
> a candidate for killing or if I specify a lower maximum heap size I
> would eventually get OOME from JVM. I moved to a VM with 1.7GB of RAM
> but the problem still occurs eventually though a bit later than on the
> 600MB VM because I somewhat increased the maximum heap size.
>
> It is strange because my webapp used to run fine on Openshift 512MB
> memory VM though it was JRE 1.7 and Tomcat 7. I did not make any
> considerable changes to server.xml (with the exception of those
> necessary to use Tomcat 8) or app itself, I attach my server.xml too.
>
> I have read Tomcat's FAQ, Wiki pages and searched mailing lists but
> nothing seems to fit my case.
>
> I would accept the fact that my application has a memory leak problem
> but it is absolutely unclear from this picture that it has one.
>
> I have tried using Eclipse MAT to analyze memory dumps and to see what
> might be causing this and it turned out that the majority of heap >
> 75% is occupied by RequestInfo instances. I would be really grateful
> if someone could tell me what might be happening there.
>
> Looking forward to your reply.
>
> Best regards,
> Ivan
>
> 
> =
> My current environment:
> VM with 1 CPU which has 1.7GB RAM
>
> Tomcat 8.0.32 (8.0.32-1ubuntu1.5) on Ubuntu 16.04.1.
>
> $ java -version
> openjdk version "1.8.0_151"
> OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.
> 16.04.2-b12)
> OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
>
> $ less /var/lib/tomcat8/bin/setenv.sh
> JAVA_OPTS="-Dlog4j.logging.dir=$CATALINA_BASE/logs \
> -Dlogging.dir=$CATALINA_BASE/logs \
> -Djava.awt.headless=true \
> -Xms220M \
> -Xmx220M \
> -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider \
> -Djava.security.egd=file:/dev/./urandom \
> -XX:+HeapDumpOnOutOfMemoryError \
> -XX:HeapDumpPath=$CATALINA_BASE/logs/java_pid%p.hprof"
>
>
> Eclipse MAT report
> --
> 1,121 instances of "org.apache.coyote.RequestInfo", loaded by
> "java.net.URLClassLoader @ 0xf7202b18" occupy 170,358,720 (77.39%)
> bytes. These instances are referenced from one instance of
> "java.lang.Object[]", loaded by "" - 199MB out of
> 209MB
>
> server.xml
> --
> 
> 
>/>
>
>minimumUmask="" />
>SSLEngine="on" />
>/>
>/>
>/>
>
>   
>
>  maxThreads="20" minSpareThreads="4"/>
>
> connectionTimeout="3000"
>redirectPort="443" executor="tomcatThreadPool" />
>
> maxThreads="150" SSLEnabled="true" scheme="https"
> secure="true"
>clientAuth="false" sslProtocol="TLS"
> executor="tomcatThreadPool"
>KeystoreFile="***" KeystorePass="***"/>
>
> 
>
>unpackWARs="true" autoDeploy="true">
>
>  protocolHeader="x-forwarded-proto" >
>
>
> 
>  directory="logs"
>prefix="localhost_access_log." suffix=".log"
> requestAttributesEnabled="true"
>   

Fwd: logging on shutdown

2018-01-23 Thread Greg Huber
The log4j2 Log4jServletContextListener contextDestroyed seems to be
shutting down first, before my stuff, hence no logging.  Will look into
this, more a log4j2 issue.

Cheers Greg

-- Forwarded message --

Subject: logging on shutdown
To: Tomcat Users List 


Hello,

I tried the latest version 9.0.4,  one thing I have noticed that it does
not log any output when I shut down the server.  Also Rechecking version
8.5.24 and also now does not log any output.

The server is shutting down correctly as its calling my context finalise
listener contextDestroyed() and cleaning up search lock files etc.

My logging is working as I can see the startup messages. I have a basic
install with no changes to conf dir files.

Any ideas?

Cheers Greg


logging on shutdown

2018-01-23 Thread Greg Huber
Hello,

I tried the latest version 9.0.4,  one thing I have noticed that it does
not log any output when I shut down the server.  Also Rechecking version
8.5.24 and also now does not log any output.

The server is shutting down correctly as its calling my context finalise
listener contextDestroyed() and cleaning up search lock files etc.

My logging is working as I can see the startup messages. I have a basic
install with no changes to conf dir files.

Any ideas?

Cheers Greg


Re: Ajp Nio-thread stuck in loop and consuming a lot of cpu

2018-01-18 Thread Greg Huber
Following this thread, I run the same setup, apache/mod_jk/ tomcat.  There
was a problem a while back where the cpu went to max for me,  as my server
is slow and thread blocking more of a possibility.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58151

Although this was in version 8.0.23, are you sure your using 8.0.47 jars?

Cheers Greg


On 18 January 2018 at 13:45, Rainer Jung  wrote:

> Just an addition to one of Mark's questions:
>
> Am 17.01.2018 um 22:20 schrieb Mark Thomas:
>
>> Is it always the same threads generating the load or does it move
>> between threads?
>>
>
> Just in case Andreas is not aware: one can check with "top -H -p ".
>
> Using -H lets top show one line per thread instead of one line per
> process. That way you can easily see CPU use per thread. The "-p "
> would simply filter to only show the threads in your java process (by using
> for  the process ID of your Tomcat java process).
>
> Furthermore the PID column in "top -H" does not actually show the PID, but
> instead the thread IDs. If you convert that decimal numbers to hex, e.g.
> using the shell commandline
>
> printf "0x%x\n" 
>
> (and replacing  by the respective thread id of the lines that show
> high CPU usage), you get a hex number that will point you to the respective
> thread in the java thread dump by looking for tid=0x... in the thread
> header lines. The association between operating system thread number as
> shown in "top -H" and the tid in the Java thread dump does is stable during
> the lifetime of the process.
>
> Regards,
>
> Rainer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Service killed by signal 9

2017-11-11 Thread Greg Huber
Coty,

I will try and set it back to 256k, I am using centos 7 on the latest
kernel.

It is an older PC and has 4gb of memory but only reports 3gb.

I can see from top that the memory is not good (gkreallm reports 800mb free)

top - 08:35:40 up  2:25,  1 user,  load average: 0.50, 0.18, 0.14
Tasks: 258 total,   1 running, 257 sleeping,   0 stopped,   0 zombie
%Cpu(s): 13.4 us,  2.2 sy,  0.0 ni, 84.1 id,  0.2 wa,  0.0 hi,  0.2 si,
0.0 st
KiB Mem :  3036956 total,   236104 free,  2216104 used,   584748 buff/cache
KiB Swap:  2113532 total,  1912644 free,   200888 used.   516460 avail Mem

 PID  USER  PR  NI  VIRT   RES   SHR S  %CPU %MEM  TIME+   COMMAND
 1292 user20   03435632 476088   6560 S   0.3 15.7
4:43.96  jsvc

Cheers Greg


On 10 November 2017 at 15:06, Coty Sutherland <csuth...@redhat.com> wrote:

> On Fri, Nov 10, 2017 at 4:31 AM, Greg Huber <gregh3...@gmail.com> wrote:
> > Since switching to jsvc, randomly I am getting tomcat restarting, looking
> > at the logs I see that the jsvc is using alot of memory total-vm:  and
> > being killed by the system.
> >
> > Nov  9 13:11:11 prodbox kernel: Out of memory: Kill process 1287 (jsvc)
> > score 121 or sacrifice child
> > Nov  9 13:11:11 prodbox kernel: Killed process 1287 (jsvc)
> > total-vm:3453120kB, anon-rss:378280kB, file-rss:0kB, shmem-rss:0kB
> >
> > I am using the below on properties on the startup (from previous version
> > statup scripts):
> >
> > -Xms256M -Xmx768m -Xss1280k -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500
> > -XX:GCTimeRatio=9 -server -XX:+DisableExplicitGC
> >
> > (I replaced -Xss256k with -Xss1280k to stop crashing see
> > https://issues.apache.org/jira/browse/DAEMON-365)
>
> The root cause for that broke a lot of things, so I imagine your OS
> has fixed the kernel problem by now. If you tell me which OS I can try
> and see if it's fixed for you. I'd suggest that you try reducing your
> Xss back to 256k and see if that shrinks your process size enough to
> keep it off of oom-killer's radar.
>
> > Is there a way to limit the total-vm or find out why its got so big?
> > -XX:+DisableExplicitGC ??
> >
> > Standard tomcat install with apache/modjk.
> >
> > Cheers Greg
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Service killed by signal 9

2017-11-10 Thread Greg Huber
Since switching to jsvc, randomly I am getting tomcat restarting, looking
at the logs I see that the jsvc is using alot of memory total-vm:  and
being killed by the system.

Nov  9 13:11:11 prodbox kernel: Out of memory: Kill process 1287 (jsvc)
score 121 or sacrifice child
Nov  9 13:11:11 prodbox kernel: Killed process 1287 (jsvc)
total-vm:3453120kB, anon-rss:378280kB, file-rss:0kB, shmem-rss:0kB

I am using the below on properties on the startup (from previous version
statup scripts):

-Xms256M -Xmx768m -Xss1280k -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500
-XX:GCTimeRatio=9 -server -XX:+DisableExplicitGC

(I replaced -Xss256k with -Xss1280k to stop crashing see
https://issues.apache.org/jira/browse/DAEMON-365)

Is there a way to limit the total-vm or find out why its got so big?
-XX:+DisableExplicitGC ??

Standard tomcat install with apache/modjk.
​
Cheers Greg


Re: Apache Tomcat 4.1.30 - not working with OS400 after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-14 Thread Greg Huber
Think 1.7.0 this is the wrong version for tomcat 4.  It is failing on a
missing dtd, possibly a symptom of switching to a later JDK.  If you still
have an older version of java installed, you could try and modify the
controlling CL program and replace the environment variable JAVA_HOME to
the older JDK home.


ADDENVVAR ENVVAR(JAVA_HOME)
VALUE('/QOpenSys/QIBM/ProdData/JavaVM/..jdk4../')  REPLACE(*YES)


See:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/cl/addenvvar.htm

I set these to variables to level(*JOB), but the docks suggest use
replace(*yes).

(If you work with the job, you can find cl program name/library and from
the program you can find the source of the cl program.)

If you do not have a v1.4, I guess you will have to bump the tomcat version.

Cheers Greg.





On 13 September 2017 at 16:41, Vinay A S <vinayas.s...@gmail.com> wrote:

> Hello,
>
> When we run java -version in QSH, we got the below results.
>
> java
> -version
>
> java version
> "1.7.0"
>
> Java(TM) SE Runtime Environment (build pap6470sr10fp5-20170421_01(SR10
> FP5))
> IBM J9 VM (build 2.6, JRE 1.7.0 OS/400 ppc64-64 Compressed References
> jvmap6470sr10fp5-20170421_01_cr (JIT enabled, AOT enabled)
> J9VM -
> R26_Java726_SR10_20170407_0035_B343227
>
> JIT  -
> r11_20170407_343227
>
> GC   -
> R26_Java726_SR10_20170407_0035_B343227_CMPRSS
>
> J9CL -
> 20170407_343227)
>
> JCL - 20170420_01 based on Oracle
> jdk7u141-b11
>
> $
>
>
>
> And JAVA_HOME is pointing to '/QOpenSys/QIBM/ProdData/JavaVM/jdk70/64bit'
>
> I hope it is pointing to right data.
>
> On Fri, Sep 8, 2017 at 8:31 PM, Greg Huber <gregh3...@gmail.com> wrote:
>
> > Do you know where the JAVA_HOME points to?  Maybe it has switched to a
> > later java version in the upgrade.
> >
> > From memory (it's been a while)
> >
> > If you do wrkenvvar (F4) and select *SYS and scroll for the JAVA_HOME.
> >
> >
> > or STRQSH  and run java -version will also display the version.
> >
> >
> >
> >
> > On 8 September 2017 at 14:25, Vinay A S <vinayas.s...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Below error messages are recorded in the log txt files. Please find the
> > > details.
> > >
> > > Aug 23, 2017 9:36:32 AM org.apache.coyote.http11.Http11Protocol
> > > init
> > > INFO: Initializing Coyote HTTP/1.1 on port
> > > 8180
> > > Starting service
> > > Tomcat-Standalone
> > >
> > > Apache
> > > Tomcat/4.1.30
> > >
> > > Aug 23, 2017 9:36:33 AM org.apache.commons.digester.Digester
> > > error
> > > SEVERE: Parse Error at line 21 column 19: Document root element
> > "web-app",
> > > must match DOCTYPE root "null".
> > > org.xml.sax.SAXParseException: Document root element "web-app", must
> > match
> > > DOCTYPE root "null".
> > >  at
> > > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(
> > Unknown
> > > Source)
> > >  at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
> > > Source)
> > >  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> > > Source)
> > >  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> > > Source)
> > >  at org.apache.xerces.impl.dtd.XMLDTDValidator.
> > > rootElementSpecified(Unknown
> > > Source)
> > >  at org.apache.xerces.impl.dtd.XMLDTDValidator.
> > handleStartElement(Unknown
> > > Source)
> > >  at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
> > > Source)
> > >  at
> > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > > .scanStartElement(Unknown
> > > Source)
> > >  at
> > > org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.
> > > scanRootElementHook(Unknown
> > > Source)
> > >  at
> > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > > $FragmentContentDispatcher.dispatch(Unknown
> > > Source)
> > >  at
> > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > .scanDocument(Unknown
> > > Source)
> > > at
> > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > .scanDocument(Unknown
> > > Source)
> > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> > > Source)
> > > at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > > Source)
> > > at org.apache.xerces.pa

Re: Apache Tomcat 4.1.30 - not working with OS400 after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-08 Thread Greg Huber
g class:
> javax/servlet/Servlet.class
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 21 column 19: Document root element "web-app",
> must match DOCTYPE root
> "null".
>
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 21 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>  at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 17: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 17: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 7 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 7 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 7 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 7 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document root element "taglib",
> must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "taglib", must match
> DOCTYPE root "null".
>
> Aug 23, 2017 9:36:49 AM org.apache.commons.digester.Digester
> error
> SEVERE: Parse Error at line 6 column 19: Document is invalid: no grammar
> found.
> org.xml.sax.SAXParseException: Document is invalid: no grammar
> found.
>
> Aug 23, 2017 9:36:50 AM org.apache.struts.util.PropertyMessageResources
> 
> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> returnNull=true
> Aug 23, 2017 9:36:50 AM org.apache.struts.util.Prop

Re: Apache Tomcat 4.1.30 - not working with OS400 after upgrading the OS to V7R3 which uses Java 7/Java 8

2017-09-08 Thread Greg Huber
Java 1.4 should still be available, check your software resources and 5761-JV1
options and the environment variable JAVA_HOME.

https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzaha/rzahainstalljdk.htm



On 7 September 2017 at 15:56, André Warnier (tomcat)  wrote:

> On 07.09.2017 16:21, Vinay A S wrote:
>
>> Hello,
>>
>> We have installed Apache Tomcat version 4.1.30 on our iSeries server.
>>
>
> I don't even know what to tell you. Some of the people on this list may
> not even have been born yet, when that version was released.
>
> (Ok, I am pushing it a bit; it was 2004, 13 years ago; so they may have
> been born, but still in primary school)
>
> Recently we have upgraded the OS400 Operating System from Version 7.1 to
>> 7.3 where Java 7 and Java 8 are introduced. After this upgrade, Tomcat is
>> giving an HTTP status 500 exception report.
>>
>
> I don't know if anyone here will be able to help, with such an old version
> of Tomcat. But in any case, an error 500 should be reflected in the tomcat
> logfiles.
> Just in case, please view the logfile at the time of that error, and copy
> and paste the relevant part here. (Do not send it as attachment, really
> copy and paste it in your email)
>
>
>> We explored the Tomcat portal and found that we are running Tomcat on a
>> lower version and that needs to be upgraded.
>>
>
> No kidding..
>
>  But we are unable to find the
>
>> exact procedure to install Tomcat on iSeries server.
>>
>> There is a subsystem TOMCAT running on the system with Job QP0ZSPWT being
>> Active.
>>
>> Please advise on the version of TOMCAT that needs to be installed on the
>> system as well the procedure to install it.
>>
>>
> I believe that this is a question that you should ask to your system
> support people (or IBM). This list here focuses on tomcat, as per
> http://tomcat.apache.org.
> The current version is 8.5, which requires at least a Java 7 JVM.
>
> Tomcat per se is Java code, and will run on any platform that has an
> appropriate JVM available.
> Installing Tomcat on any platform however, is more the resort of the
> package managers of the corresponding platforms/OS'es.
>
> First find out which version of Java is available/installed on your
> platform.
> Then consult this page : http://tomcat.apache.org/whichversion.html
> to determine which version of Tomcat is appropriate (the higher, the
> better)
>
> Once you have done this, there are further instructions in each version's
> documentation, that outline the installation. For example, for tomcat 8.5,
> here :
> http://tomcat.apache.org/tomcat-8.5-doc/setup.html
>
> The above concerns the tomcat which you would download from
> tomcat.apache.org.
> But in all likelihood, there are special pre-packaged tomcat versions
> available for your specific platform, which might simplify this.
> But this, you need to ask your sysadmins.
>
> Note that there are not really "tomcat upgrade" procedures for upgrading
> your tomcat 4.1 to 8.5.  You will need to install the new tomcat
> (preferably somewhere else than the old one), and then move your
> applications one by one from the old to the new.
> If you are reasonably lucky, they might still work unchanged.
> But do not move the old tomcat settings, to the new one. That will not
> work, and will create a mess. Find out what you might need to change in the
> new standard settings, and do it there (after making a backup).
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Struts Vulnerability

2017-09-07 Thread Greg Huber
>2) Does Apache Struts only run on Apache Webserver and Tomcat?

Should run on java based servers Glassfish, Websphere etc

>3) Is there a simple way to determine if a server has Struts installed,
>instead of logging into each of the servers and checking the programs
>list?

You could try and execute a struts action ie test.action on the server, if
struts is there it will reply:

There is no Action mapped for namespace [/] and action name [test]
associated with context path [].

..but it depends on how the server is setup and how it deals with the 404's.

Alternatively Look for a jar struts.x.x.x.jar or struts2-core-x.x.x.jar in
the lib directory of tomcat.

Struts1 is EOL, Struts2 struts2-core-2.5.13.jar

Look at the struts website for security bulletins etc
https://struts.apache.org/


On 7 September 2017 at 00:18, Sean Son 
wrote:

> Hello all
>
> I am new to the mailing list as well as new to Apache Struts.  We all heard
> in the news about the vulnerability affecting Apache Struts. I have been
> tasked to determine which of our servers have Struts running on them.  I
> have a few questions on how to determine if a server is running Struts or
> not:
>
> 1) How does one determine if a Windows server, running IIS, has the Apache
> Struts framework installed on it?
>
> 2) Does Apache Struts only run on Apache Webserver and Tomcat?
>
> 3) Is there a simple way to determine if a server has Struts installed,
> instead of logging into each of the servers and checking the programs list?
>
>
> I appreciate ALL help!
>


Re: tomcat 8.5.16 silent exit without any error logs on ubuntu 16.04.2

2017-07-07 Thread Greg Huber
Check /tmp for any dumps,  hs_err_pid.log if there is a jdk issue.

Sometimes jsvc restarts for me :

V  [libjvm.so+0x98f752]  oopDesc*
PSPromotionManager::copy_to_survivor_space(oopDesc*)+0x162


On 7 July 2017 at 02:22, 李员外 <281170...@qq.com> wrote:

> Will try that. The RAM of machine is 8 GigaByte, 4-core CPU, even if
> silent exit is caused by Insufficient  memory, at least, tomcat would
> record error info to log file, right?
>
>
> Thanks in advance!
> --
> 做自己
>
>
>
>
>
>
>
> -- 原始邮件 --
> 发件人: "Guang Chao";;
> 发送时间: 2017年7月7日(星期五) 上午8:26
> 收件人: "Tomcat Users List";
>
> 主题: Re: tomcat 8.5.16 silent exit without any error logs on ubuntu 16.04.2
>
>
>
> How much RAM your hardware have?  Have you tried installing Tomcat from
> download and make it  a service through your own init scripts?  (E.g.
> https://gist.github.com/miglen/5590986)
>
> On Fri, Jul 7, 2017 at 12:40 AM, 李员外 <281170...@qq.com> wrote:
>
> > Hi, guys
> >
> >
> > I use tomcat 8.5.16, and I found at least 5 times tomcat silent exit
> > without any error logs after keep running 2-3 days, that means
> catalina.out
> > has no error info located in /opt/apache-tomcat-8.5.16/logs/.
> > And application log file also has no error info.
> > I do not know why? How should I to find out reason?
> >
> >
> > Please help me!
> > Thanks in advance!
> >
> >
> >
> >
> > --
> > 做自己
>
>
>
>
> --
> Guang 


Re: security-constraint blocks welcome file with 403

2017-06-20 Thread Greg Huber
Marks,

Thanks for the info, originally I was using just index.jsp, but this also
gets blocked with a 403:

index.jsp

I will look into the servlet suggestion.

Cheers Greg

On 19 June 2017 at 10:39, Mark Thomas <ma...@apache.org> wrote:

> On 19/06/17 08:24, Greg Huber wrote:
> > Hello,
> >
> > If I add a security constrait to block direct access to jsp outside of
> > /WEB-INF/ it blocks the welcome-file with a 403.  Is there a caveat for
> > using this here?
>
> Your welcome file is invalid. It should be a file name without a path.
> Remember it applies to all directories, not just the web application root.
>
> Security constraints apply to welcome files.
>
> You'll need to use a servlet to do a forward to "WEB-INF/jsps/index.jsp"
>
> Mark
>
>
> >
> > 
> >  
> >  No direct JSP access
> >  
> >  No-JSP
> >  *.jsp
> >  
> >  
> >  no-users
> >  
> >  
> >
> >  
> >  Don't assign users to this role
> >  no-users
> >  
> >
> >  
> >  WEB-INF/jsps/index.jsp
> >  
> >
> > Cheers Greg
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


security-constraint blocks welcome file with 403

2017-06-19 Thread Greg Huber
Hello,

If I add a security constrait to block direct access to jsp outside of
/WEB-INF/ it blocks the welcome-file with a 403.  Is there a caveat for
using this here?


 
 No direct JSP access
 
 No-JSP
 *.jsp
 
 
 no-users
 
 

 
 Don't assign users to this role
 no-users
 

 
 WEB-INF/jsps/index.jsp
 

Cheers Greg


Re: Error 404 - The requested resource is not available

2017-01-12 Thread Greg Huber
Check in the apache-tomcat-x.x.x/logs for any
 errors in catalina.out or yourapp.log files.



On 12 January 2017 at 06:19, fonsin2008 .  wrote:

> Hi!
>
> The url is: http://somehost/evaluacion/login_formaLogin.action
>
> The problem is that it used to run without problems.
>
> 2017-01-11 19:50 GMT-06:00 Tim Watts :
> > On Wed, 2017-01-11 at 15:49 -0600, fonsin2008 . wrote:
> >> Hi all!
> >>
> >> First, I need to say that I'm new(ignorant) with Tomcat. One of our
> >> systems is written with tomcat, but today something went wrong and the
> >> following error appears on the webpage:
> >>
> >> --Estado HTTP 404 - /evaluacion/WEB-INF/pages/login/forma_login.jsp
> >> --__
> >> --type Informe de estado
> >> --mensaje /evaluacion/WEB-INF/pages/login/forma_login.jsp
> >> --descripción El recurso requerido no está disponible.
> >> --
> >> --Apache Tomcat/6.0.37
> >>
> >> The file exists on the virtualserver, at
> >>
> >> home/desarrollo/produccioncbi/virtualhost/cbi_desarrollo/
> evaluacion/WEB-INF/pages/login
> >>
> >> And:
> >> ls -l
> >> -rw-r--r-- 1  desarrollo 3744 feb 11  2015 forma_login.jsp
> >>
> >> the evaluacion.war file lives at
> >> /home/desarrollo/produccioncbi/virtualhost/cbi_desarrollo
> >>
> >> And in /WEB-INF/classes/struts.xm I found:
> >> ./WEB-INF/classes/struts.xml:   >> name="forma_login">/WEB-INF/pages/login/forma_login.jsp
> >>
> >> So, I can't figure out why this error appears. May be I'm missing
> >> something obvious. I also googled it, but I only found permission
> >> errors and wrong paths.
> >>
> >> If you need some additional information, feel free to ask.
> >>
> >
> > What URL was used to produce the error message?
> >
> > Since you're unfamiliar with Tomcat, and presumably Servlet based web
> > applications, you need to know that /WEB-INF and anything below it is
> > inaccessible outside the web app; it's only accessible from within the
> > web app.  So if you issued a URL like:
> >
> > http://some-host/evaluacion/WEB-INF/pages/login/forma_login.jsp
> >
> > You will unsurprisingly get the 404 error.
> >
> > If this is the case then your task is to learn more about the specifics
> > of your application and what the proper login URL is.  Looks like it's
> > built with Struts so you may need to learn about that -- starting with
> > what version was used.
> >
> > -- Tim.
> >
> >
> >> Thank you guys for your time!
> >>
> >> Jesus Mager
> >> [www.h1n1-al.blogspot.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
> >
>
>
>
> --
> Jesus Mager
> [www.h1n1-al.blogspot.com]
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Upgrade to 8.5.8/9

2016-12-27 Thread Greg Huber
Since switching to commons-dbcp2 now seems to start OK (so far) which prior
would have definitely hung.  Fingers crossed.

>You get complaints about the APR library not being
> installed? Yeah, just comment-out the
> APRLifecycleListener in conf/server.xml.

So using the native connector won't improve the performance?  I use https
but through Apache.  The docs say:

These features allows making Tomcat a general purpose webserver, will
enable much better integration with other native web technologies, and
overall make Java much more viable as a full fledged webserver platform
rather than simply a backend focused technology.

So this does not apply when using mod_jk?  It would save having to keep
compiling the tomcat-native also.

Cheers Greg


On 19 December 2016 at 18:11, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 12/19/16 4:47 AM, Greg Huber wrote:
> > I am currently running tomcat 8.0.32 and have tried to upgrade to
> > 8.5.8 and 8.5.9 without success.  I use mod_jk to connect apache to
> > tomcat running on centos 5.11 with Apache 2.2.3.
> >
> > I have installed openSSL 1.0.2.j to compile the native
> > tomcat-native-1.2.10 using apr-1.5.2 and tomcat-connectors-1.2.42
> > for the mod_jk.
>
> If you are using httpd + mod_jk, why are you bothering with APR and
> tcnative on the Tomcat side?
>
> > The problem is that tomcat seems to start but fails sometimes to
> > connect correctly to apache and causes apache to hang.  If I stop
> > tomcat, apache starts working again.  I have been through the logs
> > with little indication of the problem.  If I revet back to 8.0.32
> > everything works OK.
>
> What if you use the NIO connector instead of APR?
>
> > All I can find is this in the mod_jk.log:
> >
> >
> > [Sat Dec 17 06:11:48 2016][3212:47280261211024] [info]
> > init_jk::mod_jk.c (3595): mod_jk/1.2.42 initialized [Sat Dec 17
> > 06:11:50 2016][3254:47280261211024] [info]
> > jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009
> > failed (errno=111) [Sat Dec 17 06:11:50 2016][3254:47280261211024]
> > [info] ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1)
> > Failed opening socket to (127.0.0.1:8009) (errno=111) [Sat Dec 17
> > 06:11:50 2016][3254:47280261211024] [error]
> > ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to
> > backend failed. Tomcat is probably not started or is listening on
> > the wrong port (errno=111) [Sat Dec 17 06:11:50
> > 2016][3254:47280261211024] [info] ajp_service::jk_ajp_common.c
> > (2778): (worker1) sending request to tomcat failed (recoverable),
> > because of error during request sending (attempt=1) [Sat Dec 17
> > 06:11:50 2016][3254:47280261211024] [info]
> > jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009
> > failed (errno=111) [Sat Dec 17 06:11:50 2016][3254:47280261211024]
> > [info] ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1)
> > Failed opening socket to (127.0.0.1:8009) (errno=111) [Sat Dec 17
> > 06:11:50 2016][3254:47280261211024] [error]
> > ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to
> > backend failed. Tomcat is probably not started or is listening on
> > the wrong port (errno=111) [Sat Dec 17 06:11:50
> > 2016][3254:47280261211024] [info] ajp_service::jk_ajp_common.c
> > (2778): (worker1) sending request to tomcat failed (recoverable),
> > because of error during request sending (attempt=2) [Sat Dec 17
> > 06:11:50 2016][3254:47280261211024] [error]
> > ajp_service::jk_ajp_common.c (2799): (worker1) connecting to tomcat
> > failed (rc=-3, errors=1, client_errors=0). [Sat Dec 17 06:11:50
> > 2016][3254:47280261211024] [info] jk_handler::mod_jk.c (2995):
> > Service error=-3 for worker=worker1
> >
> > Any ideas on what I should check?
>
> Can you post your  configuration?
>
> Any errors in the log files (specifically logs/catalina.out or, if you
> are using jsvc or Windows services, stdout.log/stderr.log/etc.)?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYWCLGAAoJEBzwKT+lPKRYzqcP/R34lxIW90ZPn7SQ5SBsbKN8
> rvYD+4k7a3EGEnPUhfJaajOMbpTXdPTHyltHOID9CpRRFIGrb+/kcKmaLbllYIqq
> NUDvWSDUHK0yELaSjb7+Y980mygqXV3j8wAardcEnZ/wG143ZZozhpQtKjhpLmsb
> XMe0HiC9/4TeqCtyZ5IWRdq/UOotnU0m1QMjgGYQPztGwQlfvNYDZ//8apiYkCKY
> qUoblyNM1RiH4H6tiX+7ZEfk3exvArw84adcWULYiQNpHMwvsRlfMi1aq8Xcty5+
> xhB4SitKoEB6CY/oLwRjWYAUsQIov2trGoqbhxIiQcNpHxoKslLabvzdjmjMPM

Re: Upgrade to 8.5.8/9

2016-12-24 Thread Greg Huber
We use spring for startup only,  struts2 and hibernate for persistance.

jdbc.properties

jdbc.driverClassName=org.mariadb.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/eventsdb?autoReconnect=trueuseUnicode=truecharacterEncoding=utf-8mysqlEncoding=utf8
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
jndi.value=java:comp/env/jdbc/eventsdbxa

hibernate.cfg



org.events.business.hibernate.ThreadLocalSessionContextNoAutoClose
false
true
false
 org.hibernate.transaction.JDBCTransactionFactory
true
org.hibernate.cache.EhCacheProvider
org.hibernate.cache.ehcache.EhCacheRegionFactory
false
false
true




hibernate.properties

file is empty


spring.cfg





${jdbc.driverClassName}


${jdbc.url}


${jdbc.username}


${jdbc.password}




${jdbc.driverClassName}


${quartz.jdbc.url}


${jdbc.username}


${jdbc.password}








${hibernate.dialect}











org.events.pojos







classpath:hibernate.cfg.xml



















On 24 December 2016 at 12:07, Mark Thomas <ma...@apache.org> wrote:

> On 24/12/2016 08:49, Greg Huber wrote:
> > ...Well its not hibernate, will look at switching to commons-dbcp2 if
> > possible.
>
> Again, please post your resource config.
>
> Mark
>
>
> >
> > Cheers
> >
> > On 22 December 2016 at 20:26, Mark Thomas <ma...@apache.org> wrote:
> >
> >> On 22/12/2016 17:50, Greg Huber wrote:
> >>> Chris,
> >>>
> >>> Thanks, I have been running this setup for ages, 8 plus years and
> various
> >>> tomcat versions.  It has never failed on  <= 8.0.x  I had to
> stop/start a
> >>> couple of times to get it to fail and had to run a parallel maven build
> >> to
> >>> slow things down.
> >>>
> >>> Do not read much on dumps, but what would this -locked be?
> >>
> >> It is perfectly normal.
> >>
> >> Your problem is with the connection pool.
> >>
> >> Note that when Tomcat switched form DBCP1 to DBCP2, some of the names of
> >> the attributes changed. You might not be using the settings you think
> >> you are using. Please post your resource config.
> >>
> >> Mark
> >>
> >>>
> >>> at
> >>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> >> doRun(NioEndpoint.java:1437)
> >>> at
> >>> org.apache.tomcat.util.net.SocketProcessorBase.run(
> >> SocketProcessorBase.java:49)
> >>> - locked <0xf1c54ed8> (a
> >>> org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
> >>> 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)
> >>>
> >>> Cheers Greg
> >>>
> >>>
> >>> On 22 December 2016 at 16:24, Christopher Schultz <
> >>> ch...@christopherschultz.net> wrote:
> >>>
> >>> Greg,
> >>>
> >>> On 12/22/16 5:18 AM, Greg Huber wrote:
> >>>>>> Here is the first dump and I cannot send all three.  Its my prod
> >>>>>> server which is locked up at the moment.  I need to get it back on
> >>>>>> line so is this enough info?  I can emile the whole file which has
> >>>>>> the three dumps if needed.
> >>>>>>
> >>>>>> [snip]
> >>>>>>
> >>>>>> Full thread dump Java Hot

Re: Upgrade to 8.5.8/9

2016-12-24 Thread Greg Huber
egatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

"VM Thread" os_prio=0 tid=0x09db8800 nid=0x2cd2 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x09d64000 nid=0x2cd0
runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x09d65800 nid=0x2cd1
runnable

"VM Periodic Task Thread" os_prio=0 tid=0x09e61000 nid=0x2cd9
waiting on condition

JNI global references: 383

Heap
 PSYoungGen  total 74240K, used 20126K [0xf000,
0xf550, 0x0001)
  eden space 61440K, 16% used
[0xf000,0xf0a03450,0xf3c0)
  from space 12800K, 77% used
[0xf488,0xf52244a0,0xf550)
  to   space 12800K, 0% used
[0xf3c0,0xf3c0,0xf488)
 ParOldGen   total 175104K, used 74721K [0xd000,
0xdab0, 0xf000)
  object space 175104K, 42% used
[0xd000,0xd48f8488,0xdab0)
 Metaspace   used 92528K, capacity 96514K, committed 96728K, reserved
1134592K
  class spaceused 10339K, capacity 10998K, committed 11008K, reserved
1048576K



On 22 December 2016 at 20:26, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 17:50, Greg Huber wrote:
> > Chris,
> >
> > Thanks, I have been running this setup for ages, 8 plus years and various
> > tomcat versions.  It has never failed on  <= 8.0.x  I had to stop/start a
> > couple of times to get it to fail and had to run a parallel maven build
> to
> > slow things down.
> >
> > Do not read much on dumps, but what would this -locked be?
>
> It is perfectly normal.
>
> Your problem is with the connection pool.
>
> Note that when Tomcat switched form DBCP1 to DBCP2, some of the names of
> the attributes changed. You might not be using the settings you think
> you are using. Please post your resource config.
>
> Mark
>
> >
> > at
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1437)
> > at
> > org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> > - locked <0xf1c54ed8> (a
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
> > 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)
> >
> > Cheers Greg
> >
> >
> > On 22 December 2016 at 16:24, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/22/16 5:18 AM, Greg Huber wrote:
> >>>> Here is the first dump and I cannot send all three.  Its my prod
> >>>> server which is locked up at the moment.  I need to get it back on
> >>>> line so is this enough info?  I can emile the whole file which has
> >>>> the three dumps if needed.
> >>>>
> >>>> [snip]
> >>>>
> >>>> Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed
> >>>> mode):
> >>>>
> >>>> "ajp-nio-8009-exec-26" #61 daemon prio=5 os_prio=0
> >>>> tid=0x0cb1 nid=0x1960 in Object.wait()
> >>>> [0x2ba658a4b000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf2879c10> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > Waiting on a database connection.
> >
> >
> >>>> "ajp-nio-8009-exec-25" #60 daemon prio=5 os_prio=0
> >>>> tid=0x0c74f800 nid=0x195d in Object.wait()
> >>>> [0x2ba658a0a000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ec

Re: Upgrade to 8.5.8/9

2016-12-24 Thread Greg Huber
cessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
- locked <0xf0d0a698> (a
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
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 in my tomcat.out I get for the shut down:

24-Dec-2016 10:52:39.196 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["http-nio-8080"]
24-Dec-2016 10:52:39.251 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["ajp-nio-8009"]
24-Dec-2016 10:52:39.304 INFO [Thread-7]
org.apache.catalina.core.StandardService.stopInternal Stopping service
Catalina
24-Dec-2016 10:52:39.382 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 2 instance(s)
to be deallocated for Servlet [jsp]
24-Dec-2016 10:52:40.403 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 2 instance(s)
to be deallocated for Servlet [jsp]
24-Dec-2016 10:52:41.414 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 2 instance(s)
to be deallocated for Servlet [jsp]
24-Dec-2016 10:52:41.549 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 65 instance(s)
to be deallocated for Servlet [default]
24-Dec-2016 10:52:42.561 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 65 instance(s)
to be deallocated for Servlet [default]
24-Dec-2016 10:52:43.572 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 65 instance(s)
to be deallocated for Servlet [default]
24-Dec-2016 10:52:43.766 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 9 instance(s)
to be deallocated for Servlet [PageServlet]
24-Dec-2016 10:52:44.780 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 9 instance(s)
to be deallocated for Servlet [PageServlet]
24-Dec-2016 10:52:45.790 INFO [localhost-startStop-2]
org.apache.catalina.core.StandardWrapper.unload Waiting for 9 instance(s)
to be deallocated for Servlet [PageServlet]


Cheers Greg


On 22 December 2016 at 20:26, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 17:50, Greg Huber wrote:
> > Chris,
> >
> > Thanks, I have been running this setup for ages, 8 plus years and various
> > tomcat versions.  It has never failed on  <= 8.0.x  I had to stop/start a
> > couple of times to get it to fail and had to run a parallel maven build
> to
> > slow things down.
> >
> > Do not read much on dumps, but what would this -locked be?
>
> It is perfectly normal.
>
> Your problem is with the connection pool.
>
> Note that when Tomcat switched form DBCP1 to DBCP2, some of the names of
> the attributes changed. You might not be using the settings you think
> you are using. Please post your resource config.
>
> Mark
>
> >
> > at
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1437)
> > at
> > org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> > - locked <0xf1c54ed8> (a
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
> > 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)
> >
> > Cheers Greg
> >
> >
> > On 22 December 2016 at 16:24, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/22/16 5:18 AM, Greg Huber wrote:
> >>>> Here is the first dump and I cannot send all three.  Its my prod
> >>>> server which is locked up at the moment.  I need to get it back on
> >>>> line so is this enough info?  I can emile the whole file which has
> >>>> the three dumps if needed.
> >>>>
> >>>> [snip]
> >>>>
> >>>> Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40

Re: Upgrade to 8.5.8/9

2016-12-24 Thread Greg Huber
...Well its not hibernate, will look at switching to commons-dbcp2 if
possible.

Cheers

On 22 December 2016 at 20:26, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 17:50, Greg Huber wrote:
> > Chris,
> >
> > Thanks, I have been running this setup for ages, 8 plus years and various
> > tomcat versions.  It has never failed on  <= 8.0.x  I had to stop/start a
> > couple of times to get it to fail and had to run a parallel maven build
> to
> > slow things down.
> >
> > Do not read much on dumps, but what would this -locked be?
>
> It is perfectly normal.
>
> Your problem is with the connection pool.
>
> Note that when Tomcat switched form DBCP1 to DBCP2, some of the names of
> the attributes changed. You might not be using the settings you think
> you are using. Please post your resource config.
>
> Mark
>
> >
> > at
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1437)
> > at
> > org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> > - locked <0xf1c54ed8> (a
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
> > 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)
> >
> > Cheers Greg
> >
> >
> > On 22 December 2016 at 16:24, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/22/16 5:18 AM, Greg Huber wrote:
> >>>> Here is the first dump and I cannot send all three.  Its my prod
> >>>> server which is locked up at the moment.  I need to get it back on
> >>>> line so is this enough info?  I can emile the whole file which has
> >>>> the three dumps if needed.
> >>>>
> >>>> [snip]
> >>>>
> >>>> Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed
> >>>> mode):
> >>>>
> >>>> "ajp-nio-8009-exec-26" #61 daemon prio=5 os_prio=0
> >>>> tid=0x0cb1 nid=0x1960 in Object.wait()
> >>>> [0x2ba658a4b000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf2879c10> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > Waiting on a database connection.
> >
> >
> >>>> "ajp-nio-8009-exec-25" #60 daemon prio=5 os_prio=0
> >>>> tid=0x0c74f800 nid=0x195d in Object.wait()
> >>>> [0x2ba658a0a000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf2852128> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > Another thread waiting for a db connection.
> >
> >>>> "ajp-nio-8009-exec-24" #59 daemon prio=5 os_prio=0
> >>>> tid=0x0dd3b000 nid=0x1959 in Object.wait()
> >>>> [0x2ba6589c9000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf282a818> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > I'm starting to see a pattern, here.
> >
> >>>> "ajp-nio-8009-exec-23" #58 daemon prio=5 os_prio=0
> >>>> tid=0x0cbe6000 nid=0x1953 in Object.wait()
> >>>> [0x2ba658988000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Ob

Re: Upgrade to 8.5.8/9

2016-12-23 Thread Greg Huber
Mark/Chris,

Taking your advice I looked at recent changes to my pom and noticed that
hibernate updated to 5.2.5 from 5.2.4 on December 12th.  So, I switched
back to 5.2.4 and have rebooted and restarted tomcat several times without
the lockup.  I have looked through the hibernate changes but cannot see any
connection pool related mods.  Maybe I will wait a couple of days and if
its fixed, log a hibernate issue or try 5.2.6.

Thanks for your help!

Cheers Greg

On 22 December 2016 at 20:26, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 17:50, Greg Huber wrote:
> > Chris,
> >
> > Thanks, I have been running this setup for ages, 8 plus years and various
> > tomcat versions.  It has never failed on  <= 8.0.x  I had to stop/start a
> > couple of times to get it to fail and had to run a parallel maven build
> to
> > slow things down.
> >
> > Do not read much on dumps, but what would this -locked be?
>
> It is perfectly normal.
>
> Your problem is with the connection pool.
>
> Note that when Tomcat switched form DBCP1 to DBCP2, some of the names of
> the attributes changed. You might not be using the settings you think
> you are using. Please post your resource config.
>
> Mark
>
> >
> > at
> > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.
> doRun(NioEndpoint.java:1437)
> > at
> > org.apache.tomcat.util.net.SocketProcessorBase.run(
> SocketProcessorBase.java:49)
> > - locked <0xf1c54ed8> (a
> > org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
> > 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)
> >
> > Cheers Greg
> >
> >
> > On 22 December 2016 at 16:24, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/22/16 5:18 AM, Greg Huber wrote:
> >>>> Here is the first dump and I cannot send all three.  Its my prod
> >>>> server which is locked up at the moment.  I need to get it back on
> >>>> line so is this enough info?  I can emile the whole file which has
> >>>> the three dumps if needed.
> >>>>
> >>>> [snip]
> >>>>
> >>>> Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed
> >>>> mode):
> >>>>
> >>>> "ajp-nio-8009-exec-26" #61 daemon prio=5 os_prio=0
> >>>> tid=0x0cb1 nid=0x1960 in Object.wait()
> >>>> [0x2ba658a4b000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf2879c10> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > Waiting on a database connection.
> >
> >
> >>>> "ajp-nio-8009-exec-25" #60 daemon prio=5 os_prio=0
> >>>> tid=0x0c74f800 nid=0x195d in Object.wait()
> >>>> [0x2ba658a0a000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf2852128> (a
> >>>> org.apache.commons.pool.impl.GenericObjectPool$Latch)
> >
> > Another thread waiting for a db connection.
> >
> >>>> "ajp-nio-8009-exec-24" #59 daemon prio=5 os_prio=0
> >>>> tid=0x0dd3b000 nid=0x1959 in Object.wait()
> >>>> [0x2ba6589c9000] java.lang.Thread.State: WAITING (on object
> >>>> monitor) at java.lang.Object.wait(Native Method) at
> >>>> java.lang.Object.wait(Object.java:502) at
> >>>> org.apache.commons.pool.impl.GenericObjectPool.
> borrowObject(GenericObj
> > ectPool.java:1104)
> >>>>
> >>>>
> > - locked <0xf282a818> (a
> >>>> org.apache.commons.pool.impl.GenericO

Re: Upgrade to 8.5.8/9

2016-12-22 Thread Greg Huber
Chris,

Thanks, I have been running this setup for ages, 8 plus years and various
tomcat versions.  It has never failed on  <= 8.0.x  I had to stop/start a
couple of times to get it to fail and had to run a parallel maven build to
slow things down.

Do not read much on dumps, but what would this -locked be?

at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
- locked <0xf1c54ed8> (a
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
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)

Cheers Greg


On 22 December 2016 at 16:24, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 12/22/16 5:18 AM, Greg Huber wrote:
> > Here is the first dump and I cannot send all three.  Its my prod
> > server which is locked up at the moment.  I need to get it back on
> > line so is this enough info?  I can emile the whole file which has
> > the three dumps if needed.
> >
> > [snip]
> >
> > Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed
> > mode):
> >
> > "ajp-nio-8009-exec-26" #61 daemon prio=5 os_prio=0
> > tid=0x0cb1 nid=0x1960 in Object.wait()
> > [0x2ba658a4b000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> >
> - - locked <0xf2879c10> (a
> > org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> Waiting on a database connection.
>
>
> > "ajp-nio-8009-exec-25" #60 daemon prio=5 os_prio=0
> > tid=0x0c74f800 nid=0x195d in Object.wait()
> > [0x2ba658a0a000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> >
> - - locked <0xf2852128> (a
> > org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> Another thread waiting for a db connection.
>
> > "ajp-nio-8009-exec-24" #59 daemon prio=5 os_prio=0
> > tid=0x0dd3b000 nid=0x1959 in Object.wait()
> > [0x2ba6589c9000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> >
> - - locked <0xf282a818> (a
> > org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> I'm starting to see a pattern, here.
>
> > "ajp-nio-8009-exec-23" #58 daemon prio=5 os_prio=0
> > tid=0x0cbe6000 nid=0x1953 in Object.wait()
> > [0x2ba658988000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> >
> - - locked <0xf28030f8> (a
> > org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> Hmm. Could it be...
>
> > "ajp-nio-8009-exec-22" #57 daemon prio=5 os_prio=0
> > tid=0x0e797800 nid=0x194f in Object.wait()
> > [0x2ba659472000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> >
> - - locked <0xf27daf28> (a
> > org.apache.commons.pool.impl.GenericObjectPool$Latch)
>
> ... just possibly ...
>
> > "ajp-nio-8009-exec-21" #56 daemon prio=5 os_prio=0
> > tid=0x0e874000 nid=0x194d in Object.wait()
> > [0x2ba656c67000] java.lang.Thread.State: WAITING (on object
> > monitor) at java.lang.Object.wait(Native Method) at
> > java.lang.Object.wait(Object.java:502) at
> > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObj
> ectPool.java:1104)
> >
> 

Re: Upgrade to 8.5.8/9

2016-12-22 Thread Greg Huber
Mark,

Its locked up now and I have the dump but it wont let me email it.  Can I
email the whole file somewhere?

Cheers Greg

On 22 December 2016 at 09:17, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 08:55, Greg Huber wrote:
> > I installed exactly the same versions on my newer centos 7 server and it
> > does not lock up.
> >
> > I have seem this problem before as the production box is old and very
> > slow.  There may have been some changes to the connector stuff for a
> > map/list where it is trying to add and remove at the same time causing a
> > dead lock (eg use a CopyOnWriteArrayList etc instead). This would explain
> > why it is erratic and happens on startup (where system is going to be
> slow).
> >
> > Would it be better to log an issue for this?
>
> Unless you can provide reliable steps to reproduce, an issue based on
> the information provided so far is likely to get resolved as invalid.
>
> When the lock up occurs, take 3 thread dumps ~10s apart. That should
> tell you a) any deadlocks, b) what each of the threads is doing and c)
> identify which threads should be moving that aren't.
>
> If you need help analysing the thread dumps, post them (or links to
> them) here.
>
> Mark
>
> >
> > Cheers Greg
> >
> >
> >
> > On 20 December 2016 at 14:10, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/20/16 3:21 AM, Greg Huber wrote:
> >>>>> If you are using httpd + mod_jk, why are you bothering with APR
> >>>>> and tcnative on the Tomcat side?
> >>>>
> >>>> It complains in the log file so I do what it says.  If I don't need
> >>>> it it saves me having to compile it all the time.
> >
> > You get complaints about the APR library not being installed? Yeah,
> > just comment-out the APRLifecycleListener in conf/server.xml.
> >
> >>>>> What if you use the NIO connector instead of APR?
> >>>>
> >>>> Have always run tomcat with apache and mod_jk has always worked. I
> >>>> could look at NIO if all else fails.
> >
> > No matter what kind of protocol you use (HTTP, AJP13), you can still
> > choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O
> > connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an
> > option.
> >
> >>>>> Can you post your  configuration?
> >>>>
> >>>> I do not modify anything here.
> >>>>
> >>>> My setup:
> >>>>
> >>>> workers.properties:
> >>>>
> >>>> worker.list=worker1 worker.worker1.type=ajp13
> >>>> worker.worker1.host=localhost worker.worker1.port=8009
> >>>> worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1
> >>>>
> >>>> tomcat.conf
> >>>>
> >>>> ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the
> >>>> log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile
> >>>> "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info
> >>>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"  
> >>>> ... JkMount  / worker1 JkMount  /* worker1 
> >
> > That looks okay to me, though it doesn't look like you actually need
> > httpd in the mix, here. I'll just assume that you are fronting Tomcat
> > for a good reason and not "because that's how it's supposed to be done."
> >
> >>>> setenv.sh :
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export
> >>>> CATALINA_OPTS="$CATALINA_OPTS -Xmx768m"
> >
> > Off-topic hint: if you are going to give your JVM 768M, you may as
> > well do it all at once and set -Xms == -Xmx.
> >
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -server"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC"
> >>>>
> >>>>
> >>>> Not sure whe

Re: Upgrade to 8.5.8/9

2016-12-22 Thread Greg Huber
OK, will see if I can do the dumps.  Think i did something similar a while
back when tomcat got into a random loop/high cpu a while back.

Cheers Greg.

On 22 December 2016 at 09:17, Mark Thomas <ma...@apache.org> wrote:

> On 22/12/2016 08:55, Greg Huber wrote:
> > I installed exactly the same versions on my newer centos 7 server and it
> > does not lock up.
> >
> > I have seem this problem before as the production box is old and very
> > slow.  There may have been some changes to the connector stuff for a
> > map/list where it is trying to add and remove at the same time causing a
> > dead lock (eg use a CopyOnWriteArrayList etc instead). This would explain
> > why it is erratic and happens on startup (where system is going to be
> slow).
> >
> > Would it be better to log an issue for this?
>
> Unless you can provide reliable steps to reproduce, an issue based on
> the information provided so far is likely to get resolved as invalid.
>
> When the lock up occurs, take 3 thread dumps ~10s apart. That should
> tell you a) any deadlocks, b) what each of the threads is doing and c)
> identify which threads should be moving that aren't.
>
> If you need help analysing the thread dumps, post them (or links to
> them) here.
>
> Mark
>
> >
> > Cheers Greg
> >
> >
> >
> > On 20 December 2016 at 14:10, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Greg,
> >
> > On 12/20/16 3:21 AM, Greg Huber wrote:
> >>>>> If you are using httpd + mod_jk, why are you bothering with APR
> >>>>> and tcnative on the Tomcat side?
> >>>>
> >>>> It complains in the log file so I do what it says.  If I don't need
> >>>> it it saves me having to compile it all the time.
> >
> > You get complaints about the APR library not being installed? Yeah,
> > just comment-out the APRLifecycleListener in conf/server.xml.
> >
> >>>>> What if you use the NIO connector instead of APR?
> >>>>
> >>>> Have always run tomcat with apache and mod_jk has always worked. I
> >>>> could look at NIO if all else fails.
> >
> > No matter what kind of protocol you use (HTTP, AJP13), you can still
> > choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O
> > connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an
> > option.
> >
> >>>>> Can you post your  configuration?
> >>>>
> >>>> I do not modify anything here.
> >>>>
> >>>> My setup:
> >>>>
> >>>> workers.properties:
> >>>>
> >>>> worker.list=worker1 worker.worker1.type=ajp13
> >>>> worker.worker1.host=localhost worker.worker1.port=8009
> >>>> worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1
> >>>>
> >>>> tomcat.conf
> >>>>
> >>>> ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the
> >>>> log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile
> >>>> "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info
> >>>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"  
> >>>> ... JkMount  / worker1 JkMount  /* worker1 
> >
> > That looks okay to me, though it doesn't look like you actually need
> > httpd in the mix, here. I'll just assume that you are fronting Tomcat
> > for a good reason and not "because that's how it's supposed to be done."
> >
> >>>> setenv.sh :
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export
> >>>> CATALINA_OPTS="$CATALINA_OPTS -Xmx768m"
> >
> > Off-topic hint: if you are going to give your JVM 768M, you may as
> > well do it all at once and set -Xms == -Xmx.
> >
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -server"
> >>>>
> >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC"
> >>>>
> >>>>
> >>>> Not su

Re: Upgrade to 8.5.8/9

2016-12-22 Thread Greg Huber
I installed exactly the same versions on my newer centos 7 server and it
does not lock up.

I have seem this problem before as the production box is old and very
slow.  There may have been some changes to the connector stuff for a
map/list where it is trying to add and remove at the same time causing a
dead lock (eg use a CopyOnWriteArrayList etc instead). This would explain
why it is erratic and happens on startup (where system is going to be slow).

Would it be better to log an issue for this?

Cheers Greg



On 20 December 2016 at 14:10, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 12/20/16 3:21 AM, Greg Huber wrote:
> >> If you are using httpd + mod_jk, why are you bothering with APR
> >> and tcnative on the Tomcat side?
> >
> > It complains in the log file so I do what it says.  If I don't need
> > it it saves me having to compile it all the time.
>
> You get complaints about the APR library not being installed? Yeah,
> just comment-out the APRLifecycleListener in conf/server.xml.
>
> >> What if you use the NIO connector instead of APR?
> >
> > Have always run tomcat with apache and mod_jk has always worked. I
> > could look at NIO if all else fails.
>
> No matter what kind of protocol you use (HTTP, AJP13), you can still
> choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O
> connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an
> option.
>
> >> Can you post your  configuration?
> >
> > I do not modify anything here.
> >
> > My setup:
> >
> > workers.properties:
> >
> > worker.list=worker1 worker.worker1.type=ajp13
> > worker.worker1.host=localhost worker.worker1.port=8009
> > worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1
> >
> > tomcat.conf
> >
> > ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the
> > log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile
> > "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"  
> > ... JkMount  / worker1 JkMount  /* worker1 
>
> That looks okay to me, though it doesn't look like you actually need
> httpd in the mix, here. I'll just assume that you are fronting Tomcat
> for a good reason and not "because that's how it's supposed to be done."
>
> > setenv.sh :
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export
> > CATALINA_OPTS="$CATALINA_OPTS -Xmx768m"
>
> Off-topic hint: if you are going to give your JVM 768M, you may as
> well do it all at once and set -Xms == -Xmx.
>
> > export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -server"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC"
> >
> >
> > Not sure where these exports came from but they seem to work up to
> > 8.5.x
>
> They control the JVM, not Tomcat. If you are administering this Tomcat
> instance, I urge you to learn more about what they do. Mysteries don't
> help administrators do their jobs.
>
> > The last start/stop catalina.out :
> >
> > 17-Dec-2016 15:21:51.022 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded
> > APR based Apache Tomcat Native library 1.2.10 using APR version
> > 1.5.2. 17-Dec-2016 15:21:51.022 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
> > capabilities: IPv6 [true], sendfile [true], accept filters [false],
> > random [true]. 17-Dec-2016 15:21:51.023 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
> > APR/OpenSSL configuration: useAprConnector [false], useOpenSSL
> > [true] 17-Dec-2016 15:21:51.036 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.initializeSSL
> > OpenSSL successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)
> > 17-Dec-2016 15:21:52.967 INFO [main]
> > org.apache.coyote.AbstractProtocol.init Initializing
> > ProtocolHandler ["http-nio-8080"] 17-Dec-2016 15:21:53.124 INFO
> > [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector
> > Using a shared selector for servlet write/read 17-Dec-2016
> > 15:21:53.160 INFO [main] org.apache.coyo

Re: Upgrade to 8.5.8/9

2016-12-20 Thread Greg Huber
Chris,

>After Tomcat is started, can you run this command on >the server running
both httpd and Tomcat?

>$ sudo netstat -plan | grep 8009

The problem is my prod server (centos 5), so I will switch back to 8.5.9
and when it hangs I can run the command.  Also I do have a backup server
(centos 7) which I will also update to 8.5.9 and see if I get the same
issue which will allow more testing also.


Cheers. Greg

On 20 December 2016 at 14:10, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 12/20/16 3:21 AM, Greg Huber wrote:
> >> If you are using httpd + mod_jk, why are you bothering with APR
> >> and tcnative on the Tomcat side?
> >
> > It complains in the log file so I do what it says.  If I don't need
> > it it saves me having to compile it all the time.
>
> You get complaints about the APR library not being installed? Yeah,
> just comment-out the APRLifecycleListener in conf/server.xml.
>
> >> What if you use the NIO connector instead of APR?
> >
> > Have always run tomcat with apache and mod_jk has always worked. I
> > could look at NIO if all else fails.
>
> No matter what kind of protocol you use (HTTP, AJP13), you can still
> choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O
> connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an
> option.
>
> >> Can you post your  configuration?
> >
> > I do not modify anything here.
> >
> > My setup:
> >
> > workers.properties:
> >
> > worker.list=worker1 worker.worker1.type=ajp13
> > worker.worker1.host=localhost worker.worker1.port=8009
> > worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1
> >
> > tomcat.conf
> >
> > ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the
> > log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile
> > "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"  
> > ... JkMount  / worker1 JkMount  /* worker1 
>
> That looks okay to me, though it doesn't look like you actually need
> httpd in the mix, here. I'll just assume that you are fronting Tomcat
> for a good reason and not "because that's how it's supposed to be done."
>
> > setenv.sh :
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export
> > CATALINA_OPTS="$CATALINA_OPTS -Xmx768m"
>
> Off-topic hint: if you are going to give your JVM 768M, you may as
> well do it all at once and set -Xms == -Xmx.
>
> > export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -server"
> >
> > export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC"
> >
> >
> > Not sure where these exports came from but they seem to work up to
> > 8.5.x
>
> They control the JVM, not Tomcat. If you are administering this Tomcat
> instance, I urge you to learn more about what they do. Mysteries don't
> help administrators do their jobs.
>
> > The last start/stop catalina.out :
> >
> > 17-Dec-2016 15:21:51.022 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded
> > APR based Apache Tomcat Native library 1.2.10 using APR version
> > 1.5.2. 17-Dec-2016 15:21:51.022 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
> > capabilities: IPv6 [true], sendfile [true], accept filters [false],
> > random [true]. 17-Dec-2016 15:21:51.023 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
> > APR/OpenSSL configuration: useAprConnector [false], useOpenSSL
> > [true] 17-Dec-2016 15:21:51.036 INFO [main]
> > org.apache.catalina.core.AprLifecycleListener.initializeSSL
> > OpenSSL successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)
> > 17-Dec-2016 15:21:52.967 INFO [main]
> > org.apache.coyote.AbstractProtocol.init Initializing
> > ProtocolHandler ["http-nio-8080"] 17-Dec-2016 15:21:53.124 INFO
> > [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector
> > Using a shared selector for servlet write/read 17-Dec-2016
> > 15:21:53.160 INFO [main] org.apache.coyote.AbstractProtocol.init
> > Initializing ProtocolHandler ["ajp-nio-8009&qu

Re: Upgrade to 8.5.8/9

2016-12-20 Thread Greg Huber
in]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.base=/opt/apache-tomcat/apache-tomcat-8.5.8
17-Dec-2016 15:21:51.022 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Dcatalina.home=/opt/apache-tomcat/apache-tomcat-8.5.8
17-Dec-2016 15:21:51.022 INFO [main]
org.apache.catalina.startup.VersionLoggerListener.log Command line
argument: -Djava.io.tmpdir=/opt/apache-tomcat/apache-tomcat-8.5.8/temp
17-Dec-2016 15:21:51.022 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR
based Apache Tomcat Native library 1.2.10 using APR version 1.5.2.
17-Dec-2016 15:21:51.022 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
capabilities: IPv6 [true], sendfile [true], accept filters [false], random
[true].
17-Dec-2016 15:21:51.023 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL
configuration: useAprConnector [false], useOpenSSL [true]
17-Dec-2016 15:21:51.036 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized (OpenSSL 1.0.2j  26 Sep 2016)
17-Dec-2016 15:21:52.967 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-8080"]
17-Dec-2016 15:21:53.124 INFO [main]
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared
selector for servlet write/read
17-Dec-2016 15:21:53.160 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["ajp-nio-8009"]
17-Dec-2016 15:21:53.167 INFO [main]
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared
selector for servlet write/read
17-Dec-2016 15:21:53.168 INFO [main]
org.apache.catalina.startup.Catalina.load Initialization processed in 4843
ms
17-Dec-2016 15:21:53.439 INFO [main]
org.apache.catalina.core.StandardService.startInternal Starting service
Catalina
17-Dec-2016 15:21:53.439 INFO [main]
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
Engine: Apache Tomcat/8.5.8
17-Dec-2016 15:21:53.617 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDescriptor Deploying
configuration descriptor
/opt/apache-tomcat/apache-tomcat-8.5.8/conf/Catalina/localhost/ROOT.xml
17-Dec-2016 15:22:29.227 INFO [localhost-startStop-1]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
17-Dec-2016 15:23:08.302 INFO [localhost-startStop-1]
org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of
configuration descriptor
/opt/apache-tomcat/apache-tomcat-8.5.8/conf/Catalina/localhost/ROOT.xml has
finished in 74,682 ms
17-Dec-2016 15:23:08.320 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
[http-nio-8080]
17-Dec-2016 15:23:08.341 INFO [main]
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler
[ajp-nio-8009]
17-Dec-2016 15:23:08.342 INFO [main]
org.apache.catalina.startup.Catalina.start Server startup in 75173 ms
17-Dec-2016 15:59:45.589 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["http-nio-8080"]
17-Dec-2016 15:59:45.805 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
["ajp-nio-8009"]
17-Dec-2016 15:59:45.869 INFO [Thread-7]
org.apache.catalina.core.StandardService.stopInternal Stopping service
Catalina
17-Dec-2016 15:59:52.152 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
["http-nio-8080"]
17-Dec-2016 15:59:52.401 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
["ajp-nio-8009"]
17-Dec-2016 15:59:52.536 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler
["http-nio-8080"]
17-Dec-2016 15:59:52.605 INFO [Thread-7]
org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler
["ajp-nio-8009"]


Cheers Greg


On 19 December 2016 at 18:11, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Greg,
>
> On 12/19/16 4:47 AM, Greg Huber wrote:
> > I am currently running tomcat 8.0.32 and have tried to upgrade to
> > 8.5.8 and 8.5.9 without success.  I use mod_jk to connect apache to
> > tomcat running on centos 5.11 with Apache 2.2.3.
> >
> > I have installed openSSL 1.0.2.j to compile the native
> > tomcat-native-1.2.10 using apr-1.5.2 and tomcat-connectors-1.2.42
> > for the mod_jk.
>
> If you are using httpd + mod_jk, why are you bothering with APR and
> tcnative on the Tomcat side?
>
> > The problem is that tomcat seems to start but f

Re: Upgrade to 8.5.8/9

2016-12-20 Thread Greg Huber
>Are you sure that your new instance has an adequate >number of threads
available for httpd to proxy to?

How would I check the threads for httpd?  It normally hangs on startup so
there should be enough system threads.  Would a GC be required when the
system has just started?

I have run my startup scripts years so maybe tomcat 8.5.x needs something
extra, memory? (see setenv.sh below)  I have reverted back to 8.0.x and it
starts and runs OK with no issues.

My setup:

workers.properties:

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.socket_keepalive=1

tomcat.conf

...
JkWorkersFile "/etc/httpd/conf.d/workers.properties"
# Set the log file
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"


...
JkMount  / worker1
JkMount  /* worker1



setenv.sh :

export CATALINA_OPTS="$CATALINA_OPTS -Xms256m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx768m"

export CATALINA_OPTS="$CATALINA_OPTS -Xss256k"

export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"

export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"

export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"

export CATALINA_OPTS="$CATALINA_OPTS -server"

export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC"


Not sure where these exports came from but they seem to work up to 8.5.x

Cheers Greg.



On 19 December 2016 at 17:55, Coty Sutherland <csuth...@redhat.com> wrote:

> Hm, errno=111 is a connection refusal. Are you sure that your new
> instance has an adequate number of threads available for httpd to
> proxy to? Do you see any errors in your tomcat logging? If you do have
> sufficient threads in the pool, then maybe there is something (like GC
> pauses) hanging your requests that wasn't before and therefore
> exhausting the pool causing rejections.
>
> On Mon, Dec 19, 2016 at 4:47 AM, Greg Huber <gregh3...@gmail.com> wrote:
> > Hello,
> >
> > I am currently running tomcat 8.0.32 and have tried to upgrade to 8.5.8
> and
> > 8.5.9 without success.  I use mod_jk to connect apache to tomcat running
> on
> > centos 5.11 with Apache 2.2.3.
> >
> > I have installed openSSL 1.0.2.j to compile the native
> tomcat-native-1.2.10
> > using apr-1.5.2 and tomcat-connectors-1.2.42 for the mod_jk.
> >
> > The problem is that tomcat seems to start but fails sometimes to connect
> > correctly to apache and causes apache to hang.  If I stop tomcat, apache
> > starts working again.  I have been through the logs with little
> indication
> > of the problem.  If I revet back to 8.0.32 everything works OK.
> >
> >
> > All I can find is this in the mod_jk.log:
> >
> >
> > [Sat Dec 17 06:11:48 2016][3212:47280261211024] [info] init_jk::mod_jk.c
> > (3595): mod_jk/1.2.42 initialized
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009 failed
> > (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1) Failed
> opening
> > socket to (127.0.0.1:8009) (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
> > ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to
> backend
> > failed. Tomcat is probably not started or is listening on the wrong port
> > (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > ajp_service::jk_ajp_common.c (2778): (worker1) sending request to tomcat
> > failed (recoverable), because of error during request sending (attempt=1)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009 failed
> > (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1) Failed
> opening
> > socket to (127.0.0.1:8009) (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
> > ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to
> backend
> > failed. Tomcat is probably not started or is listening on the wrong port
> > (errno=111)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> > ajp_service::jk_ajp_common.c (2778): (worker1) sending request to tomcat
> > failed (recoverable), because of error during request sending (attempt=2)
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
> > ajp_service::jk_ajp_common.c (2799): (worker1) connecting to tomcat
> failed
> > (rc=-3, errors=1, client_errors=0).
> > [Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
> jk_handler::mod_jk.c
> > (2995): Service error=-3 for worker=worker1
> >
> > Any ideas on what I should check?
> >
> > Cheers
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Upgrade to 8.5.8/9

2016-12-19 Thread Greg Huber
Hello,

I am currently running tomcat 8.0.32 and have tried to upgrade to 8.5.8 and
8.5.9 without success.  I use mod_jk to connect apache to tomcat running on
centos 5.11 with Apache 2.2.3.

I have installed openSSL 1.0.2.j to compile the native tomcat-native-1.2.10
using apr-1.5.2 and tomcat-connectors-1.2.42 for the mod_jk.

The problem is that tomcat seems to start but fails sometimes to connect
correctly to apache and causes apache to hang.  If I stop tomcat, apache
starts working again.  I have been through the logs with little indication
of the problem.  If I revet back to 8.0.32 everything works OK.


All I can find is this in the mod_jk.log:


[Sat Dec 17 06:11:48 2016][3212:47280261211024] [info] init_jk::mod_jk.c
(3595): mod_jk/1.2.42 initialized
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009 failed
(errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1) Failed opening
socket to (127.0.0.1:8009) (errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to backend
failed. Tomcat is probably not started or is listening on the wrong port
(errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
ajp_service::jk_ajp_common.c (2778): (worker1) sending request to tomcat
failed (recoverable), because of error during request sending (attempt=1)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
jk_open_socket::jk_connect.c (817): connect to 127.0.0.1:8009 failed
(errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
ajp_connect_to_endpoint::jk_ajp_common.c (1068): (worker1) Failed opening
socket to (127.0.0.1:8009) (errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
ajp_send_request::jk_ajp_common.c (1728): (worker1) connecting to backend
failed. Tomcat is probably not started or is listening on the wrong port
(errno=111)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info]
ajp_service::jk_ajp_common.c (2778): (worker1) sending request to tomcat
failed (recoverable), because of error during request sending (attempt=2)
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [error]
ajp_service::jk_ajp_common.c (2799): (worker1) connecting to tomcat failed
(rc=-3, errors=1, client_errors=0).
[Sat Dec 17 06:11:50 2016][3254:47280261211024] [info] jk_handler::mod_jk.c
(2995): Service error=-3 for worker=worker1

Any ideas on what I should check?

Cheers


Re: Also having issue on high CPU Usage on Tomcat 8

2015-06-10 Thread Greg Huber
Ari,

No, I could not find the cause.  I checked the source and there does not
look like there was any changes in the polling code, so it maybe something
else.  I changed to 7.0.62 with exactly the same startup scripts/jdk and
the problem goes away.  It sometimes also happens on my dev box running
jdk1.8.0_40/8.0.21 so its not just our production server.

Maybe someone on the tomcat list can help?

Cheers Greg


On 9 June 2015 at 13:41, Ari Luoma arilu...@gmail.com wrote:

 Versions I am using:
 Tomcat: 8.0.9

 Java
 java version 1.7.0_65
 OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
 OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

 CentOS release 6.5

 I was just wondering if updating to 8.0.21 would help, but it seems that
 you are already using it.
 Comment on changelog of 8.0.21:  Numerous fixes to the APR/native
 connector to improve robustness. (markt)



 On Tue, Jun 9, 2015 at 3:25 PM, Ari Luoma arilu...@gmail.com wrote:

 Hi,


 Did you find a solution for this?
 --
 First of all I wan't to say that I wasn't a tomcat-users subscriber and
 couldn't response directly to your question.
 --

 I am also experiencing this issue almost every day.
 Thread count rises from about 47 to 57 and CPU usage goes high even
 though there is no users using our software.

 I was also able to narrow it to ajp-apr-8009-Poller.

 When lookin it from jvisualvm it all the time changed from Wait to
 Running and back to Wait state.
 ...
 1:30:00.172: Running
  1:30:01.179: Wait
  1:30:02.171: Running
  1:30:05.251: Wait
  1:30:06.178: Running
  1:30:16.183: Wait
  1:30:17.183: Running
  1:30:21.186: Wait
 ...

 CPU usage was high for a couple of hours and then dropped back to zero
 and also thread count dropped back to normal.

 I am using CentOS and Tomcat native library.
 We have multiple Tomcat instances running on the same machine and this
 always happens concurrently on all of them.

 Best Regards,
 Ari Luoma





Re: High cpu on Tomcat 8

2015-05-09 Thread Greg Huber
Hello,

This is a follow up from last week, the server seemed to have the same
issue,  where it was over running to 75%.

Using top (centos 6) there seemed a lot of java threads, the the top thread
was 15209  0x3b69

These are the start options.  I increased  -Xmx buy 256m to 768m since last
week.

 -Xms256m  -Xmx768m -Xss256k  -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500
-XX:GCTimeRatio=9  -XX:+DisableExplicitGC

Maybe come of these options are now obsolete?

Any ideas?

Cheers Greg

Here is a vm dump

2015-05-09 00:18:03
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode):

ajp-apr-8009-exec-57 #189 daemon prio=5 os_prio=0 tid=0x0a0ab800
nid=0x4d60 waiting on condition [0x2b2f77585000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xd3ae19d8 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:85)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
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)

ajp-apr-8009-exec-56 #188 daemon prio=5 os_prio=0 tid=0x0a0ab000
nid=0x4d5f waiting on condition [0x2b2f77544000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xd3ae19d8 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:85)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
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)

ajp-apr-8009-exec-55 #187 daemon prio=5 os_prio=0 tid=0x0402d800
nid=0x4d57 waiting on condition [0x2b2f77503000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xd3ae19d8 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:85)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
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)

ajp-apr-8009-exec-54 #186 daemon prio=5 os_prio=0 tid=0x04039800
nid=0x4d56 waiting on condition [0x2b2f774c2000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xd3ae19d8 (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:85)
at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
at

Re: High cpu on Tomcat 8

2015-05-06 Thread Greg Huber
  When the CPU usage goes high, does the server actually slow down?

 I do not think so, it makes the server slowdown

 Sounds like you're contradicting yourself; you do not think it slows
down, or it does slow down?

It would slow down as the server is at 80%, but if it was the webapp in a
deadlock it would not respond, so it is some other thread/task.  From the
profiler the only one active thread was the was the ajp-apr-8009-Poller.

I am hoping the memory is the resolution, maybe I will simulate some high
load (or wait till Friday/Saturday) and see if its resolved.

Cheers Greg


On 5 May 2015 at 12:48, Caldarale, Charles R chuck.caldar...@unisys.com
wrote:

  From: Greg Huber [mailto:gregh3...@gmail.com]
  Subject: Re: High cpu on Tomcat 8

   Have you set a pollerThreadCount?

  I have had a look and I cannot find where this is set.  Is there any
  documentation on this?

 The pollerThreadCount applies only to the HTTP version of the Connector,
 not the AJP one.  Red herring.

   When the CPU usage goes high, does the server actually slow down?

  I do not think so, it makes the server slowdown

 Sounds like you're contradicting yourself; you do not think it slows down,
 or it does slow down?

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail and
 its attachments from all computers.


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




Re: High cpu on Tomcat 8

2015-05-05 Thread Greg Huber
Have you set a pollerThreadCount? If so, what is it? If not, you might
want to consider setting it to 2, but probably not any higher, and
see if it improves things.

I have had a look and I cannot find where this is set.  Is there any
documentation on this?


When the CPU usage goes high, does the server actually slow down?

I do not think so, it makes the server slowdown (and all the fans come on)

Cheers Greg


On 4 May 2015 at 15:13, Christopher Schultz ch...@christopherschultz.net
wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Greg,

 On 5/4/15 7:13 AM, Greg Huber wrote:
  Thanks, I am going to up the memory.  The profiler I used only
  highlighted the ajp-apr-8009-Poller as active.  Terminating the
  thread stopped the high cpu.

 ... and probably killed your ability to process requests, unless you
 configured more than one Poller thread.

 Have you set a pollerThreadCount? If so, what is it? If not, you might
 want to consider setting it to 2, but probably not any higher, and
 see if it improves things.

 The Poller thread is responsible for handling all blocking-style I/O
 both into and out of your servlets. When your site gets busy, this
 thread will be doing a lot of work.

 When the CPU usage goes high, does the server actually slow down?

 - -chris

  On 4 May 2015 at 10:18, Mark Thomas ma...@apache.org wrote:
 
  On 03/05/2015 11:25, Greg Huber wrote:
  Hello,
 
  After an upgrade to Tomcat 8.0.21 and (Oracle jdk1.8.0_40) I
  seem to be having an erratic high cpu issue, often  when the
  server gets busy.  The application was OK tomcat 7 and has not
  been modified since the upgrade.
 
  Use ps to get the thread ID of the thread that is using the CPU.
  Take a thread dump and find what that thread is doing (you'll
  need to convert the thread ID  from decimal to hex). It is the
  stack trace of that thread that will be interesting.
 
  Mark
 
 
  -
 
 
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2
 Comment: GPGTools - http://gpgtools.org

 iQIcBAEBCAAGBQJVR35yAAoJEBzwKT+lPKRYamAQAIYQMdBZLRueevXz71rqJxpA
 Ij1lEpK4FlXrY1hukAKEX0k/yyiLc2UkXeI0DZtstKNiDDyEo+KmsykvjlTjUmAt
 mvyhicQ3zhvlNaLIFYBwUIHNqzx+dBmgF/w75pkxKrDOj7MMx7gIFxPGXlTj2+XH
 1tt8uWgvHhElKnROjG+jU2bG3/wqZyXfSnT+SsfNhQQE6r0W3MRqJh/0X808GgWO
 bSJdfk2Dz03/OksrEzK9cVV5/f4zB2Ggce/Uw+4qtZ0jj0jhRd9JXdaJlRFpPfbM
 EdjDeOVmsJz6oqP+IvSEvtJjQY9RR6iJB8SkyWph64stxRQeeOBFzUsBIDWLTK+d
 kB4/9HgGpnld8LaDEr3hrY2uXmtjEVwgkVzs1TKVpFipaACePuHG/3aa81/j0mMC
 wP1iLSzt3SrjI2Z0dXlOszcB5DlQIiInqFG3PpTD8Wfr63hjX7m43zEdepamTX7d
 eIjyu+TGX1Z+8yZabQzt+IPqGlk2uozafFiJOyxvwAbfBFqmF+rTKxOnYLMS67U7
 nFx50rXx/Xq1TCCsWbX4L1s0Y7Gh1G3DAtVTCLFKI+O3oW5aSUTed0trwUcE+oEP
 VXYkRvSqDTcxJp+fXszz/yJGJxo3Yy46wfgX4WgGf9FZBdJ8XNchzOTPZp/qlqNa
 WrehBe11KsKgy21Hc+Lz
 =Hooe
 -END PGP SIGNATURE-

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




Re: High cpu on Tomcat 8

2015-05-04 Thread Greg Huber
Thanks, I am going to up the memory.  The profiler I used only highlighted
the ajp-apr-8009-Poller as active.  Terminating the thread stopped the high
cpu.

Cheers Greg

On 4 May 2015 at 10:18, Mark Thomas ma...@apache.org wrote:

 On 03/05/2015 11:25, Greg Huber wrote:
  Hello,
 
  After an upgrade to Tomcat 8.0.21 and (Oracle jdk1.8.0_40) I seem to be
  having an erratic high cpu issue, often  when the server gets busy.  The
  application was OK tomcat 7 and has not been modified since the upgrade.

 Use ps to get the thread ID of the thread that is using the CPU.
 Take a thread dump and find what that thread is doing (you'll need to
 convert the thread ID  from decimal to hex). It is the stack trace of
 that thread that will be interesting.

 Mark


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




High cpu on Tomcat 8

2015-05-03 Thread Greg Huber
Hello,

After an upgrade to Tomcat 8.0.21 and (Oracle jdk1.8.0_40) I seem to be
having an erratic high cpu issue, often  when the server gets busy.  The
application was OK tomcat 7 and has not been modified since the upgrade.

I use mod_jk / apache

#
# workers.properties
#

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.socket_keepalive=1

Here are my startup options:

Tomcat 7
JAVA_OPTS=-Xms128M -Xmx512m -XX:MaxPermSize=256m

Tomcat 8  (java 8 does not support MaxPermSize)

JAVA_OPTS=-Xms128M -Xmx512m

If I trace the thread it seems to be related to ajp-apr-8009-Poller

ajp-apr-8009-Poller #26 daemon prio=5 os_prio=0 tid=0x7ffe300bd000
nid=0xc82 runnable [0x7ffdd1fd1000]
   java.lang.Thread.State: RUNNABLE
at sun.misc.Unsafe.unpark(Native Method)
at java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:141)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1264)
at
java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
at
java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:176)
at
java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
at
org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
at java.lang.Thread.run(Redefined)



ajp-apr-8009-Poller #26 daemon prio=5 os_prio=0 tid=0x7ffe300bd000
nid=0xc82 runnable [0x7ffdd1fd1000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xe4a05160 (a
java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
at
java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
at
java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:172)
at
java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
at
org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
at java.lang.Thread.run(Redefined)


Killing the thread stops the cpu, but then Tomcat does not work.  Any ideas
what would be causing this?


Cheers Greg


Re: High cpu on Tomcat 8

2015-05-03 Thread Greg Huber
Thanks for the reply, I will up the memory on the heap space and have
another go with the profiler if happens again.  When I was looking at the
thread dumps there were no other active threads other than the
ajp-apr-8009-Poller so maybe it is only a memory issue.

Cheers Greg.

On 3 May 2015 at 17:35, Felix Schumacher felix.schumac...@internetallee.de
wrote:



 Am 3. Mai 2015 12:25:53 MESZ, schrieb Greg Huber gregh3...@gmail.com:
 Hello,
 
 After an upgrade to Tomcat 8.0.21 and (Oracle jdk1.8.0_40) I seem to be
 having an erratic high cpu issue, often  when the server gets busy.
 The
 application was OK tomcat 7 and has not been modified since the
 upgrade.
 
 I use mod_jk / apache
 
 #
 # workers.properties
 #
 
 # Define 1 real worker using ajp13
 worker.list=worker1
 # Set properties for worker1 (ajp13)
 worker.worker1.type=ajp13
 worker.worker1.host=localhost
 worker.worker1.port=8009
 worker.worker1.lbfactor=50
 worker.worker1.socket_keepalive=1
 
 Here are my startup options:
 
 Tomcat 7
 JAVA_OPTS=-Xms128M -Xmx512m -XX:MaxPermSize=256m
 
 Tomcat 8  (java 8 does not support MaxPermSize)
 
 JAVA_OPTS=-Xms128M -Xmx512m

 I believe java 8 combines the permgen into the heap space, so it is
 possible, that you run out of space now that you use java 8.

 Use jstat, jvisualvm or jconsole to look at your gc cycles. They can
 consume a lot of cpu.

 
 If I trace the thread it seems to be related to ajp-apr-8009-Poller
 
 ajp-apr-8009-Poller #26 daemon prio=5 os_prio=0
 tid=0x7ffe300bd000
 nid=0xc82 runnable [0x7ffdd1fd1000]
java.lang.Thread.State: RUNNABLE
 at sun.misc.Unsafe.unpark(Native Method)

 This thread does nothing.


  at java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:141)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1264)
 at
 java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
 at

 java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:176)
 at

 java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
 at

 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
 at

 org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
 at

 org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
 at
 org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
 at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
 at java.lang.Thread.run(Redefined)
 
 
 
 ajp-apr-8009-Poller #26 daemon prio=5 os_prio=0
 tid=0x7ffe300bd000
 nid=0xc82 runnable [0x7ffdd1fd1000]
java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)

 This thread does nothing,  either.

 - parking to wait for  0xe4a05160 (a
 java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
 at

 java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
 at

 java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
 at
 java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
 at

 java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:172)
 at

 java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
 at

 java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
 at

 org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
 at

 org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
 at
 org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
 at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
 at java.lang.Thread.run(Redefined)
 
 
 Killing the thread stops the cpu, but then Tomcat does not work.  Any
 ideas
 what would be causing this?

 You might look for other threads, that do something. I would be especially
 suspicious about array resizing operations.

 Regards
 Felix

 
 
 Cheers Greg


 -
 To unsubscribe, e-mail: users-unsubscr

Re: Fwd: Tomcat 8 and Java 8

2015-04-17 Thread Greg Huber
Chris,

My startup script (many years old) uses:

CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/bootstrap.jar

So its quite possible if the $CLASSPATH is empty we get the :/

The odd thing is why does it work when run from the command line but not
from /etc/rc.d/init.d as both use case have the colon.

https://bz.apache.org/bugzilla/show_bug.cgi?id=57823

Cheers Greg

On 17 April 2015 at 06:48, Christopher Schultz ch...@christopherschultz.net
 wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Greg,

 On 4/16/15 12:06 PM, Greg Huber wrote:
  ..To follow on, for others going grey also.
 
  The file:/ seems to be from a :/ (colon) on the class path, and
  the combination of running it from /etc/rc.d/init.d makes it not
  work.
 
  Not working -classpath
  :/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache
 - -tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar
 
 
 
  Working -classpath
  /opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache-
 tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar
 
 
 
  I guess we need to check for file:/ so we do not scan the whole
  server.

 Whoops.

 My first reaction is don't do that, but it seems like a stray colon
 shouldn't really be valid in the classpath, so Tomcat probably ought
 to ignore  (empty string) classpath entries.

 Could you file a Bugzilla issue?
 https://bz.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%209

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2
 Comment: GPGTools - http://gpgtools.org

 iQIcBAEBCAAGBQJVMJ68AAoJEBzwKT+lPKRYYqEP/jihtZvF2zQPA7dF+l4HNZ6r
 ZndnLNIh1FFC6HCeo/LKA2IWr9ISRw+2g5Iuftaz9RJRmdmCP2fYUrODwlZOLbU4
 Z9vj1Pc4pCXDKJ2mxTAK1hWMWTP3FwqIM02iw7dli8hiCBs7TM97gtU6u/AhpKYS
 l9Fd+ynZM377zCnvoBSQ+3C744Roat9a6XZQvvAcIdWkC7ELVCXB7KNF4xtUHO4r
 ezPUWzbPV6GaE5Y81kxoRIKQOGUq+/JX3q2jaH3b5zVXMWmsVfQY68Mo3UyjpMJ1
 ymiPZIYXAKJrXrY5SWhGSB6wzzx6nJVesINQB0O2ykZW/SjiXwyZpVqiMPf0tOmP
 +xIAaNRFXgT6eH7Rs8+U0n8b+fSZ3uJuqB7zZDWvK0xSwjB1bYt2vRBRH28L+o1x
 B2tDaDlJQfhsNji78/AiqiYiJcLrXzsJiB/niuVQSggTuGiOUtiHfY2BpbXCRnoU
 4oIU5Rety5NKO6oXeB++ZUYF97QY5OfhTjLLrXxv8ehsUG74jZlrO7xDUIgmY86+
 /Mw9EYmBWXk9l0qNBk6TqK8N8244rwvLZHmtGiKzhih+Iw+uIP+mjICjW+++Aw3j
 BRmTf/MyrdD2gIO7h/m0GGOpJsAugQ9IJu7UPDC4g4vZBtWUtUEY9lGzzxcOdAoS
 utxJvmUG9Ha9WfBsRyBV
 =OIAY
 -END PGP SIGNATURE-

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




Re: Tomcat 8 and Java 8

2015-04-16 Thread Greg Huber
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

VM Thread prio=10 tid=0x7fed9c064000 nid=0x7966 runnable

GC task thread#0 (ParallelGC) prio=10 tid=0x7fed9c01f000 nid=0x7964
runnable

GC task thread#1 (ParallelGC) prio=10 tid=0x7fed9c020800 nid=0x7965
runnable

VM Periodic Task Thread prio=10 tid=0x7fed9c09c000 nid=0x796d waiting
on condition

JNI global references: 170

Heap
 PSYoungGen  total 67072K, used 53648K [0xf550,
0xfa48, 0x0001)
  eden space 57856K, 92% used
[0xf550,0xf895c028,0xf8d8)
  from space 9216K, 0% used
[0xf9b8,0xf9b88000,0xfa48)
  to   space 11776K, 0% used
[0xf8d8,0xf8d8,0xf990)
 ParOldGen   total 87552K, used 75462K [0xe000,
0xe558, 0xf550)
  object space 87552K, 86% used
[0xe000,0xe49b1b38,0xe558)
 PSPermGen   total 21504K, used 12727K [0xdae0,
0xdc30, 0xe000)
  object space 21504K, 59% used
[0xdae0,0xdba6df00,0xdc30)

On 15 April 2015 at 14:19, Mark Thomas ma...@apache.org wrote:

 On 15/04/2015 03:28, Greg Huber wrote:
  Hello,
 
  I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on
 centos 7

 Did you use the packaged version of Tomcat or did you download a
 distribution from the ASF?

  I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:
 
  daemon --user $tomcatuser --pidfile=$pidfile $command start
 
  When I run the script using the command line it runs as expected, but
 when
  it runs from the system-config-services is seems to hang and does not
  deploy the application.  Here are the exceptions from the startup:

 I think the hang and the CNFE are two separate issues.

  15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1]
  org.apache.catalina.util.Introspection.loadClass Failed to load class
 [{0}]
   java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint

 The [{0}] indicates a Tomcat bug. It should be providing the class name
 to the error message. Not a big deal as we can see it from the exception
 but I'll get that fixed anyway.

 Those classes should be part of the examples web application. It is odd
 that they can't be found. Could you provide the full stack trace for one
 of these exceptions please.

 snip/

  here is the output when starting:

 snip/

  INFO: Deploying configuration descriptor
  /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml

 Take a thread dump when Tomcat hangs. I suspect that the session manager
 is waiting for entropy (for session ID generation). See

 http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source

 Mark


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




Re: Tomcat 8 and Java 8

2015-04-16 Thread Greg Huber
I have done some some debugging and it seems to be in

org.apache.catalina.startup.ContextConfig.java

.

protected void processAnnotationsUrl(URL url, WebXml fragment,
boolean handlesTypesOnly) {

if (url == null) {
// Nothing to do.
return;
} else if (jar.equals(url.getProtocol())) {
System.out.println(url.toExternalForm());
processAnnotationsJar(url, fragment, handlesTypesOnly);
} else if (file.equals(url.getProtocol())) {
try {
System.out.println(url.toExternalForm());
processAnnotationsFile(
   new File(url.toURI()), fragment, handlesTypesOnly);
} catch (URISyntaxException e) {
log.error(sm.getString(contextConfig.fileUrl, url), e);
}
} else {
log.error(sm.getString(contextConfig.unknownUrlProtocol,
url.getProtocol(), url));
}

}


If I comment out the recursive call so it works it
..
file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mariadb-java-client-1.1.8.jar!/
file:/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/activation.jar!/
Apr 16, 2015 3:54:01 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
Apr 16, 2015 3:54:17 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deployment of configuration descriptor
/opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml
has finished in 19,071 ms


And the put the lines back in

file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mysql-connector-java-5.1.34.jar!/
file:/


it gets stuck on file:/

So is it trying to scan the whole drive?


Can any one help on this?  Or should I log a jira report?

Cheers Greg



On 15 April 2015 at 14:19, Mark Thomas ma...@apache.org wrote:

 On 15/04/2015 03:28, Greg Huber wrote:
  Hello,
 
  I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on
 centos 7

 Did you use the packaged version of Tomcat or did you download a
 distribution from the ASF?

  I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:
 
  daemon --user $tomcatuser --pidfile=$pidfile $command start
 
  When I run the script using the command line it runs as expected, but
 when
  it runs from the system-config-services is seems to hang and does not
  deploy the application.  Here are the exceptions from the startup:

 I think the hang and the CNFE are two separate issues.

  15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1]
  org.apache.catalina.util.Introspection.loadClass Failed to load class
 [{0}]
   java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint

 The [{0}] indicates a Tomcat bug. It should be providing the class name
 to the error message. Not a big deal as we can see it from the exception
 but I'll get that fixed anyway.

 Those classes should be part of the examples web application. It is odd
 that they can't be found. Could you provide the full stack trace for one
 of these exceptions please.

 snip/

  here is the output when starting:

 snip/

  INFO: Deploying configuration descriptor
  /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml

 Take a thread dump when Tomcat hangs. I suspect that the session manager
 is waiting for entropy (for session ID generation). See

 http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source

 Mark


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




Fwd: Tomcat 8 and Java 8

2015-04-16 Thread Greg Huber
..To follow on, for others going grey also.

The file:/ seems to be from a :/ (colon) on the class path, and the
combination of running it from /etc/rc.d/init.d makes it not work.

Not working
-classpath
:/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache-tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar


Working
-classpath
/opt/apache-tomcat/apache-tomcat-8.0.21/bin/bootstrap.jar:/opt/apache-tomcat/apache-tomcat-8.0.21/bin/tomcat-juli.jar


I guess we need to check for file:/ so we do not scan the whole server.

Cheers Greg







I have done some some debugging and it seems to be in

org.apache.catalina.startup.ContextConfig.java

.

protected void processAnnotationsUrl(URL url, WebXml fragment,
boolean handlesTypesOnly) {

if (url == null) {
// Nothing to do.
return;
} else if (jar.equals(url.getProtocol())) {
System.out.println(url.toExternalForm());
processAnnotationsJar(url, fragment, handlesTypesOnly);
} else if (file.equals(url.getProtocol())) {
try {
System.out.println(url.toExternalForm());
processAnnotationsFile(
   new File(url.toURI()), fragment, handlesTypesOnly);
} catch (URISyntaxException e) {
log.error(sm.getString(contextConfig.fileUrl, url), e);
}
} else {
log.error(sm.getString(contextConfig.unknownUrlProtocol,
url.getProtocol(), url));
}

}


If I comment out the recursive call so it works it
..
file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mariadb-java-client-1.1.8.jar!/
file:/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/activation.jar!/
Apr 16, 2015 3:54:01 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
Apr 16, 2015 3:54:17 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deployment of configuration descriptor
/opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml
has finished in 19,071 ms


And the put the lines back in

file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/
jar:file:/opt/apache-tomcat/apache-tomcat-8.0.21/lib/mysql-connector-java-5.1.34.jar!/
file:/


it gets stuck on file:/

So is it trying to scan the whole drive?


Can any one help on this?  Or should I log a jira report?

Cheers Greg



On 15 April 2015 at 14:19, Mark Thomas ma...@apache.org wrote:

 On 15/04/2015 03:28, Greg Huber wrote:
  Hello,
 
  I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on
 centos 7

 Did you use the packaged version of Tomcat or did you download a
 distribution from the ASF?

  I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:
 
  daemon --user $tomcatuser --pidfile=$pidfile $command start
 
  When I run the script using the command line it runs as expected, but
 when
  it runs from the system-config-services is seems to hang and does not
  deploy the application.  Here are the exceptions from the startup:

 I think the hang and the CNFE are two separate issues.

  15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1]
  org.apache.catalina.util.Introspection.loadClass Failed to load class
 [{0}]
   java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint

 The [{0}] indicates a Tomcat bug. It should be providing the class name
 to the error message. Not a big deal as we can see it from the exception
 but I'll get that fixed anyway.

 Those classes should be part of the examples web application. It is odd
 that they can't be found. Could you provide the full stack trace for one
 of these exceptions please.

 snip/

  here is the output when starting:

 snip/

  INFO: Deploying configuration descriptor
  /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml

 Take a thread dump when Tomcat hangs. I suspect that the session manager
 is waiting for entropy (for session ID generation). See

 http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source

 Mark


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




Re: Tomcat 8 and Java 8

2015-04-15 Thread Greg Huber
nid=0x7dee waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE

C2 CompilerThread0 #5 daemon prio=9 os_prio=0 tid=0x7f110c0b1800
nid=0x7ded waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE

Signal Dispatcher #4 daemon prio=9 os_prio=0 tid=0x7f110c0b
nid=0x7dec waiting on condition [0x]
   java.lang.Thread.State: RUNNABLE

Finalizer #3 daemon prio=8 os_prio=0 tid=0x7f110c079800 nid=0x7deb in
Object.wait() [0x7f10f37b4000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked 0xe01794b0 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

Reference Handler #2 daemon prio=10 os_prio=0 tid=0x7f110c077800
nid=0x7dea in Object.wait() [0x7f10f38b5000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked 0xe0179720 (a java.lang.ref.Reference$Lock)

main #1 prio=5 os_prio=0 tid=0x7f110c009000 nid=0x7de6 waiting on
condition [0x7f111203a000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  0xe1029b78 (a
java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:917)
- locked 0xe01797a0 (a
org.apache.catalina.core.StandardEngine)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
- locked 0xe01797a0 (a
org.apache.catalina.core.StandardEngine)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
- locked 0xe01797a0 (a
org.apache.catalina.core.StandardEngine)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
- locked 0xe01797a0 (a
org.apache.catalina.core.StandardEngine)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
- locked 0xe01798d8 (a
org.apache.catalina.core.StandardService)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769)
- locked 0xe0179920 (a java.lang.Object)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
- locked 0xe26bdfb0 (a
org.apache.catalina.core.StandardServer)
at org.apache.catalina.startup.Catalina.start(Catalina.java:625)
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:497)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

VM Thread os_prio=0 tid=0x7f110c072800 nid=0x7de9 runnable

GC task thread#0 (ParallelGC) os_prio=0 tid=0x7f110c01e000 nid=0x7de7
runnable

GC task thread#1 (ParallelGC) os_prio=0 tid=0x7f110c02 nid=0x7de8
runnable

VM Periodic Task Thread os_prio=0 tid=0x7f110c0bc000 nid=0x7df0
waiting on condition

JNI global references: 48

Heap
 PSYoungGen  total 128000K, used 16896K [0xf558,
0xff70, 0x0001)
  eden space 98816K, 15% used
[0xf558,0xf64e8220,0xfb60)
  from space 29184K, 3% used
[0xfda8,0xfdb98000,0xff70)
  to   space 33280K, 0% used
[0xfb60,0xfb60,0xfd68)
 ParOldGen   total 87552K, used 71597K [0xe000,
0xe558, 0xf558)
  object space 87552K, 81% used
[0xe000,0xe45eb4e0,0xe558)
 Metaspace   used 13063K, capacity 13242K, committed 13568K, reserved
1060864K
  class spaceused 1396K, capacity 1472K, committed 1536K, reserved
1048576K


Cheers Greg.


On 15 April 2015 at 14:19, Mark Thomas ma...@apache.org wrote:

 On 15/04/2015 03:28, Greg Huber wrote:
  Hello,
 
  I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on
 centos 7

 Did you use the packaged version of Tomcat or did you download a
 distribution from the ASF?

  I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:
 
  daemon --user $tomcatuser --pidfile=$pidfile $command start
 
  When I run the script using the command line it runs as expected, but
 when
  it runs from the system

Re: Tomcat 8 and Java 8

2015-04-15 Thread Greg Huber
Mark,

See

http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source
http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source

I tried adding -Djava.security.egd=file:/dev/./urandom and it made no
difference.


Btw the same setup it seems to deploy OK when run via system-config-service
using jsvc :

cd $CATALINA_HOME
./bin/jsvc \
-classpath
$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.jar \
-user $tomcatuser \
-pidfile $pidfile \
-procname $servicename \
-outfile $CATALINA_BASE/logs/catalina.out \
-errfile $CATALINA_BASE/logs/catalina.err \
-Xms128M -Xmx512m \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap

But our jenkins stuff does not seem to like the jsvc (won't restart
itself).

Cheers Greg.



On 15 April 2015 at 14:19, Mark Thomas ma...@apache.org wrote:

 On 15/04/2015 03:28, Greg Huber wrote:
  Hello,
 
  I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on
 centos 7

 Did you use the packaged version of Tomcat or did you download a
 distribution from the ASF?

  I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:
 
  daemon --user $tomcatuser --pidfile=$pidfile $command start
 
  When I run the script using the command line it runs as expected, but
 when
  it runs from the system-config-services is seems to hang and does not
  deploy the application.  Here are the exceptions from the startup:

 I think the hang and the CNFE are two separate issues.

  15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1]
  org.apache.catalina.util.Introspection.loadClass Failed to load class
 [{0}]
   java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint

 The [{0}] indicates a Tomcat bug. It should be providing the class name
 to the error message. Not a big deal as we can see it from the exception
 but I'll get that fixed anyway.

 Those classes should be part of the examples web application. It is odd
 that they can't be found. Could you provide the full stack trace for one
 of these exceptions please.

 snip/

  here is the output when starting:

 snip/

  INFO: Deploying configuration descriptor
  /opt/apache-tomcat/apache-tomcat-8.0.21/conf/Catalina/localhost/ROOT.xml

 Take a thread dump when Tomcat hangs. I suspect that the session manager
 is waiting for entropy (for session ID generation). See

 http://wiki.apache.org/tomcat/HowTo/FasterStartUp?highlight=%28entropy%29#Entropy_Source

 Mark


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




Tomcat 8 and Java 8

2015-04-15 Thread Greg Huber
Hello,

I am trying to upgrade my app to Tomcat 8 and Java 8 (1.8.0_40) on centos 7

I have a startup in /etc/rc.d/init.d script that uses the daemon  eg:

daemon --user $tomcatuser --pidfile=$pidfile $command start

When I run the script using the command line it runs as expected, but when
it runs from the system-config-services is seems to hang and does not
deploy the application.  Here are the exceptions from the startup:

localhost.2015-04-15.log :

15-Apr-2015 09:10:14.677 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.drawboard.DrawboardEndpoint
15-Apr-2015 09:10:14.722 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.echo.EchoStreamAnnotation
15-Apr-2015 09:10:14.728 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.echo.EchoAnnotation
15-Apr-2015 09:10:14.733 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.echo.EchoEndpoint
15-Apr-2015 09:10:14.746 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.snake.SnakeAnnotation
15-Apr-2015 09:10:14.751 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.chat.ChatAnnotation
15-Apr-2015 09:10:14.753 FINE [localhost-startStop-1]
org.apache.catalina.util.Introspection.loadClass Failed to load class [{0}]
 java.lang.ClassNotFoundException: websocket.ExamplesConfig


here is the output when starting:

Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server version:Apache Tomcat/8.0.21
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server built:  Mar 23 2015 14:11:21 UTC
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Server number: 8.0.21.0
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: OS Name:   Linux
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: OS Version:2.6.32-504.12.2.el6.x86_64
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Architecture:  amd64
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Java Home: /opt/oraclejava1.8/jdk1.8.0_40/jre
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: JVM Version:   1.8.0_40-b26
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: JVM Vendor:Oracle Corporation
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: CATALINA_BASE: /opt/apache-tomcat/apache-tomcat-8.0.21
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: CATALINA_HOME: /opt/apache-tomcat/apache-tomcat-8.0.21
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Xms128M
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Xmx512m
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Duser.timezone=Europe/London
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.util.logging.config.file=/opt/apache-tomcat/apache-tomcat-8.0.21/conf/logging.properties
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument: -Djava.endorsed.dirs=
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Dcatalina.base=/opt/apache-tomcat/apache-tomcat-8.0.21
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Dcatalina.home=/opt/apache-tomcat/apache-tomcat-8.0.21
Apr 15, 2015 9:09:48 AM org.apache.catalina.startup.VersionLoggerListener
log
INFO: Command line argument:
-Djava.io.tmpdir=/opt/apache-tomcat/apache-tomcat-8.0.21/temp
Apr 15, 2015 9:09:48 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR
version 1.3.9.
Apr 15, 2015 9:09:48 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random