Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-25 Thread systebo
Worked as expected.

Thank you for the quick response, Mark.  Very much appreciated!



--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

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



Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-24 Thread Mark Thomas
On 24/01/2019 20:46, syst...@calpers.ca.gov wrote:
> Would it be possible to get a more end-user based description of that
> workaround for those like me that find this thread?  Something along the
> lines of "Go into your Windows service and change...", or whatever the
> workaround requires.

The workaround is to add utilityThreadsAsDaemon="true" to the Server
element in server.xml

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 Windows service slow to stop

2019-01-24 Thread syst...@calpers.ca.gov
Would it be possible to get a more end-user based description of that
workaround for those like me that find this thread?  Something along the
lines of "Go into your Windows service and change...", or whatever the
workaround requires.

Thanks!



--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

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



Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-08 Thread Mark Thomas
On 08/01/2019 15:45, Mark Thomas wrote:
> On 08/01/2019 15:25, Jean-Pascal Houde wrote:
>> Thanks all,
> 
> 
>> "Catalina-utility-1" prio=1 tid=15 WAITING
>> at sun.misc.Unsafe.park(Native Method)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>Local Variable: 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$Node#38
>>Local Variable: 
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#1
>> at 
>> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
>>Local Variable: java.util.concurrent.locks.ReentrantLock#1
>> at 
>> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
>>Local Variable: 
>> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue#1
>> at 
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>> at 
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>Local Variable: java.util.concurrent.ScheduledThreadPoolExecutor#1
>> at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>Local Variable: java.util.concurrent.ThreadPoolExecutor$Worker#10
>> at 
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>>Local Variable: 
>> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#10
>> at java.lang.Thread.run(Thread.java:748)
> 
> This is the problem.
> 
> I can repeat this on a 2012 R2 test environment. I'm currently updating
> my Windows dev environment to see if I can repeat (and then debug) this
> there.
> 
> The above thread should have stopped when stop was called. It isn't
> immediately obvious why this is going wrong. A remote debugging session
> will hopefully shed some light.

Fixed for the next set of releases.

Until then, Rémy's work-around will fix it.

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 Windows service slow to stop

2019-01-08 Thread Igal Sapir
On Tue, Jan 8, 2019 at 7:45 AM Rémy Maucherat  wrote:

> On Tue, Jan 8, 2019 at 4:25 PM Jean-Pascal Houde 
> wrote:
>
> > "Catalina-utility-1" prio=1 tid=15 WAITING
> >
>

Is DestroyJavaVM supposed to be the only non-daemon thread at that point?

Thanks,

Igal


>
> Ok, so the new default for the utility thread is non daemon so you should
> have your fix there. Is nothing calling Server.destroy then ? Normally it
> should (Catalina.stop does it) and the utility executor will get shutdown
> then.
>
> Rémy
>


Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-08 Thread Mark Thomas
On 08/01/2019 15:25, Jean-Pascal Houde wrote:
> Thanks all,


> "Catalina-utility-1" prio=1 tid=15 WAITING
> at sun.misc.Unsafe.park(Native Method)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>Local Variable: 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$Node#38
>Local Variable: 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#1
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
>Local Variable: java.util.concurrent.locks.ReentrantLock#1
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
>Local Variable: 
> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue#1
> at 
> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>Local Variable: java.util.concurrent.ScheduledThreadPoolExecutor#1
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>Local Variable: java.util.concurrent.ThreadPoolExecutor$Worker#10
> at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>Local Variable: 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#10
> at java.lang.Thread.run(Thread.java:748)

This is the problem.

I can repeat this on a 2012 R2 test environment. I'm currently updating
my Windows dev environment to see if I can repeat (and then debug) this
there.

The above thread should have stopped when stop was called. It isn't
immediately obvious why this is going wrong. A remote debugging session
will hopefully shed some light.

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 Windows service slow to stop

2019-01-08 Thread Rémy Maucherat
On Tue, Jan 8, 2019 at 4:25 PM Jean-Pascal Houde  wrote:

> "Catalina-utility-1" prio=1 tid=15 WAITING
>

Ok, so the new default for the utility thread is non daemon so you should
have your fix there. Is nothing calling Server.destroy then ? Normally it
should (Catalina.stop does it) and the utility executor will get shutdown
then.

Rémy


RE: Tomcat 9.0.14 Windows service slow to stop

2019-01-08 Thread Jean-Pascal Houde
: 
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue#1
at 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
   Local Variable: java.util.concurrent.ScheduledThreadPoolExecutor#1
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   Local Variable: java.util.concurrent.ThreadPoolExecutor$Worker#10
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   Local Variable: 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#10
at java.lang.Thread.run(Thread.java:748)

"FileHandlerLogFilesCleaner-1" daemon prio=5 tid=12 WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
   Local Variable: 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#6
   Local Variable: 
java.util.concurrent.locks.AbstractQueuedSynchronizer$Node#116
at 
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
   Local Variable: java.util.concurrent.locks.ReentrantLock#128
   Local Variable: java.util.concurrent.atomic.AtomicInteger#7
   Local Variable: java.util.concurrent.LinkedBlockingQueue#1
at 
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
   Local Variable: java.util.concurrent.ThreadPoolExecutor#1
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   Local Variable: java.util.concurrent.ThreadPoolExecutor$Worker#12
at java.lang.Thread.run(Thread.java:748)

"Attach Listener" daemon prio=5 tid=5 RUNNABLE

"NioBlockingSelector.BlockPoller-1" daemon prio=5 tid=14 RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at 
sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
at 
sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
   Local Variable: sun.nio.ch.WindowsSelectorImpl$SubSelector#2
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
   Local Variable: java.util.Collections$UnmodifiableSet#4
   Local Variable: sun.nio.ch.Util$3#3
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
   Local Variable: sun.nio.ch.WindowsSelectorImpl#3
