Re: Is the thread status of tomcat 8.0.44 normal?

2018-03-28 Thread Shawn Heisey

On 3/28/2018 6:28 PM, 이의준 wrote:

Test sequence and inquiry contents

1. In the local test, the same load (hp-jmeter) for tomcat 7, 8 5 minutes,

2. Thread dump generated after 5 minutes of load termination

3. Most Thread in Tomcat 7 is in TIME_WAITING state (normally OK)

4. Thread in Tomcat 8 mostly RUNNABLE state (estimated to be abnormal)

  Thread Final Stack - Below (reading something)

  at org.apache.tomcat.jni.Socket.recvbb (Native Method)


I'm not an expert by any means.  I have only an elementary understanding 
of what the combined information on a thread dump says about system health.


Presumably if the server is not busy, most of the threads will be idle, 
waiting for something to do.  Whether threads that are "idle" will show 
up as runnable or waiting will depend on the *exact* part of the code 
that the thread is running at the moment of the dump.


I would imagine that if a thread can be kept in a runnable state instead 
of a waiting state while it is doing "nothing" and waiting for work, 
that thread will probably respond faster when the work actually 
arrives.  If the thread is in a waiting state, Java probably has to 
explicitly tell the thread to wake up before it will begin processing.


Looking at your actual stacktraces, I see that the Tomcat 8 thread is 
sitting at "org.apache.tomcat.jni.Socket.recvbb(Native Method)".  Tomcat 
7 is sitting at "sun.misc.Unsafe.park(Native Method)", and indicates 
that it is waiting on a lock object -- it says "parking to wait for  
<0x83769178> (a 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)" 
right after the first line of the stacktrace.


Documentation about the "recvbb" method says that this is the method 
that receives a block of data from the network.  And the stacktrace says 
that it is a "native" method -- which I am reasonably certain means that 
it is compiled native code for the CPU that isn't actually part of 
Java.  If I'm correct about that, it means that the "do nothing" part of 
this code is completely outside Java.  As far as Java is concerned, that 
thread is running, not waiting, because the pause is not being handled 
by Java.


For Tomcat 7, the thread is running Java code only, and it is using 
Java's locking mechanisms to keep the thread in a "paused" state.  Java 
actually knows that the thread is waiting.  The Unsafe.park method IS 
native code, but it is native code that's actually part of Java, so Java 
is able to detect precisely what it's doing.


The native code is more efficient than the Java code.  When a block of 
data finally arrives from the network, the native code can process that 
data very quickly and return control to Java on a thread that is 
*already* in a runnable state.  The Tomcat 7 code must go through the 
process of releasing and acquiring a lock before that thread can resume 
executing.  The time difference on a single request would be 
undetectable by a person, but for systems with high utilization, that 
difference could affect how much hardware is required to handle a 
certain request load.


Native libraries are available for both Tomcat versions.

https://tomcat.apache.org/tomcat-7.0-doc/apr.html

If you were to install/activate the native library for Tomcat 7, I bet 
that version would have very similar thread dumps to Tomcat 8.


Thanks,
Shawn


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



Is the thread status of tomcat 8.0.44 normal?

2018-03-28 Thread 이의준
Hi! 

 

I posted the same question a few days ago, but it was not a satisfactory
answer.

So I ask again.

 

Test sequence and inquiry contents

1. In the local test, the same load (hp-jmeter) for tomcat 7, 8 5 minutes,

2. Thread dump generated after 5 minutes of load termination

3. Most Thread in Tomcat 7 is in TIME_WAITING state (normally OK)

4. Thread in Tomcat 8 mostly RUNNABLE state (estimated to be abnormal)

 Thread Final Stack - Below (reading something)

 at org.apache.tomcat.jni.Socket.recvbb (Native Method)

 

5. Is the thread status of Tomcat 8 normal?

 

Please let us know if we need additional resources to analyze this issue.

 

#Tomcat 8

"ajp-apr-7009-exec-1083" #19321 daemon prio=5 os_prio=0
tid=0x7fcd1405d800 nid=0x19fe runnable [0x7fcc373f2000]

   java.lang.Thread.State: RUNNABLE

   at org.apache.tomcat.jni.Socket.recvbb(Native Method)

   at
org.apache.coyote.ajp.AjpAprProcessor.readSocket(AjpAprProcessor.java:256)

   at
org.apache.coyote.ajp.AjpAprProcessor.read(AjpAprProcessor.java:197)

   at
org.apache.coyote.ajp.AbstractAjpProcessor.readMessage(AbstractAjpProcessor.
java:1091)

   at
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java
:804)

   at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:684)

   at
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEnd
point.java:2458)

   - locked <0xf6bce3a0> (a
org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)

   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
42)

   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

   at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

   at java.lang.Thread.run(Thread.java:748)

 

#Tomcat 7

"ajp-apr-7009-exec-111" #10247 daemon prio=5 os_prio=0
tid=0x7fa6b811f000 nid=0x2f51 waiting on condition [0x7fa6aa7b8000]

   java.lang.Thread.State: TIMED_WAITING (parking)

   at sun.misc.Unsafe.park(Native Method)

   - parking to wait for  <0x83769178> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

   at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)

   at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitN
anos(AbstractQueuedSynchronizer.java:2078)

   at
java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)

   at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)

   at
org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)

   at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066
)

   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
27)

   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
17)

   at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

   at java.lang.Thread.run(Thread.java:745)

 

 



Re: User session validation

2018-03-28 Thread George S.



On 3/28/2018 5:20 PM, Alex O'Ree wrote:

Does tomcat do any validation on session id's based on up addresses? I'm
thinking that if some one intercepts the session token and tries to use it
from another ip address,  then it's feasible to detect this and invalidate
the session.


If you're using SSL, I don't think intercepting the session ID would be 
possible.


--
George S.
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com


User session validation

2018-03-28 Thread Alex O'Ree
Does tomcat do any validation on session id's based on up addresses? I'm
thinking that if some one intercepts the session token and tries to use it
from another ip address,  then it's feasible to detect this and invalidate
the session.