at 
org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:298)

"AsyncFileHandlerWriter-1020371697" daemon prio=5 tid=11 TIMED_WAITING
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
   Local Variable: 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#4
   Local Variable: 
java.util.concurrent.locks.AbstractQueuedSynchronizer$Node#89
at 
java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:522)
   Local Variable: java.util.concurrent.locks.ReentrantLock#127
at 
java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:684)
   Local Variable: java.util.concurrent.LinkedBlockingDeque#1
   Local Variable: java.util.concurrent.TimeUnit$3#1
at 
org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:159)

"Reference Handler" daemon prio=10 tid=2 WAITING
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
  
"GC Daemon" daemon prio=2 tid=13 TIMED_WAITING
at java.lang.Object.wait(Native Method)
at sun.misc.GC$Daemon.run(GC.java:117)



JP


-----Original Message-
From: Igal Sapir  
Sent: Tuesday, January 8, 2019 00:10
To: Tomcat Users List 
Subject: Re: Tomcat 9.0.14 Windows service slow to stop

On Mon, Jan 7, 2019 at 8:57 PM Christopher Schultz < 
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Steve,
>
> On 1/7/19 19:47, Steve Demy wrote:
> > This sounds similar to:
> >
> > http://mail-archives.apache.org/mod_mbox/tomcat-dev/201812.mbox/ajax
> > /%
> 3Cbug-63041-78%40https.bz.apache.org%2Fbugzilla%2F%3E
> <http://mail-archives.apache.org/mod_mbox/tomcat-dev/201812.mbox/ajax/
> %3Cbug-63041-78%40https.bz.apache.org%2Fbugzilla%2F%3E>
> >
> >
> and,
> > http://mail

Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-08 Thread Mark Thomas
On 07/01/2019 23:38, Jean-Pascal Houde wrote:
> Hello,
> 
> I'm having a problem that seems to occur only since Tomcat 9.0.14. I'm using 
> Tomcat installed as a service on a Windows 2012 R2 server. 
> The service starts normally, but stopping it from the Windows Services window 
> takes a long time (about a minute). This happens even with no web application 
> deployed on the server. I've tried downgrading to 9.0.13 and 9.0.12 and both 
> version stops normally, under 1-2 seconds.

I see the same thing with a clean 9.0.14 install on the same OS (fully
patched).

I'll take a look.

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 Windows service slow to stop

2019-01-07 Thread Igal Sapir
On Mon, Jan 7, 2019 at 8:57 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Steve,
>
> On 1/7/19 19:47, Steve Demy wrote:
> > This sounds similar to:
> >
> > http://mail-archives.apache.org/mod_mbox/tomcat-dev/201812.mbox/ajax/%
> 3Cbug-63041-78%40https.bz.apache.org%2Fbugzilla%2F%3E
> 
> >
> >
> and,
> > http://mail-archives.apache.org/mod_mbox/tomcat-users/201812.mbox/ajax
> /%3CDEB74971-2714-401F-9428-25EE0ECC6D11%40shaw.ca%3E
> 
> >
> >  I’m not fluent in Tomcat, but it appears something changed in the
> > catalina.sh script of 9.0.14 that changed the stop/start
> > behaviour.
>
> Certainly nothing in catalina.sh affects Windows Services. Even
> catalina.bat is ignored for Windows Services.
>

+1


> Your issue is that Tomcat's scripts (well, actually, some 3rd-party
> scripts, actually) can't manage to stop Tomcat. Jean-Pascal's problem
> is that his shutdown is taking 60sec when he thinks it shouldn't take
> that long.
>

I've seen this happen when an application, or a 3rd-party library starts a
non-daemon thread and it is not stopped prior to the shutdown attempt.  I
think that there is a 60 second timeout because I've also noticed about
that same time frame when it happens.


>
> Jean-Pascal, what do the Tomcat logs say? There should be something
> like catalina.out or stdout.log or something like that.
>

+1

Another thing I would try is to look at a thread dump.

Igal


>
> - -chris
>
> >> On Jan 7, 2019, at 3:38 PM, Jean-Pascal Houde 
> >> wrote:
> >>
> >> Hello,
> >>
> >> I'm having a problem that seems to occur only since Tomcat
> >> 9.0.14. I'm using Tomcat installed as a service on a Windows 2012
> >> R2 server. The service starts normally, but stopping it from the
> >> Windows Services window takes a long time (about a minute). This
> >> happens even with no web application deployed on the server. I've
> >> tried downgrading to 9.0.13 and 9.0.12 and both version stops
> >> normally, under 1-2 seconds.
> >>
> >> Here is what I am doing: 1. Download Tomcat Windows 64-bit zip 2.
> >> Install service using "service install tomcat9" 3. Open Windows
> >> "Services" control panel 3. Start Tomcat9 service -> very fast 4.
> >> Stop Tomcat9 service -> gets stuck on "stopping service..." for
> >> around a minute.
> >>
> >> This is what the commons-daemon log file shows: [2019-01-07
> >> 18:27:21] [info]  [ 7500] Commons Daemon procrun (1.1.0.0 64-bit)
> >> started [2019-01-07 18:27:21] [info]  [ 7500] Running 'tomcat9'
> >> Service... [2019-01-07 18:27:21] [info]  [ 3904] Starting
> >> service... [2019-01-07 18:27:22] [info]  [ 3904] Service started
> >> in 1190 ms. [2019-01-07 18:27:23] [info]  [ 9796] Stopping
> >> service... [2019-01-07 18:27:24] [info]  [ 9796] Service stop
> >> thread completed. [2019-01-07 18:28:24] [info]  [ 7500] Run
> >> service finished. [2019-01-07 18:28:24] [info]  [ 7500] Commons
> >> Daemon procrun finished
> >>
> >> You can see the full minute between the initial "Stopping
> >> services..." and the finish of the stopping process. Other log
> >> files don't show anything suspicious.
> >>
> >> Anyone seeing the same issue with this version?
> >>
> >> Thanks,
> >>
> >>
> >> Jean-Pascal Houde
> >>
> >>
> >> -
> >>
> >>
> 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
> >
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlw0LcEACgkQHPApP6U8
> pFgfsg//Yv9k+Lqnn/nH2Pd2iahEJnPRZVRUeg2bRFQGlpwRURApBzup8646UsFE
> zo9zxfJuuw2L/jea7rfZaXJaXay6nhaJ/h5+RPfq1CExNLjcK/3GjJwmZxSUqJxl
> PtNtpjsJr8lD3OXMzu9sqr26Zj3AtPbAqpJFr1A9LGlflpIi5ohqzVkpA3h2knEH
> luxjEbsD5uaG7YlQdzal76a81RBN0glBUvdgP1dPsgXKscMdYkoIzNYL7G5TniAx
> 3Jsilp0oWYfDEJ0oFRmUAjN++jq4QefMZHow3QUEU8xZ8L47JQv6ZlmkSbqPndH0
> /kdrUA9Cv82lN0czBz2u+KmKduot7tc+KEqS+RJD8Pkj9Jy7FOLCu9klLXk3LXFG
> M22XPJdwnIDQeVnjJKxjiUhetFjOCSzH3FyL/VuxAsO4qsCqSgiW/RRrU+FdLYfs
> OQPjOzGISu/9lwZ+M7yPJ1XzCoBbpVE1iHf0R5vuI0H922oXRu0dyx/IKnEpbGrv
> GY6zRrte4AtLO0oMXeDxWH/iC9xgRn+B4oy8Gd3RY9l6A1vLeT41flCSjAvtSkeU
> AE5N4iJp39mGJ/iUpWa7C5tzwbV1syv1weC4BzHVl5+W+YBBlv6x/HJX2Zc9dsMO
> okn6tCEuKFnSCqc4N4IdocolkISqObVe35RYioYHxBStMDr5dpU=
> =xtqK
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: 

Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Steve,

On 1/7/19 19:47, Steve Demy wrote:
> This sounds similar to:
> 
> http://mail-archives.apache.org/mod_mbox/tomcat-dev/201812.mbox/ajax/%
3Cbug-63041-78%40https.bz.apache.org%2Fbugzilla%2F%3E
>
> 
and,
> http://mail-archives.apache.org/mod_mbox/tomcat-users/201812.mbox/ajax
/%3CDEB74971-2714-401F-9428-25EE0ECC6D11%40shaw.ca%3E
>
>  I’m not fluent in Tomcat, but it appears something changed in the
> catalina.sh script of 9.0.14 that changed the stop/start
> behaviour.

Certainly nothing in catalina.sh affects Windows Services. Even
catalina.bat is ignored for Windows Services.

Your issue is that Tomcat's scripts (well, actually, some 3rd-party
scripts, actually) can't manage to stop Tomcat. Jean-Pascal's problem
is that his shutdown is taking 60sec when he thinks it shouldn't take
that long.

Jean-Pascal, what do the Tomcat logs say? There should be something
like catalina.out or stdout.log or something like that.

- -chris

>> On Jan 7, 2019, at 3:38 PM, Jean-Pascal Houde 
>> wrote:
>> 
>> Hello,
>> 
>> I'm having a problem that seems to occur only since Tomcat
>> 9.0.14. I'm using Tomcat installed as a service on a Windows 2012
>> R2 server. The service starts normally, but stopping it from the
>> Windows Services window takes a long time (about a minute). This
>> happens even with no web application deployed on the server. I've
>> tried downgrading to 9.0.13 and 9.0.12 and both version stops
>> normally, under 1-2 seconds.
>> 
>> Here is what I am doing: 1. Download Tomcat Windows 64-bit zip 2.
>> Install service using "service install tomcat9" 3. Open Windows
>> "Services" control panel 3. Start Tomcat9 service -> very fast 4.
>> Stop Tomcat9 service -> gets stuck on "stopping service..." for
>> around a minute.
>> 
>> This is what the commons-daemon log file shows: [2019-01-07
>> 18:27:21] [info]  [ 7500] Commons Daemon procrun (1.1.0.0 64-bit)
>> started [2019-01-07 18:27:21] [info]  [ 7500] Running 'tomcat9'
>> Service... [2019-01-07 18:27:21] [info]  [ 3904] Starting
>> service... [2019-01-07 18:27:22] [info]  [ 3904] Service started
>> in 1190 ms. [2019-01-07 18:27:23] [info]  [ 9796] Stopping
>> service... [2019-01-07 18:27:24] [info]  [ 9796] Service stop
>> thread completed. [2019-01-07 18:28:24] [info]  [ 7500] Run
>> service finished. [2019-01-07 18:28:24] [info]  [ 7500] Commons
>> Daemon procrun finished
>> 
>> You can see the full minute between the initial "Stopping
>> services..." and the finish of the stopping process. Other log
>> files don't show anything suspicious.
>> 
>> Anyone seeing the same issue with this version?
>> 
>> Thanks,
>> 
>> 
>> Jean-Pascal Houde
>> 
>> 
>> -
>>
>> 
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
> 
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlw0LcEACgkQHPApP6U8
pFgfsg//Yv9k+Lqnn/nH2Pd2iahEJnPRZVRUeg2bRFQGlpwRURApBzup8646UsFE
zo9zxfJuuw2L/jea7rfZaXJaXay6nhaJ/h5+RPfq1CExNLjcK/3GjJwmZxSUqJxl
PtNtpjsJr8lD3OXMzu9sqr26Zj3AtPbAqpJFr1A9LGlflpIi5ohqzVkpA3h2knEH
luxjEbsD5uaG7YlQdzal76a81RBN0glBUvdgP1dPsgXKscMdYkoIzNYL7G5TniAx
3Jsilp0oWYfDEJ0oFRmUAjN++jq4QefMZHow3QUEU8xZ8L47JQv6ZlmkSbqPndH0
/kdrUA9Cv82lN0czBz2u+KmKduot7tc+KEqS+RJD8Pkj9Jy7FOLCu9klLXk3LXFG
M22XPJdwnIDQeVnjJKxjiUhetFjOCSzH3FyL/VuxAsO4qsCqSgiW/RRrU+FdLYfs
OQPjOzGISu/9lwZ+M7yPJ1XzCoBbpVE1iHf0R5vuI0H922oXRu0dyx/IKnEpbGrv
GY6zRrte4AtLO0oMXeDxWH/iC9xgRn+B4oy8Gd3RY9l6A1vLeT41flCSjAvtSkeU
AE5N4iJp39mGJ/iUpWa7C5tzwbV1syv1weC4BzHVl5+W+YBBlv6x/HJX2Zc9dsMO
okn6tCEuKFnSCqc4N4IdocolkISqObVe35RYioYHxBStMDr5dpU=
=xtqK
-END PGP SIGNATURE-

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