Re: Getting all JDBC configs from the context

2018-03-28 Thread Shawn Heisey
On 3/28/2018 1:18 PM, Christopher Schultz wrote:
> > I would like to write a logging thread that can get ALL of the
> > datasource objects from the context, and for types that it knows,
> > cast them to the appropriate object to log the active/idle
> > connection counts.
>
> It might be easier to do this via JMX.

Perhaps.  But then I have to figure out how to get the program started
with the sysprops that enable remote JMX.  The system has no GUI, and we
don't have any X-Windows infrastructure, so running JDK tools locally on
the Linux server is challenging.  Not impossible, just requires me to
set up things that I don't already have, to do X forwarding over SSH. 
With the logging thread idea, we just need to update code, recompile,
and redeploy.

> Since you already have a compile-time dependency upon Tomcat, there's
> no need to do class-name matching. Instead, just use "instanceof" as
> before:

I did the code that way so that I can handle any type of DataSource
object, even if we change our pool configurations, just by adding
stanzas to the switch.  And the default case logs the class name if it's
not handled explicitly, so I know what to add or change.  I went looking
for a way to write a switch statement that utilizes instanceof, didn't
find anything.

> Instead of running a single thread that goes to sleep, maybe consider
> using a ScheduledExecutorService with a simpler runnable object that
> just logs the status a single time.

Sounds like a good idea.  That I have absolutely no idea how to
implement.  I used the hammer I know. :)

> Don't forget to terminate the thread (or ExecutorService) when the
> application is shutting-down, of you'll have a ClassLoader (and a a
> huge memory) leak.

I did think about that, but I wasn't sure how to detect a shutdown.  Is
there something available that handles it easily and reliably with only
a small code change?  Just now, I found the following page when I went
looking for how to detect that (independent of the JVM shutting down):

http://www.deadcoderising.com/execute-code-on-webapp-startup-and-shutdown-using-servletcontextlistener/

I think I could use this to create the thread on application startup as
well as making sure it shuts down cleanly.  It would mean that I can
just create a new class for one of our applications and edit a config
file, instead of monkeying with other people's code.

It's very encouraging to me that you picked up on the lack of shutdown
handling.  It means I've got more than a sliver of your attention!

Thanks,
Shawn


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



Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Phil Steitz
On 3/28/18 11:29 AM, Christopher Schultz wrote:
> Phil,
>
> On 3/27/18 1:03 PM, Phil Steitz wrote:
> > On 3/26/18 10:28 AM, Christopher Schultz wrote:
> >> Shawn,
> >>
> >> On 3/25/18 12:17 AM, Shawn Heisey wrote:
> >>> On 3/24/2018 5:04 PM, Mark Thomas wrote:
>  Regarding your configuration:   auth="Container"
>  factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
>  driverClassName="com.mysql.jdbc.Driver"
>  type="javax.sql.DataSource" maxActive="60" maxIdle="10"
>  maxWait="3" removeAbandoned="true"
>  removeAbandonedTimeout="30" username="REDACTED"
>  password="REDACTED" testOnBorrow="true"
>  validationQuery="select 1"
> 
> >>
> url="jdbc:mysql://REDACTED.REDACTED.com:3306/REDACTED?autoReconnect=t
> >>
> >>
> ruezeroDateTimeBehavior=round"
> 
> 
> 
> >> />
> 
>  Generally, that looks OK but I'd strongly recommend that you
>  use "autoReconnect=false" in the URL. autoReconnect is known
>  to be problematic with connection pools.
> 
>  The removeAbandonedTimeout looks low but if all the queries
>  are expected to be well under 30s then that should be OK.
> >>
> >>> Somehow I did not see this part of your email at all when I
> >>> read it the first time.  I just noticed it.  My previous reply
> >>> probably has you scratching your head a little bit.  I'm sorry
> >>> about that!
> >>
> >>> The timeout of 30 seconds is EXTREMELY low.  And if it were
> >>> being honored, we would have customers lining up outside the
> >>> office with pitchforks.  The webapp has reporting ability for
> >>> users with elevated privileges, and a lot of those reports take
> >>> a minute or two to run, sometimes even longer.  So if the pool
> >>> were killing connections after 30 seconds, the reporting
> >>> mechanism would be failing a LOT.  If you check the *planned*
> >>> configuration, you'll see that I have increased this timeout to
> >>> 3600.  I wanted to make it 900, but some of the developers are
> >>> worried that 900 is too aggressive.
> >>
> >> The pool doesn't kill abandoned connections. It simply removes
> >> them from the pool. Otherwise, you're right: you'd have torches
> >> and pitchforks everywhere.
>
> > Not exactly, if what you are using is the DBCP pool.  To see the
> > details of what is going on, look at the removeAbandoned code in
> > DBCP's AbandonedObjectPool.  It calls
> > o.a.c.pool.GenericObjectPool#invalidateObject, which calls
> > o.a.c.dbco.PoolableConnectionFactory#destroyObject to close the
> > connection.  If an exception occurs, it is swallowed by
> > removeAbandoned, but it dumps a stack trace.
>
> Is this DBCP, or DBCP2, or both?
>
> OP is running Tomcat 7.0.x. which uses DBCP(1.x)

Above references are to the 1.x versions.  In 2.x, the
AbandonedObjectPool was moved into Commons pool, but the behavior is
basically the same - connections marked abandoned get invalidated by
the pool and destroyed by the factory.  Exceptions on close are
swallowed with stack traces dumped to stderr.

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


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



Re: HOME user folder change & tomcat HOME

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jérôme,

On 3/27/18 11:27 AM, Jérôme Redouté wrote:
> I've installed tomcat8 on Debian 9, to run a web App (XNAT)
> 
> I've a proble concerning the HOME directory of my user "xnat".
> 
> Before the HOME was, as expected, in /home/xnat
> 
> but now (after deploying XNAT app), it moved to /var/lib/tomcat8