Re: Tomcat 9.0.14 Windows service slow to stop

2019-01-07 Thread Steve Demy
This sounds similar to:

http://mail-archives.apache.org/mod_mbox/tomcat-dev/201812.mbox/ajax/%3Cbug-63041-78%40https.bz.apache.org%2Fbugzilla%2F%3E
and,
http://mail-archives.apache.org/mod_mbox/tomcat-users/201812.mbox/ajax/%3CDEB74971-2714-401F-9428-25EE0ECC6D11%40shaw.ca%3E

I’m not fluent in Tomcat, but it appears something changed in the catalina.sh 
script of 9.0.14 that changed the stop/start behaviour.

Steve


> On Jan 7, 2019, at 3:38 PM, Jean-Pascal Houde  wrote:
> 
> Hello,
> 
> I'm having a problem that seems to occur only since Tomcat 9.0.14. I'm using 
> Tomcat installed as a service on a Windows 2012 R2 server. 
> The service starts normally, but stopping it from the Windows Services window 
> takes a long time (about a minute). This happens even with no web application 
> deployed on the server. I've tried downgrading to 9.0.13 and 9.0.12 and both 
> version stops normally, under 1-2 seconds.
> 
> Here is what I am doing:
> 1. Download Tomcat Windows 64-bit zip
> 2. Install service using "service install tomcat9"
> 3. Open Windows "Services" control panel
> 3. Start Tomcat9 service -> very fast
> 4. Stop Tomcat9 service -> gets stuck on "stopping service..." for around a 
> minute.
> 
> This is what the commons-daemon log file shows:
> [2019-01-07 18:27:21] [info]  [ 7500] Commons Daemon procrun (1.1.0.0 64-bit) 
> started
> [2019-01-07 18:27:21] [info]  [ 7500] Running 'tomcat9' Service...
> [2019-01-07 18:27:21] [info]  [ 3904] Starting service...
> [2019-01-07 18:27:22] [info]  [ 3904] Service started in 1190 ms.
> [2019-01-07 18:27:23] [info]  [ 9796] Stopping service...
> [2019-01-07 18:27:24] [info]  [ 9796] Service stop thread completed.
> [2019-01-07 18:28:24] [info]  [ 7500] Run service finished.
> [2019-01-07 18:28:24] [info]  [ 7500] Commons Daemon procrun finished
> 
> You can see the full minute between the initial "Stopping services..." and 
> the finish of the stopping process. Other log files don't show anything 
> suspicious.
> 
> Anyone seeing the same issue with this version? 
> 
> Thanks,
> 
> 
> Jean-Pascal Houde
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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



Re: tomcat 8 windows service logs

2017-05-25 Thread Gili B
hi

In case anyone wonders ..

I used another logging.properties in the application to overcome that.

(placed under WEB_INF/classes)


Thanks

-gili



From: Gili B 
Sent: Wednesday, May 24, 2017 3:56 PM
To: users@tomcat.apache.org
Subject: tomcat 8 windows service logs

hi

Im using tomcat 8 as a windows service.

Most of the logs are going to .stderr

I use the same logging.config as I use in linux (and it works in linux).


The files are created under logs directory, but are empty.

When I configure tomcat LogLevel to WARNING, I still see INFO messages in 
stderr file.


Please help.


Thanks

-gili



Re: Tomcat as Windows Service

2016-09-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Amit,

On 9/8/16 12:49 AM, Amit Pande wrote:
> Hello experts,
> 
> We have configured the Tomcat to  run as a Windows Service. And
> Windows SCM has a default time of 30 seconds, but the Tomcat
> process does not start/stop within this time.
> 
> So, if we restart the service via SCM, we receive the Address in
> Use exceptions (as previous Tomcat process hasn't been stopped
> yet).
> 
> We're using our own custom mechanism to hook the Tomcat process
> with the Windows SCM and haven't gone the below mentioned way.
> 
> https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
>
>  Any pointers on how to solve this issue ?
> 
> 1. Increasing Windows SCM timeout for this process might work but 
> doesn't sound really clean solution.

It might be your only solution.

> 2. Issue a Catalina stop, and if it does not stop in some time ,
> do a task kill or something similar of the corresponding java.exe
> ?

Windows has a few[1] kill[2] commands[3]. I don't know what the
repercussions of killing your application are, though. Presumably,
your application needs to clean up after itself.

> Appreciate your help here.

What's taking Tomcat (really your application) so long to shutdown?

If there are requests taking a long time to complete, you can
configure Tomcat to cancel those requests after a particular
timeout[4]. I couldn't find a configuration setting for when using an
. Hmm...

- -chris

[1]
http://www.howtogeek.com/145882/how-to-kill-a-process-from-the-cli-in-wi
ndows/
[2] http://tweaks.com/windows/39559/kill-processes-from-command-prompt/
[3] https://technet.microsoft.com/en-us/library/bb491009.aspx
[4] https://tomcat.apache.org/tomcat-8.0-doc/config/http.html,
executorTerminationTimeoutMillis
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJX0YEEAAoJEBzwKT+lPKRYXMEP/R/pjvAIXyp8LsPhGyR1T1BZ
6HW4MSScWIvaVIwIxfCs73vL3KcIIzrEEN69PClVItLKMFOwtdUC5zW/w9emkWFb
ppDhmFn5QOetldm3E/KiXp0gYpc9e5C/QKwjOsTwXKI3rA6kWsRMa6Tldve5cn81
9TV1F83iICj36n31jkYZJ6EPo9YQDrGvb9ezFhselZEXoSeTVF8q0T4P7fQkoX+q
yqMEHyQQHR3RE6WOHkoz8NX06oSeEFdDrPISblvrqdxYEZD9AsToIR3uqalb29wo
y72nOQPjpONnEcNBy2FpzXAvSPih6YFAlr/14v2W7Bfhdt+szutLkth3+3MDA9bK
tWMXWf11tav4SUeXyb5vpaduSJ+iPXyQdW+UDakqQ2M77vuzbxVSRwXEjvswOhNh
IhY5laFLHglEb/O9FfuNjXtMh0vVlyPJLGEAbsKAQnF5bQB7MckiVWBr7+thAHnM
OCSnDoAwNqk+9hMs4CVPVWNT/kHWWzC6B7iawyoYdqjyln7zQp9YfKEUWudRzw+z
JHQfeFOJsi7xXKHXuxFoNqJKuw5tx6o+Wjy/ElJpAlrOMhGzBPoTQobU/ukSQUUW
X7rF1Sa0cg2UeOeaLe9TQ4yuCDgC02ExD2yxJ7Z2srFG88rCXyxJipwloXTWnyBq
iuAEdD29FZ7n+hiQTfNL
=ZnzF
-END PGP SIGNATURE-

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



Re: Tomcat as Windows service under technical user

2014-01-27 Thread Cédric Couralet
2014/1/27 Strobel, Stefan (TS IC) stefan.stro...@hp.com:
 Hi everybody,

 I would like to run a Tomcat 7.0.47 as Windows service. But that service 
 shall not be executed as Administrator but as a local technical user. That 
 user is existent, let's call it A. The account is secured with password B.
 The question is, how do I install Tomcat as a service (that starts at Windows 
 startup) as the technical user A? I tried various commands, but didn't get it 
 working.

 Any ideas, solutions?


Once the service installed, you can change the User with the sc utility :

sc.exe config serviceName obj= domain\username password= password

 Thanks
 Stefan


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



Re: Tomcat 7.0.39 windows service setenv not used

2013-04-24 Thread Konstantin Kolinko
2013/4/25 Satyendra Singh satya...@gmail.com:
 I have created multiple windows services and for one of the service, i have
 -Dcatalina.base=C:\servers\applications\service1
 -Dcatalina.home=C:\servers\apache-tomcat-7.0.39

 i have C:\servers\applications\service1\bin\setenv.bat where i have

 set JAVA_HOME= C:\

 Set JAVA_OPTS=-D..

 set CATALINA_OPTS=-Xms.

 running service1 does not seem to use these values, it only use those that
 i can see at  tomcat7w.exe on this service.



As documented,
[quote]
All the environment variables described here and the setenv script are
used only if you use the standard scripts to launch Tomcat. For example, if
you have installed Tomcat as a service on Windows, the service wrapper
launches Java directly and does not use the script files.
[/quote]

http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

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



RE: Tomcat 7.0.39 windows service setenv not used

2013-04-24 Thread Caldarale, Charles R
 From: Satyendra Singh [mailto:satya...@gmail.com] 
 Subject: Tomcat 7.0.39 windows service setenv not used

 running service1 does not seem to use these values, it only use those that
 i can see at  tomcat7w.exe on this service.

Services do not use _any_ .bat scripts, nor any environment variables.  All 
properties must be configured in the tomcat7w.exe program associated with each 
service, which then stores the values in the Windows registry for use when the 
service is started.

 - 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: Tomcat 7.0.39 windows service setenv not used

2013-04-24 Thread Satyendra Singh
Thanks!, so there is no other way to set these except to put in registry
via tomcat7w.exe.


On Wed, Apr 24, 2013 at 4:50 PM, Konstantin Kolinko
knst.koli...@gmail.comwrote:

 2013/4/25 Satyendra Singh satya...@gmail.com:
  I have created multiple windows services and for one of the service, i
 have
  -Dcatalina.base=C:\servers\applications\service1
  -Dcatalina.home=C:\servers\apache-tomcat-7.0.39
 
  i have C:\servers\applications\service1\bin\setenv.bat where i have
 
  set JAVA_HOME= C:\
 
  Set JAVA_OPTS=-D..
 
  set CATALINA_OPTS=-Xms.
 
  running service1 does not seem to use these values, it only use those
 that
  i can see at  tomcat7w.exe on this service.
 


 As documented,
 [quote]
 All the environment variables described here and the setenv script are
 used only if you use the standard scripts to launch Tomcat. For example, if
 you have installed Tomcat as a service on Windows, the service wrapper
 launches Java directly and does not use the script files.
 [/quote]

 http://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt

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