Do you mean the HOME environment variable? Or something else?

Most "services" do not have a "HOME" in the usual sense.

Why do you need HOME to be something specific?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq76zgACgkQHPApP6U8
pFgIyA//ZNyQ3dpfRdANup+Gzfn5efwAbjRoEUIlpa/fjNbl6odq2V6pTlm7cyaA
MO77HYA07KaiK7G/MImBSjqIbLodPnFMyicLeBUFFh9A+nurTHT4PfXaHSjvluA3
fKuPjiNciiUuAWxNk2I6rDMcmIskmIFaM2U9CM3NiNk9jInjBSxtragxRh/pD3mB
oc9DShTnW96SW25zJf5ZDUnuS202hhO8F7s07d9dxVDoDXdDdMEbeEhz4eHIcoWk
tSiNwhpPXEoUILtiemYyk/1tA/BJoWY+oqMeeD+4Qf3KV5JX7UjK1tcfqO4qhE4F
O9s3OMP3g9WyHqRCsUz5smZ5zjDLouK5zE7M6DHhnwHmjuhU+MindSBkTBa8nkO3
CMfYieTPcsZPuCiexSiPVVNEewrK9+ijBj5Tf6M4BeLyTEvvN0lob6dGt5vKsnAS
kpxtOmAqZnT5C4hcxdgYXN7tyiSj9OCsYaESw/hl//4Z67/wbbVvdz8FKMQ6KHH8
ccvQ2OSMoOfvyyph1JXG4mC/vKkge7KQGdMx6LNu8dEFyJeKUZZfi9k8dH7Dvm2m
3HT/D28+MdvxV2smlijCgPBSdksc8CcIPPKQDmos2aMDQ9Ehb5ePqNWq5TWwLBRt
FUwm308+Hatdj1zkMQjmWoRvNs4sPTRaFbaPUptrljB5pF8tEPc=
=y8u/
-END PGP SIGNATURE-

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



Re: Getting all JDBC configs from the context

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Shawn,

On 3/27/18 10:26 PM, Shawn Heisey wrote:
> This is what the code in our application looks like that gets a 
> datasource object from the context:
> 
> Context initContext = new InitialContext(); Context envContext  =
> (Context)initContext.lookup("java:/comp/env"); DataSource ds =
> (DataSource)envContext.lookup("jdbc/REDACTED");
> 
> I would like to write a logging thread that can get ALL of the 
> datasource objects from the context, and for types that it knows,
> cast them to the appropriate object to log the active/idle
> connection counts.

It might be easier to do this via JMX.

> This paste is the idea I've thought of for initializing and
> creating this logging thread:
> 
> https://paste.apache.org/QcbE
> 
> The "log" variable is an slf4j Logger object.
> 
> Does that code look like it'll work, if we run it once at system 
> startup?  It doesn't have any errors in my IDE.  Which is not
> always an indication of success!

Since you already have a compile-time dependency upon Tomcat, there's
no need to do class-name matching. Instead, just use "instanceof" as
before:

DataSource ds = myMap.get(dsName);
if(ds instanceof org.apache.tomcat.dbcp.dbcp.BasicDataSource)
{
  (cast)
  (log)
}

Instead of running a single thread that goes to sleep, maybe consider
using a ScheduledExecutorService with a simpler runnable object that
just logs the status a single time.

Don't forget to terminate the thread (or ExecutorService) when the
application is shutting-down, of you'll have a ClassLoader (and a a
huge memory) leak.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq76pYACgkQHPApP6U8
pFixAw//Ue6UyyLh+y59CEFalOrW0credrwh+i986CYL52wujdmgqmRts1o86N1s
UcSQ3dF4dp6VwZpaiZYrl2dJoxsk6alSkxGJ8zFQ4BsTps5fCehcWdBBf/iWT+Bz
/vbTqo/5o6g8/Sz8GqZ6AUD0gzU1TxIqqy30v5+7hClYLHVR0jZdTlWlX4bq8o44
OKC5imdV2jSCzJeq864BJNSA6/Ttcxsp4OrWZiHMc4YlW6tz7O8jqeB4t4wO+E8f
SoIla76A1L8dajtw85E1PPGFsD4pyBKrcMW9RIlt/ZqoQyI5UbDwOjN4MFBi6AnI
TSwj5fXcjLuFDoXwiZJo8Pvc6fLEc9m2Dd8LNfmnd4j68u+cPCWsE46GCpPZPdat
SAg2yPD0aZBLF/gdi8TFvVES/wQ4BN7s/TqjakxLPJVfSngzX789hyB0Wo8n2rEM
uil5KNyAw4QqnMZft+f5/t8tQ5A5XzU1Sfbxb/WOYI1tR5LwRvRbXiotRxw6lHAs
H+gdM0xXp16IWpyUJuSnczR1BXZhNplZMVozObhbzzzK0XhbBVqnpJRSdP087SNW
TY55/cAudvU8cMyzkF+1WicNPhdDKwqylcwiVHhiSOUduwlip70bMdjpBlMPmblg
sYBBS8X5nfnr52+hL/Qdgx1LZ/Zws5BoHl7q1drzq+SIPyPe5r0=
=eeI8
-END PGP SIGNATURE-

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



Re: Granting permission to a single application-supplied JAR

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

George,

On 3/27/18 8:33 PM, George S. wrote:
> One thing that has bitten me is that the entire stack/call chain
> is examined, not just permissions on a specific piece of code as
> you would expect. This comes into play when you're trying to make
> calls into trusted code from a JSP.

JSP isn't an issue for me.

> My experience has been that JSPs are not trusted. So, even if you
> grant some code permissions to a specific codebase, the JSP making
> the call is untrusted and things fail. I ran into this recently
> using the Apache LDAP library with a JSP. A bunch of reads would
> fail.
> 
> I see the tomcat security manager howto makes a reference to 
> "pre-compiled jsp" but it's pretty vague (to my simple mind
> anyhow). I think the intention was to have pre-compiled JSPs live
> in a trusted codebase path.