Re: Tomcat as Windows service

2011-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zbynek,

On 3/7/2011 3:34 AM, Zbynek Vavros wrote:
 Ok I switched to 7.0.8.
 
 Installed using package from
 http://mirror.fubra.com/ftp.apache.org/tomcat/tomcat-7/v7.0.8/bin/apache-tomcat-7.0.8.exe.
 
 Started either directly in services (changed from auto to manual) or using
 that small GUI application(//MS//).
 Yes I had checked Allow service to interact with desktop, unchecked now,
 no console window is diplayed when I start Tomcat at all !
 If I uncheck this how will I get console window?

Wait... do you want the console window or not? First you complained that
the window was showing and now you are complaining that it is not showing.

Or are you complaining that it is showing with no content?

If you want to see some output, check the server logs:

 -Djava.util.logging.config.file=C:\Program Files
 \Apache Software Foundation\Tomcat 7.0\conf\logging.properties

That file will contain the logging configuration. Standard output and
error should be configured to go to a specific file -- check the
settings using tomcat7w.exe.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1+h9AACgkQ9CaO5/Lv0PCsrgCfWyv7F4yxDGHlWWdBwzVEXt/k
QjUAn26ruZE+3cVsroQzg05bc5nLmqnk
=FfWg
-END PGP SIGNATURE-

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



RE: Tomcat as Windows service

2011-03-07 Thread Zbynek Vavros
:  |
|
  
--|
  |Caldarale, Charles R chuck.caldar...@unisys.com  
 |
  
--|
|
| To:|
|
  
--|
  |Tomcat Users List users@tomcat.apache.org  
 |
  
--|
|
| Date:  |
|
  
--|
  |03/04/2011 05:40 PM  
 |
  
--|
|
| Subject:   |
|
  
--|
  |RE: Tomcat as Windows service
 |
  
--|





 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com]
 Subject: Tomcat as Windows service

 I installed Tomcat as service

Be specific: exactly what did you do?

 when I start it console is displayed.

Be specific: exactly how are you starting it?

If you run tomcat7w.exe and look at the Logon tab, is Allow service to
interact with desktop checked?  If so, clear it - it should never be set.

Also with tomcat7w.exe, what are the settings under the Java tab?

 Using Tomcat 7.0.2

Please update to a stable, rather than beta, version.

 - 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




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

RE: Tomcat as Windows service

2011-03-04 Thread Caldarale, Charles R
 From: Zbynek Vavros [mailto:zbynek_vav...@cz.ibm.com] 
 Subject: Tomcat as Windows service

 I installed Tomcat as service

Be specific: exactly what did you do?

 when I start it console is displayed.

Be specific: exactly how are you starting it?

If you run tomcat7w.exe and look at the Logon tab, is Allow service to 
interact with desktop checked?  If so, clear it - it should never be set.

Also with tomcat7w.exe, what are the settings under the Java tab?

 Using Tomcat 7.0.2

Please update to a stable, rather than beta, version.

 - 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: Tomcat as Windows service - I can't set more than 768 Mb of memory

2010-11-08 Thread Rainer Jung

On 08.11.2010 22:34, icarrara wrote:


I manually installed Tomcat 6.0.29 on Windows Server 2003 R2 and all was
fine.

Then I use the service install Alfresco command to install Tomcat as
Windows service.

Using the tomcat6w //ES//Alfresco command I'll set up the
-XX:MaxPermSize=256m in the Java Options and 1024 in the Initial and
Maximum memory pool ... The problem is that I can't set more than 768 Mb of
memory because with values great than 768 the service don't starts.

I get the error Could not reserve enough space for object heap.  I'm using
JDK 1.6.0_22u and the machine have 4 Gbyte of phisical RAM...


What other startup flags are configured? E.g. is there a stack size set? 
How do your connector configurations in server.xml look like?


Thread stacks, Java heap and perm and some other native memory parts all 
have to fit nto 2GB if it is 32Bits Windows/Java.


Regards,

Rainer

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



Re: Tomcat as Windows service - I can't set more than 768 Mb of memory

2010-11-08 Thread Konstantin Kolinko
2010/11/9 icarrara icarr...@studio5.it:

 because with values great than 768 the service don't starts.


Discussed about a month ago:
http://markmail.org/thread/xwpedx67fjpdeczt

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



Re: Tomcat 6.0.29 - Windows Service - JMX

2010-10-19 Thread Konstantin Kolinko
2010/10/19 André Warnier a...@ice-sa.com:
(...)
 In this case, the application appears in jvisualvm, as an unknown
 application (pid )

(...)
 In this case, the application appears in jvisualvm, as a tomcat (pid )

(...)
 To confirm this, I used the Windows Services applet to change the user under
 which tomcat runs, to be the same as my Windows login-id, then restarted the
 Service.
 And tad, jvisualvm then finds it (but as the unknown application).

 So the fact of running either on the base of Registry settings or on the
 base of environment variables seems to have a bearing on jvisualvm's ability
 to find a name for the application.


Here is an answer:
http://stackoverflow.com/questions/1334907/jvisualvm-how-to-provide-an-icon-and-another-name-than-the-invoking-class-for-m

with more details here:
http://blogs.sun.com/geertjan/entry/getting_started_extending_visualvm_part

The summary is that jvisualvm knows certain applications, and one may
write a plugin to it to teach it to recognize more apps.

Best regards,
Konstantin Kolinko

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



Re: Tomcat 6.0.29 - Windows Service - JMX

2010-10-18 Thread Pid
On 18/10/2010 19:11, Leo Donahue - PLANDEVX wrote:
 http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
 
 Adding JMX to Tomcat 6.0.29 and starting with the startup.bat will add a 
 Tomcat icon and show the process ID, under the Local connection, when 
 launching jvisualvm.exe
 
 Adding JMX to Tomcat via the tomcat6w.exe doesn't display the Tomcat icon or 
 the process id in jvisualvm.exe, and I have to add the JXM connection myself.
 
 What is the difference?  How do I configure the tomcat6w.exe to show the icon 
 and process id in jvisualvm.exe?

Maybe VisualVM recognises tomcat6.exe and assigns the icon.  I'm not
sure there's anything in Tomcat which designates an icon like this.


p

 Java tab in tomcat6w.exe
 
 -Dcom.sun.management.jmxremote
 -Dcom.sun.management.jmxremote.port=1092
 -Dcom.sun.management.jmxremote.ssl=false
 -Dcom.sun.management.jmxremote.authenticate=false
 
 Leo Donahue
 
 
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.29 - Windows Service - JMX

2010-10-18 Thread André Warnier

Leo Donahue - PLANDEVX wrote:

http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html

Adding JMX to Tomcat 6.0.29 and starting with the startup.bat will add a Tomcat 
icon and show the process ID, under the Local connection, when launching 
jvisualvm.exe

Adding JMX to Tomcat via the tomcat6w.exe doesn't display the Tomcat icon or 
the process id in jvisualvm.exe, and I have to add the JXM connection myself.

What is the difference?  How do I configure the tomcat6w.exe to show the icon 
and process id in jvisualvm.exe?

Java tab in tomcat6w.exe

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1092
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false


Sorry if I ask, but how are you starting Tomcat in the second case ? as a 
Service ?


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



Re: Tomcat 6.0.29 - Windows Service - JMX

2010-10-18 Thread André Warnier

Leo Donahue - PLANDEVX wrote:

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Tomcat 6.0.29 - Windows Service - JMX
Sorry if I ask, but how are you starting Tomcat in the second case ? as
a Service ?



Yes.  Starting Tomcat in the second case as a windows service.  Created the 
windows service using the service.bat - service install Tomcat6

I'll add a 3rd case : if you navigate to (catalina_home)\bin and double-click 
tomcat6.exe, then in jvisualvm appears a local unknown application for that Tomcat.



The differences I can think of :

- using net start tomcat.. starts the tomcat6.exe executable/wrapper (as a Service), 
which in turn runs a JVM, but using Windows Registry settings, not environment variables.
In that case, the process (as seen by the Task Manager) appears to run tomcat6.exe, not 
java.exe

In this case, the application does not appear in jvisualvm.

- launching tomcat6.exe directly, although it is the same wrapper, does not start tomcat 
as a Service, but starts it in a console window.

But I presume that it uses the same Registry settings as above.
In that case, the process (as seen by the Task Manager) also appears to run tomcat6.exe, 
not java.exe.

In this case, the application appears in jvisualvm, as an unknown application (pid 
)

- using startup.bat : (itself calling catalina.bat), tomcat is not started as a service, 
it runs in a console window.  Also, it uses a bunch of environment variables and 
command-line parameters, set by startup.bat and catalina.bat and setenv.bat etc..

Also, in that case the executable which runs is java.exe.
In this case, the application appears in jvisualvm, as a tomcat (pid )


I believe tbat the difference is due to the /user/ used to run tomcat.

In the case of the Service, the standard setup makes it run as LocalSystem.
And in that case, the application does not appear in jvisualvm.

When tomcat is started in a command window however (the 2 other cases above), then it runs 
under the same user-id as the one you are logged-in as (*), and in that case jvisualvm 
finds it.


(*) bad English, that is, but I don't know how to say this otherwise

To confirm this, I used the Windows Services applet to change the user under which tomcat 
runs, to be the same as my Windows login-id, then restarted the Service.

And tad, jvisualvm then finds it (but as the unknown application).

So the fact of running either on the base of Registry settings or on the base of 
environment variables seems to have a bearing on jvisualvm's ability to find a name for 
the application.
And the fact of running as either LocalSystem, or as the same user running jvisualvm, 
seems to determine if jvisualvm finds the application or not.


But do not ask me why this is so.


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



Re: Tomcat as Windows service and output window

2008-09-18 Thread Johnny Kewl


- Original Message - 
From: SerFingolfin [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Thursday, September 18, 2008 10:44 AM
Subject: Tomcat as Windows service and output window




Hi to everybody!
I installed Tomcat as service in Windows XP.
In my application i use java.awt.TrayIcon to show an icon in system 
Traybar.
If i start tomcat (as service) without checking allow service interact 
with
Desktop i don't see my icon on system traybar. Checking that flag makes 
my

icon appear and working well, but tomcat's output window also appears...is
there a way to hide it?
Thanks in advance.
--
View this message in context: 
http://www.nabble.com/Tomcat-as-Windows-service-and-output-window-tp19548553p19548553.html

Sent from the Tomcat - User mailing list archive at Nabble.com.


Interesting

I think you probably into a little Win32 API

I vaguely remember ShowWindow(yada blah)...
and there is a way in Win32 to also get the window handle from the window 
name... I've forgotten..

so thats a little JNI

I dont think its too easy

Another rather weird way of maybe tackling it... is that Java as a JavaW 
variation on windows...
JavaW starts a java program without a window... so a little messing around 
with BAT files will let you see if the task bar still works with that... I 
imagine it does...


Then just leave the service as a service... because it runs without a 
user or dont use a service at all and start TC from the RUN folder in 
windows
But then you are going to have to add something to you task bar to let the 
guy shut it down... a process to shutdown.bat because the use is blind...


Then the service itself in tomacat is a program called Procrun... in fact 
its just renamed to TomcatW...
it doesnt work with java in works with java's dll ie its starting the 
bootstrap classes from C code
But you can redirect that to any java class you like with the right 
interface so you could start your SuperTaskBarJava.class... it does a 
JavaW tomcat... or startup bat calling JavaW and then if the user closes 
the services... your SuperTaskBarJava.class will do it...


... Take your pick... I think they all lots of work ;)