Yes, that can be done e.g. by placing them into a JAR and trusting the
JAR.

> There's probably a way that you can mark all JSPs as trusted (I'm
> thinking a grant to $CATALINA_BASE/work/Catalina), but that kind of
> defeats the point. If you mark standard JSPs as trusted, then 
> anyone that can get a file in the context path can bypass your
> security model.
> 
> What I ended up doing on the last project was putting all of the
> code that made the calls into the Apache LDAP directory into a
> specific jar, and signing that jar with a certificate. Then I have
> a grant that trusts anything signed with that certificate.

I'd prefer to avoid signing if possible... we perform on-server builds
for everything, so that would mean distributing the signing-keys or
having a really awful process for building on-server and signing
off-server.

> The security manager can be maddening to work with. Just as a tip
> for my specific usage, I have a skeleton policy file and the tomcat
> startup script merges my policy file into Tomcat's policy file. I
> just found there's another way of doing that, but it doesn't look
> any better since it requires modifying a file in $JDK/JRE_HOME.

My plan was simply to append my own "additional" grants on to the end
of the Tomcat policy.

So far, I haven't had any luck using "grant" with ANY codebase at this
point.

Thanks,
- -chris

> On 3/22/2018 3:39 PM, Christopher Schultz wrote: All,
> 
> I'm working on getting my application working under a
> SecurityManager. It's actually been a little less painful than I
> thought it would be.
> 
> I'm using Solr for some index searching. I'm using SolrJ for the 
> library to communicate via HTTP to a localhost Solr server. When
> using this grant:
> 
> grant { permission "java.util.PropertyPermission" 
> "solr.httpclient.builder.factory", "read"; permission
> "java.net.SocketPermission", "localhost:8983", "resolve,connect"; 
> }
> 
> My application can can contact Solr without any errors.
> 
> If I change the "grant" to include a codeBase to restrict those 
> connections to the Solr library, I get a AccessControlException: 
> access denied to the system property. Here is the modified grant:
> 
> 
> grant codeBase 
> "file:${catalina.base}${file.separator}webapps${file.separator}myapp${
fi
>
> 
le.separator}WEB-INF${file.separator}lib${file.separator}solr-solrj-7.2.
> 1.jar" { permission "java.util.PropertyPermission" 
> "solr.httpclient.builder.factory", "read"; permission
> "java.net.SocketPermission" "localhost:8983", "resolve,connect"; 
> };
> 
> I have verified that the file exists under the path specified
> above. I tried both ${file.separator} and '/' as the file
> separator. I also tried "jar:/path/to/jar!/-" as the codeBase. No
> luck.
> 
> These grants are added to the end of the stock catalina.policy
> file that ships with Tomcat.
> 
> What am I missing, here?
> 
> -chris
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq76TkACgkQHPApP6U8
pFgA4xAApmyDP+TW+Ek4Q5iOH42CbH20eFD6pG1D1eMBTclZqygHCVTa6ZtWKqcK
UL1l+1ADVf2CVm3fnFj5mPcV/vv7N8i96ztotHFr2mX8Vbe9aNRjoSyvmTIi44UI
dUXOkWpD2/OoXsyvONql+dBKuvLWZWlf7bc+PDQEUuLWF2tVW7tPRJoeVqPfUftj
7dCl/E7uWwzfeW9oDw1pKdxmb2g5XzI9x5BGcoUYCaUGfhRnVP4/FXCG0pp/Jyhv
U6yp3xcmbGEsuYgyCOkLeWY4OcSHitco10oc+MbqNPZ7Jb5MpsQ0Rm3S3SKRXaYW
5fpx1LvDZn5yzk5SDnZbeawmL/WZntQEKOF9L3vDKiuLMwpiaLTOlM0mHTGVfVro
lesYmS58SdnEHPjS2ikfx1vsg7k+n43mSwuwz8zLmOBH479iGezVKbck+T9sVZqd
J7rc3XxX9hQHTPJSy6ToFZTRbjvlbHJu6vg9h6u0EO2aAuc/HIeRIJ/d1bHccrSJ
QudB6mnZqyrwdbaXT0fRb1B5Chy4r4IHdt5u/6pBS6ebEdNGOudCwRjMSP7Gmvj9
T7mWw3knx9WP4xpD7MUQx9iUoF4TNInmc68y3EZRRUS9ubwDxQ7njcK4rycKFVA1
1trARd6/4ofNG+Y2Hn998/3eSeN+xpbVNCN5SIAVpJBrJtIc+3U=
=8ijC
-END PGP SIGNATURE-

-
To 

Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Shawn,

On 3/27/18 8:41 PM, Shawn Heisey wrote:
> So now I have one person telling me that removeAbandoned DOES
> close connections, and another saying that it does NOT close
> connections.  Is there a conflict here, or are both of these
> statements correct for different pool implementations?

Phil knows what he's talking about; I apparently do not.

I guess I've just never pushed DBCP over the hump to start actually
closing connections on me. From my perspective, they stayed open and
idle until either a service restart or they were closed by the
long-running process in the small number of cases where this kind of
thing happened.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq76GMACgkQHPApP6U8
pFigoQ//bHTHAuTFmh1AZ59wqLLoqw+9jvsBxiIgM731bLCEnyOP0pmRpE/KTDtP
PIvdDPZu61xyq2ZRBTKEIZPipNyxeqCkC5TwdzmEtIokCilKmX5iwteihoQAHs0d
YnGi0+Ei0Sl7FQxj8r5vqMeaNpzjrwmZF/Cq9JVys1rlQpHfEdXjv1OImUtn5Evp
xNtWHfGodRrZ2MI8LXLQZixHmVo7/MsykBTEtgKU/xyL9/W8mqv0NYvTbWN3R0I8
G/fbxR6BEzyBGyK3wT0QPNiF/F4SRtMX8JmaaKTDQUSM5JH7I3lGdItdfo3PpDVM
MmW/VrS+mDVi1JF1VHsiGvDY3tVat/i4ijt9xIrEJI9ycoEUhAygp+lLlITd3+4h
1H3jqTEP5Pjgfn0K7yPl5sgzrJBI5ct8b9Xw6Au6uWCYHCPf4ONRl3EL7z6sNpiG
OgHmh9xwIDDQ4y0K1aNQs3aQNBm8+x9Wnp5RwJXO0VZmNusRXD8627kDeZE31ejZ
tq/ImZuaVo6knrttMTpLB4PuFZLVcX5/3Q1ZGQM4ZxEJonLVh5JX51V8ajdk1CHd
SV2ZMHEnoYOn2wQPA3Wl1VKWCR0oQLpEKCzP00ci09mF4SS5Q5fo3VdIe1ge9ieR
+MFUBteVKvf1vZCqbBN2XHl57jNTBiMZ75vdqvMDvKziEQ73QEA=
=773e
-END PGP SIGNATURE-

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