Hopefully one idea there works have fun ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat as Windows service and output window

2008-09-18 Thread SerFingolfin

Thanks for your help!
But that's not so easy doing that...
I was wondering how Netbeans can make my traybar work 
hiding tomcat's output window at the same time!
And not only hide : they can redirect tomcat's output to a text area
inside the IDE...
-- 
View this message in context: 
http://www.nabble.com/Tomcat-as-Windows-service-and-output-window-tp19548553p1946.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat as Windows service and output window

2008-09-18 Thread Johnny Kewl


- Original Message - 
From: SerFingolfin [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Thursday, September 18, 2008 5:29 PM
Subject: Re: Tomcat as Windows service and output window




Thanks for your help!
But that's not so easy doing that...
I was wondering how Netbeans can make my traybar work
hiding tomcat's output window at the same time!
And not only hide : they can redirect tomcat's output to a text area
inside the IDE...



Netbeans doesnt start TC as a service?
Its probably starting TC with
   JavaW

ie Java (shows terminal)
JavaW (does not)

A windows service is a different animal that starts TC thru a JVM.dll

Netbeans is capturing the PrintStream... google for PrintStream System

Because a normal user started NB... the processes are running in that users 
name and they have desktop rights...

A service does not (windows thing) unless allow whatever is set.

So all NB is doing is
   JavaW tomcat
   Capture printstream

I'm not sure how much you can see in the ant script... but how they launch 
TC is probably there...


A service... is a different story... because they run even when no one has 
logged on...


... something like that ;)

Linux is much easier... same trick with a little  behind it ;)

Have fun ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 Windows Service

2008-08-05 Thread Skondras Panos
Setting the catalina_base solves the problem but you have to create a
new dir for the conf files.
Is there a way to just pass as a parameter the server.xml in the startUp class 
as StartParams or something else.
Thanks a lot


--- Στις Δευτ., 04/08/08, ο/η Mark Thomas [EMAIL PROTECTED] έγραψε:

 Από: Mark Thomas [EMAIL PROTECTED]
 Θέμα: Re: Tomcat 6 Windows Service
 Προς: Tomcat Users List users@tomcat.apache.org
 Ημερομηνία: Δευτέρα, 4 Αύγουστος 2008, 17:21
 Skondras Panos wrote:
  Hi all,
  I install Tomcat 6 as a services in windows 2000.
  I follow the how-to and all went ok.
  Now i want to install another service of tomcat 6 BUT
 for this service
  i want to get a different server.xml file than the
 other service.
  I want to do this without having to copy the dir of
 tomcat and install
  the service from there.I want to have one installation
 of tomcat.
  I tried all the StartParams option with no luck.
  Also i tries the tomcat6w config tool to add the
 parameter no luck.
  When i run catalina.bat start -config /con/server2.xml
 all works ok.
  Any suggestions.
 
 Read RUNNING.txt
 Use service.bat to create multiple instances with different
 service names.
 
 Mark
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]


  
___ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 Windows Service

2008-08-04 Thread Mark Thomas

Skondras Panos wrote:

Hi all,
I install Tomcat 6 as a services in windows 2000.
I follow the how-to and all went ok.
Now i want to install another service of tomcat 6 BUT for this service
i want to get a different server.xml file than the other service.
I want to do this without having to copy the dir of tomcat and install
the service from there.I want to have one installation of tomcat.
I tried all the StartParams option with no luck.
Also i tries the tomcat6w config tool to add the parameter no luck.
When i run catalina.bat start -config /con/server2.xml all works ok.
Any suggestions.


Read RUNNING.txt
Use service.bat to create multiple instances with different service names.

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.0.28 windows service path configuration

2006-04-25 Thread Tim Lucia
Have you read this:

http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html

???

I don’t remember version 4 and what –path would do.  You can certainly 
pass along env variables with --JvmOptions –Dpath=...


hth,
Tim


-Original Message-
From: ludovic larche [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 25, 2006 5:36 AM
To: users@tomcat.apache.org
Subject: Tomcat 5.0.28 windows service path configuration

Hello,

I need your help to solve a problem, i would like to migrate my app from
Tomcat 4.1.31 to 5.0.28 and use it as Windows Service.
I would like to pass a directory Path during Tomcat 5.0.28 windows service
installation.

I can do it easily with Tomcat 4.1.31 when i use this command in a batch
file :

tomcat.exe -install Skyview Server ... -path
c:\firstdirectory;c:\seconddirectory

But I can't do it with Tomcat 5.0.28 when i use this command :

service.bat  install Skyview ... --path
c:\firstdirectory;c:\seconddirectory

I tried lots of workarounds to pass a path to Tomcat 5.0.28 during  windows
service installation, is there a way to configure Tomcat in this mode ?
I would like to avoid update windows environment path in environment
variable and i would prefer to use a Tomcat service for it.

Thanks very much for your help 
-- 

Ludovic Larché 
Software Engineer
Development Software Team 
[EMAIL PROTECTED] 
12, rue des Landelles - Immeuble Hercule 2 - 35510 Cesson Sévigné - France 
Tel. : + 33 (0) 2 99 86 98 07 - Fax : + 33 (0) 2 99 86 98 01 
The present email and all information included therein do not constitute a
legal agreement accorded by JOUVE. All legal agreements must be formulated
in writing on paper by a legal representative of JOUVE. If you have received
this email by mistake, please inform us of that fact and destroy the email
and any documents it might contain Thank you for your cooperation. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]