Re: tomcat jmx questions / help

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Rainer,

On 3/28/18 2:49 PM, Rainer Jung wrote:
> I hope my below answers are all correct, but most should be.
> 
> Am 28.03.2018 um 20:25 schrieb Greg Kaszycki:
>> Tomcat version 7.0.82
>> 
>> I have some questions about tomcat monitoring and jmx.  The short
>> version is that I am trying to get session information about
>> users logged into my app.
>> 
>> I see documentation about different ways to get to the jmx beans
>> but I don't understand the relationship between them.
>> 
>> http://localhost:8080/ takes me to the tomcat homepage and I can
>> click on the manager button and get to a page with some links to
>> application folders (I've set my role).  Do they use jmx beans?
> 
> No.
> 
>> I can also do like:
>> http://localhost:8080/manager/text/sessions?path=/. and it
>> returns number of sessions.  Is that accessing an mbean?  How
>> does that name relate to the folders under the tomcat manager
>> folder?
> 
> No access to mbeans. No relation to folders. URIs can either point
> to static content, JSPs or to servlets( code) that dynamically
> enerate the responses. Your example points to a servlet, so no
> relation with folders. How does Tomcat know, which URI relates to
> which servlet? That's described in the servlet specification
> (standards document) and one way is declaring servlets and their
> mapping path in the config file WEB-INF/web.xml inside the webapp.
> 
>> I can also access 
>> http://localhost:8080/manager/jmxproxy/?get=java.lang.type=Memory
=HeapMemoryUsage
>>
>>
>> 
and get memory usage stats.  Is that accessing an mbean?
> 
> Yes. The same web.xml file mapps the URI /jmxproxy underneath the 
> manager webapp to the so called JMXProxy servlet. That servlet
> typically produces all it's responses from data retrieved
> internally from MBeans. In the above case you are retrieving the
> attribute named HeapMemoryUsage form an MBean named
> java.lang.type=Memory (I think it should be: 
> java.lang:type=Memory).
> 
>> I also don't see how these names relates to going to jconsole and
>> looking at the mbean tab and accessing
>> Catalina/Manager/examples/localhost.  The names of the attributes
>> in jconsole don't seem to match the names of the beans that I can
>> access like the memory example above.
> 
> They should without your typo. In jconsole you should find a MBean
> group named java.lang and if you open that patr of the MBean tree,
> you will finde the Memory-MBean there. You other path 
> "Catalina/Manager/examples/localhost" seems to be totally unrelated
> (or I have not fully understood your question).
> 
>> I found that memory example above online, but where are these
>> beans documented?  The documentation in
> 
> Some of the MBeans - for example the Memory MBean - are part of any
> Java process, not just Tomcat. So expect them to be documented in
> generic Java docs. Since not only Tomcat, but also applications can
> create their own additional MBean, these basic Java MBeans that
> always exist are also called "platform mbeans". The first hit in a
> search engine points to
> 
> https://docs.oracle.com/javase/7/docs/technotes/guides/management/mxbe
ans.html
>
> 
> 
> which starts describing how to access mbeans for developers, but in
> the second part of the document also introduces to the data
> contained in some of the platform MBeans. In addition to docs, it
> is always very instructive to simply use a tool like JConsole (or
> more modern JVisualVM) to click through the MBean tree and observe
> what's there. Start with an easy setup, where you run Tomcat and
> these GUI tools on the same machine.
> 
> The Tomcat specific MBeans are listen in 
> https://tomcat.apache.org/tomcat-9.0-doc/funcspecs/mbean-names.html,
> but I don't know how current that document is. It also gives no
> hints, what data is actually contained in those MBeans. Most of the
> MBean attributes have very descriptive names, so again browsing
> through the tree helps a bit.
> 
>> https://tomcat.apache.org/tomcat-7.0-doc/monitoring.html said I
>> could also access it through a url like: 
>> service:jmx:rmi:///jndi/rmi://localhost:8081/jmxrmi but I could
>> not get that to work.  Would that access the same bean(s) as the
>> other examples?
> 
> I would start interactively with JConsole or JVisualVM to get an
> idea what's there. You can also get a full textual dump with
> 
> https://tomcat.apache.org/tomcat-9.0-doc/funcspecs/mbean-names.html?qr
y=*:*
>
>  That command and some more is explained e.g. in 
> https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html
> 
> Then you need to decide, via which network protocol you want to
> access MBean data remotely. You could either use an agent deployed
> as a webapp inside Tomcat, speak http(s) to Tomcat and the agent
> retrieves the data internally via JVM and returns a textual
> representation. The manager webapp JMXProxy servlet is one such
> agent, but it has some deficiencies.
> 
> You could also look at 

Re: tomcat jmx questions / help

2018-03-28 Thread Rainer Jung

I hope my below answers are all correct, but most should be.

Am 28.03.2018 um 20:25 schrieb Greg Kaszycki:

Tomcat version 7.0.82

I have some questions about tomcat monitoring and jmx.  The short version
is that I am trying to get session information about users logged into my
app.

I see documentation about different ways to get to the jmx beans but I
don't understand the relationship between them.

http://localhost:8080/ takes me to the tomcat homepage and I can click on
the manager button and get to a page with some links to application folders
(I've set my role).  Do they use jmx beans?


No.


I can also do like:  http://localhost:8080/manager/text/sessions?path=/.
and it returns number of sessions.  Is that accessing an mbean?  How does
that name relate to the folders under the tomcat manager folder?


No access to mbeans. No relation to folders. URIs can either point to 
static content, JSPs or to servlets( code) that dynamically enerate the 
responses. Your example points to a servlet, so no relation with 
folders. How does Tomcat know, which URI relates to which servlet? 
That's described in the servlet specification (standards document) and 
one way is declaring servlets and their mapping path in the config file 
WEB-INF/web.xml inside the webapp.



I can also access
http://localhost:8080/manager/jmxproxy/?get=java.lang.type=Memory=HeapMemoryUsage
and get memory usage stats.  Is that accessing an mbean?


Yes. The same web.xml file mapps the URI /jmxproxy underneath the 
manager webapp to the so called JMXProxy servlet. That servlet typically 
produces all it's responses from data retrieved internally from MBeans. 
In the above case you are retrieving the attribute named HeapMemoryUsage 
form an MBean named java.lang.type=Memory (I think it should be: 
java.lang:type=Memory).



I also don't see how these names relates to going to jconsole and looking
at the mbean tab and accessing Catalina/Manager/examples/localhost.  The
names of the attributes in jconsole don't seem to match the names of the
beans that I can access like the memory example above.


They should without your typo. In jconsole you should find a MBean group 
named java.lang and if you open that patr of the MBean tree, you will 
finde the Memory-MBean there. You other path 
"Catalina/Manager/examples/localhost" seems to be totally unrelated (or 
I have not fully understood your question).



I found that memory example above online, but where are these beans
documented?  The documentation in


Some of the MBeans - for example the Memory MBean - are part of any Java 
process, not just Tomcat. So expect them to be documented in generic 
Java docs. Since not only Tomcat, but also applications can create their 
own additional MBean, these basic Java MBeans that always exist are also 
called "platform mbeans". The first hit in a search engine points to


https://docs.oracle.com/javase/7/docs/technotes/guides/management/mxbeans.html

which starts describing how to access mbeans for developers, but in the 
second part of the document also introduces to the data contained in 
some of the platform MBeans. In addition to docs, it is always very 
instructive to simply use a tool like JConsole (or more modern 
JVisualVM) to click through the MBean tree and observe what's there. 
Start with an easy setup, where you run Tomcat and these GUI tools on 
the same machine.


The Tomcat specific MBeans are listen in 
https://tomcat.apache.org/tomcat-9.0-doc/funcspecs/mbean-names.html, but 
I don't know how current that document is. It also gives no hints, what 
data is actually contained in those MBeans. Most of the MBean attributes 
have very descriptive names, so again browsing through the tree helps a bit.



https://tomcat.apache.org/tomcat-7.0-doc/monitoring.html said I could also
access it through a url like:
service:jmx:rmi:///jndi/rmi://localhost:8081/jmxrmi but I could not get
that to work.  Would that access the same bean(s) as the other examples?


I would start interactively with JConsole or JVisualVM to get an idea 
what's there. You can also get a full textual dump with


https://tomcat.apache.org/tomcat-9.0-doc/funcspecs/mbean-names.html?qry=*:*

That command and some more is explained e.g. in 
https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html


Then you need to decide, via which network protocol you want to access 
MBean data remotely. You could either use an agent deployed as a webapp 
inside Tomcat, speak http(s) to Tomcat and the agent retrieves the data 
internally via JVM and returns a textual representation. The manager 
webapp JMXProxy servlet is one such agent, but it has some deficiencies.


You could also look at Jolokia (Open Source), which provides a more 
powerful other such agent.


Alternatively you can also use JMX as a remote network protocol, but 
that is a bit more subtle to configure and get it secure etc. Your 
mentioned not-working URL fits into this realm. As I said, that's the 
harder way and you 

Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Phil,

On 3/27/18 1:03 PM, Phil Steitz wrote:
> On 3/26/18 10:28 AM, Christopher Schultz wrote:
>> Shawn,
>> 
>> On 3/25/18 12:17 AM, Shawn Heisey wrote:
>>> On 3/24/2018 5:04 PM, Mark Thomas wrote:
 Regarding your configuration: >>> auth="Container" 
 factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" 
 driverClassName="com.mysql.jdbc.Driver" 
 type="javax.sql.DataSource" maxActive="60" maxIdle="10" 
 maxWait="3" removeAbandoned="true" 
 removeAbandonedTimeout="30" username="REDACTED" 
 password="REDACTED" testOnBorrow="true"
 validationQuery="select 1"
 
>> url="jdbc:mysql://REDACTED.REDACTED.com:3306/REDACTED?autoReconnect=t
>>
>> 
ruezeroDateTimeBehavior=round"
 
 
 
>> />
 
 Generally, that looks OK but I'd strongly recommend that you
 use "autoReconnect=false" in the URL. autoReconnect is known
 to be problematic with connection pools.
 
 The removeAbandonedTimeout looks low but if all the queries
 are expected to be well under 30s then that should be OK.
>> 
>>> Somehow I did not see this part of your email at all when I
>>> read it the first time.  I just noticed it.  My previous reply
>>> probably has you scratching your head a little bit.  I'm sorry
>>> about that!
>> 
>>> The timeout of 30 seconds is EXTREMELY low.  And if it were
>>> being honored, we would have customers lining up outside the
>>> office with pitchforks.  The webapp has reporting ability for
>>> users with elevated privileges, and a lot of those reports take
>>> a minute or two to run, sometimes even longer.  So if the pool
>>> were killing connections after 30 seconds, the reporting
>>> mechanism would be failing a LOT.  If you check the *planned*
>>> configuration, you'll see that I have increased this timeout to
>>> 3600.  I wanted to make it 900, but some of the developers are
>>> worried that 900 is too aggressive.
>> 
>> The pool doesn't kill abandoned connections. It simply removes
>> them from the pool. Otherwise, you're right: you'd have torches
>> and pitchforks everywhere.
> 
> Not exactly, if what you are using is the DBCP pool.  To see the 
> details of what is going on, look at the removeAbandoned code in 
> DBCP's AbandonedObjectPool.  It calls 
> o.a.c.pool.GenericObjectPool#invalidateObject, which calls 
> o.a.c.dbco.PoolableConnectionFactory#destroyObject to close the 
> connection.  If an exception occurs, it is swallowed by 
> removeAbandoned, but it dumps a stack trace.

Is this DBCP, or DBCP2, or both?

OP is running Tomcat 7.0.x. which uses DBCP(1.x).

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq73vYACgkQHPApP6U8
pFjbgBAAijzCrHGCyFPsJjZWFaD/n2bdtCJhAVXT262FFsnt2lMwXwAUqPSkyDfM
2tjsACPBL28/jrsnUI9QmaM7STa7jneqlqCsIVNcWp6YMRM3sMyk/kDcSC4zzPuG
3EkZ0gCaPLK1s8VkG9j01f7mKTp16N/xa2c1RHPktfm4458RpWqzDh84ccjt/dFU
7VVG9k3OeoJ4azfsqCBoG1tj4ker5qUctsxVoldCfB8MGpepkSfYH2Bpmd4PO8rz
3hiNhRNj3MuVLplTcA4l9mu8b9QjEWio6wljdAf66SSLdxSkE4O+aNOPBwbUvbfJ
mw/udMzPaV6yhmfy3umY4TxZadpFquDv8mPqhHwcNFEPmI8f+Yb7RNEu9+LwH0Gh
eultGDtkaShY/ZOOVz8OJNybKCj6bxvv3YChRm7hPk9n4OPQfTRBAxSz0a45QhmF
xT/Gh6GuTtI3uMks3uCXR/4nbism+2YBZylQ0chFIsS+LNhFkhYGJ0cBQTGFoG4O
uZs3ei4/JqQLttEhxEoHWtDWyFpnoQyFyoO43+k3t5OPH4FbPlWJat5voqZhlWAL
B4IxtClrIl+gS3TqpAIkt/C0cNQzqUana/0RyKsKiv9UXCeMRI0v8Vzk8aYRxv1V
/1GJ2RtNqj7C+2GDGpq1ePM+7zyaq52PFMFMQLzVbrTRNsjjCUo=
=DivC
-END PGP SIGNATURE-

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



tomcat jmx questions / help

2018-03-28 Thread Greg Kaszycki
Tomcat version 7.0.82

I have some questions about tomcat monitoring and jmx.  The short version
is that I am trying to get session information about users logged into my
app.

I see documentation about different ways to get to the jmx beans but I
don't understand the relationship between them.

http://localhost:8080/ takes me to the tomcat homepage and I can click on
the manager button and get to a page with some links to application folders
(I've set my role).  Do they use jmx beans?

I can also do like:  http://localhost:8080/manager/text/sessions?path=/.
and it returns number of sessions.  Is that accessing an mbean?  How does
that name relate to the folders under the tomcat manager folder?

I can also access
http://localhost:8080/manager/jmxproxy/?get=java.lang.type=Memory=HeapMemoryUsage
and get memory usage stats.  Is that accessing an mbean?

I also don't see how these names relates to going to jconsole and looking
at the mbean tab and accessing Catalina/Manager/examples/localhost.  The
names of the attributes in jconsole don't seem to match the names of the
beans that I can access like the memory example above.

I found that memory example above online, but where are these beans
documented?  The documentation in
https://tomcat.apache.org/tomcat-7.0-doc/monitoring.html said I could also
access it through a url like:
service:jmx:rmi:///jndi/rmi://localhost:8081/jmxrmi but I could not get
that to work.  Would that access the same bean(s) as the other examples?

I can set CATALINA_OPTS to do the jmxremote enabling as described in , but
what exactly is that enabling?  Is that what enabled the mbeans that I
accessed?

Lastly, I created a listener (implements HttpSessionListener) and
configured it in web.xml but when I set a breaklpoint in IDEA, it never hit
it.  When exactly does a session get created?  when someone goes to any
page on the host?  When they log into the app?


-- 
Greg Kaszycki
919-244-3789


Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Phil Steitz
On 3/27/18 5:41 PM, Shawn Heisey wrote:
> On 3/27/2018 11:03 AM, Phil Steitz wrote:
>> Not exactly, if what you are using is the DBCP pool.  To see the
> The factory in use right now is
> "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory".  Information
> gathered previously in this thread told me that this is DBCP code,
> repackaged into the tomcat package space to avoid conflicting with the
> official commons-dbcp package.  If this is effectively unmodified DBCP,
> then what you wrote below likely applies.

As Mark said above, based on your version of tomcat, it is exactly
dbcp 1.4, pool 1.5.7.
>
>> details of what is going on, look at the removeAbandoned code in
>> DBCP's AbandonedObjectPool.  It calls
>> o.a.c.pool.GenericObjectPool#invalidateObject, which calls
>> o.a.c.dbco.PoolableConnectionFactory#destroyObject to close the
>> connection.  If an exception occurs, it is swallowed by
>> removeAbandoned, but it dumps a stack trace.
>>
>> So connections should in fact be closed if they are detected as
>> abandoned.  As I said on commons-user, in your setup, that won't
>> happen unless borrows are attempted when there are 57+ open
>> connections.  The removeAbandoned method is called *only* by
>> borrowObject in DBCP 1.x, with this test:
> It would not surprise me to learn that on the pool with maxActive=60,
> the pool is managing less than 57 connections.  Until I can get some
> logging in place on production to show me the acive and idle connection
> counts, I do not know what's actually happening.
>
> If I can successfully get a config using
> "org.apache.tomcat.jdbc.pool.DataSourceFactory" operational (which seems
> to be failing right now with "too many connections" on startup), is it
> true that this pool does not require maxActive-3 connections before
> abandoned removal kicks in?  The description for
> abandonWhenPercentageFull in the tomcat documentation implies that this
> is the case.
>
> So now I have one person telling me that removeAbandoned DOES close
> connections, and another saying that it does NOT close connections.  Is
> there a conflict here, or are both of these statements correct for
> different pool implementations?  Keep in mind that the current config
> uses "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"

Using that one, you get the dbcp / pool combo above and abandoned
connection removal does try to close connections when they are
marked abandoned.  As I said, if the close fails, the failure should
result in a stack trace written to stderr.  There is a unit test in
dbcp 1.4, TestAbandonedBasicDataSource#testAbandonedClose that
verifies this behavior.

Phil

>  and that I
> would like to try a new config with
> "org.apache.tomcat.jdbc.pool.DataSourceFactory" ... unless there is a
> good reason to NOT use that factory.  Which, by the way, is the factory
> that tomcat's documentation SAYS to use.
>
> The new config with the new factory fails to start on our staging
> server, but aside from seeing "too many connection" exceptions in the
> catalina log, I have no concrete information about what happened.  I
> didn't do the restart, and wasn't watching the system when it happened. 
> Switching back to the old config fixed the tomcat startup.  What the
> developer described to me shouldn't have been possible.  I need to do
> the restart myself and watch the system.
>
> I've come up with another question, related to this, but headed in a
> different direction.  I'll write a new email to the list for that.
>
> Thanks,
> Shawn
>
>
> -
> 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: HOME user folder change & tomcat HOME

2018-03-28 Thread Jérôme Redouté

Le 27/03/2018 à 18:15, Coty Sutherland a écrit :

Hi,

This sounds like a problem specific to the distribution's tomcat
package, which is usually better served by the distribution's
community rather than Tomcat's (they repackage what we provide). You
may want to ask on their users list/support forum/etc, but I will try
and help though :)

On Tue, Mar 27, 2018 at 11:27 AM, Jérôme Redouté  wrote:

Hello,

I've installed tomcat8 on Debian 9, to run a web App (XNAT)

I've a proble concerning the HOME directory of my user "xnat".

Before the HOME was, as expected, in /home/xnat

Before what? Before you installed the Debain tomcat package? Or did
you install the xnat package? Something else?
I suppose before installation of XNAT war file. But I can't really say, 
as I did not noticed the change immediately







but now (after deploying XNAT app), it moved to /var/lib/tomcat8

When you say deploy, do you mean install xnat's package? Or copy a war
into place? I ask because /var/lib/tomcat8 isn't CATALINA_BASE or
CATALINA_HOME (which were my first thoughts), so it seems to have some
configuration elsewhere.

I mean copy war file into place (called ROOT.war) and restarted tomcat8




and I can't reverse back the the original HOME.

I suspect it is related to misconfiguration of tomcat, but I can't find
wher.

That output looks pretty standard for a distro's tomcat package
(follows FHS with /usr/share/tomcat8, etc).


Can you help me?

few infos concerning my tomcat install:


Using CATALINA_BASE:   /usr/share/tomcat8
Using CATALINA_HOME:   /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME:/usr
Using CLASSPATH:
/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.5.14 (Debian)
Server built:   Sep 3 2017 17:51:58 UTC
Server number:  8.5.14.0
OS Name:Linux
OS Version: 4.9.0-6-amd64
Architecture:   amd64
JVM Version:1.8.0_162-8u162-b12-1~deb9u1-b12
JVM Vendor: Oracle Corporation




Thanks



-
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




--
==
Jérôme Redouté
Ph.D. - Ingénieur de Recherche - Université Claude Bernard - Lyon1
Responsable imageur TEP-TDM
CERMEP - Imagerie du vivant
59 Bd Pinel. 69677 Bron - FRANCE
tel : 33 (0)4 72 68 86 18 (bureau)
tel : 33 (0)4 72 68 86 00 (standard)
fax : 33 (0)4 72 68 86 10
==



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



Re: HOME user folder change & tomcat HOME

2018-03-28 Thread Jérôme Redouté

Le 28/03/2018 à 02:13, George S. a écrit :
Did you edit /etc/passwd and change the home directory for your user 
xnat?


nothing intentionnaly. I've tried to change home directory with usermod, 
but it always change back to /usr/lib/tomcat8





On 3/27/2018 9:27 AM, Jérôme Redouté wrote:

Hello,

I've installed tomcat8 on Debian 9, to run a web App (XNAT)

I've a proble concerning the HOME directory of my user "xnat".

Before the HOME was, as expected, in /home/xnat

but now (after deploying XNAT app), it moved to /var/lib/tomcat8

and I can't reverse back the the original HOME.

I suspect it is related to misconfiguration of tomcat, but I can't 
find wher.


Can you help me?

few infos concerning my tomcat install:


Using CATALINA_BASE: /usr/share/tomcat8
Using CATALINA_HOME:   /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME:    /usr
Using CLASSPATH: 
/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar

Server version: Apache Tomcat/8.5.14 (Debian)
Server built:   Sep 3 2017 17:51:58 UTC
Server number:  8.5.14.0
OS Name:    Linux
OS Version: 4.9.0-6-amd64
Architecture:   amd64
JVM Version:    1.8.0_162-8u162-b12-1~deb9u1-b12
JVM Vendor: Oracle Corporation




Thanks



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





--
==
Jérôme Redouté
Ph.D. - Ingénieur de Recherche - Université Claude Bernard - Lyon1
Responsable imageur TEP-TDM
CERMEP - Imagerie du vivant
59 Bd Pinel. 69677 Bron - FRANCE
tel : 33 (0)4 72 68 86 18 (bureau)
tel : 33 (0)4 72 68 86 00 (standard)
fax : 33 (0)4 72 68 86 10
==



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