Re: Component working in Console not as Service

2019-07-31 Thread tomcat

On 31.07.2019 20:26, Potgieter, Carlo wrote:

On 31.07.2019 14:49, Mark Thomas wrote:

On 31/07/2019 13:03, Potgieter, Carlo wrote:



On 31/07/2019 12:48, Potgieter, Carlo wrote:

I was hoping to obtain some assistance. We have used a library to convert MS 
Office documents (docx and pptx) to PDF.

This works perfectly in the development environment and also when running 
Tomcat in a console window.

The moment we run Tomcat as a service this specific component gives and error. 
Unfortunately the error is non-specific so we cannot troubleshoot the origin.

My question is, what would be the difference in running Tomcat as a Service as 
oppose to running it in Console that might cause this problem?


Tomcat runs as a different user with different access permissions, particularly 
to network shares.

You probably want to set up a Tomcat specific user with the appropriate 
permissions.

Mark

Thank you Mark for the quick response.

My first thought was permissions also, however I have attempted to run it with 
local, domain and system user, however the same result.

Both local and domain user was part of the local admin group. Is there anything 
else I can check?


Are you sure the DDL is being loaded? That normally needs explicit
configuration to point the JVM at the right path.

Look at the docs for for
org.apache.catalina.startup.VersionLoggerListener and configure it to
dump everything. Then compare the console start with the service start.



What is also different when Tomcat runs as a Service or in a console, is where 
the JVM that runs tomcat, picks up its environment and command-line switches.
If you are not familiar with this matter, this may help :
verbose explanation : 
https://secure-web.cisco.com/16LxnNI0vUhSt5WCJq8xkkulFgI8kkE6jU6nNTTWH8Edc36MeIASjeU6nUbSA_zE1ivz6c5TGLRI5-1Pf6_zuQkUOEaw8utUuFpuUnCrCLIeiS7dhXxvll2giIW3fHOBe1_gpGzPiGufx1vE50Dzs9UUSm5Rc1iB9G9UILBUZ6dhLaGa3vAEUt8bmVvfaGcwlM8tmxid6q8PydRkxPkVHu_02IIO1w4c2yyYp4O9vhwKqUq1OeApnpAj1c0e2G-t0fT-lxYS5ofL92-i2ZpXEQk9bpTnCXLs0bT0wnFZYQsrFJZ8GQQckDdY-8eBWc946XK9enjcTwIMehHfk013zuw/https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FTOMCAT%2FWindows#Windows-Q11
Official page : 
https://secure-web.cisco.com/1BYhcwXb2ofGRuNXu8K-JZBV4sFyWUkMe0XaNSYXcey93JyiAhWVVK1zM0iJzrwal62xEQvv7bWZTbZIMuGTP_S_2qZdoXT4tLt78CPHzpOJND96h28X7R95_fnapxZO1zDvqNUPkrh23BUmyvnfKvqfef2panME2Z0l8GOvPAP4lZdyaSwgcD0L2TM7oClsAQ4TPAeM8hVEtWCsJsoeQjwh7m4IHyvpPDfPDJ28gRGkBoLQWETM9alb7RHjMtvclQ7-lMp3IYS9kOzQBDVHACmGkdIqgx-XAWNBjM6Wce6IoYmAeiwIgYmPZ0oClxsovFcb1-dH06wAs3t938YQVvw/https%3A%2F%2Ftomcat.apache.org%2Ftomcat-8.5-doc%2Fwindows-service-howto.html

(Perhaps the application expects some value to be set somewhere..)

Also, above you mention "Unfortunately the error is non-specific..", but maybe 
you want to copy the error message here, so that someone else can have a look at it ?
Maybe it triggers some recognition by another user having had the same issue 
with that library.


Quickly answering both posts from Mark and Andrei:

Mark: Yes, the DLL is being loaded. There is error handling in place should it 
be unsuccessful in accessing any of the components.
I also compared the output of the VersionLoggerListners:
When running as a service and executing the Tomcat8.exe from cmd the 
information is the same, however the functionality only works when the .exe is 
run from cmd.
When using the Startup.bat script to start the server there are three less 
entries and one extra:

Entries not included:
31-Jul-2019 19:34:37.398 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
exit
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xms128m
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xmx256m

Entry included but not in the other two:
31-Jul-2019 19:37:11.434 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djdk.tls.ephemeralDHKeySize=2048

Again using this method to run the server allows the functionality to work.

Andre: From what I could see, everything is loaded the same as all of them uses 
the sae JVM. Unless I missed something...which is entirely possible.
The zeonpadpdf we are using consists of 3 components, 2 .jar's and 1 .dll. 
zeonpadpdf.jar, jacob-1.18.jar, jacob-1.18-x64.dll
The error we are receiving states: "Conversion error" and is generated from the 
zeonpadpdf.jar which handles the conversion from .docx to pdf.
This is also the error in the stack trace which doesn't provide much more 
information.
Based on what I could find in the zeonpadpdf.jar this is generic error message.

Hope that gives some more context.




1) I remember (from some time ago) that in the Services control panel, there was an option 
when defining a Service, like "Allow this service to interact with the desktop".

If you find it, you may want to set it, and then just redo 

Re: Component working in Console not as Service

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

Carlo,

On 7/31/19 07:48, Potgieter, Carlo wrote:
> I was hoping to obtain some assistance. We have used a library to 
> convert MS Office documents (docx and pptx) to PDF.
> 
> This works perfectly in the development environment and also when 
> running Tomcat in a console window.
> 
> The moment we run Tomcat as a service this specific component
> gives and error. Unfortunately the error is non-specific so we
> cannot troubleshoot the origin.
What DO you have?

> My question is, what would be the difference in running Tomcat as a
>  Service as oppose to running it in Console that might cause this 
> problem?
> 
> Any assistance would be greatly appreciated!

Since you are generating PDFs which often have to interact with
graphical components, this could be a "headless" issue. I could have
sworn that modern JVMs always ran "headless", but I guess maybe not.

https://www.oracle.com/technetwork/articles/javase/headless-136834.html

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl1B7XMACgkQHPApP6U8
pFgFdBAAqPk3hzrOBgN80k7LP/BfBQPFqRsqS/GVKcqaVNaxfoRbHk0k2LgJNhI6
5nVOyEwMOmPgs3A6H46OEWLCOPE7nVn/JL5gnYGAnTNWjkahVpldoprKeZHQ239o
IksdZsu4Qi4TQXhvuTKZasUkDZyaRQL7BEL2bXPkivjoqAsCsOaNifWneoDzuR+A
YgBBFs1bWhwx3Kd9T0CxwKICfYs+VkspqhcZAjn/0FDGszUYrWVW4oSWiOKzDLiT
Ghrqf76wXUKQFUApdu8zYmgOiDFagDXPP6anBGIkwuzbxTg9jTnjBw2ercQ3oWpv
Por8Cb0KIb35ZV5huUmb7c7J1AY0QTFYqwdJjF7nKpLxgvVHVDk/JoY1gAVsesS+
FvAXYai64xuR9e1wbAbSzSzvX2/w6PL0jsfbZqqhNfDlZzMpEu6sh0UUDExq7qLW
Q5pwuMPC2WRCyN4b4HPelH87vNWD8SVno5qHRhyCzU91IMdXKP+HgJUE8XCnIcq3
e4H8ZeSfmc3eeR3eB6YFWgAp9+8KexvOl3KsKdNdJDcPdGKihAMZWIMd5VIweNgM
08CFD7stIUWL5WEQY0BVM/kJ4ubT1QEtlgnysSabZdfK0fkNIXjynqoKY+I3OX0u
40ef7IjzGU19nO9IIq1SiUEz0mryU7YoJabovj4fgGYVqujAyu0=
=0dji
-END PGP SIGNATURE-

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



Re: How to enable Native Memory Tracking(NMT) in Tomcat?

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

కృష్ణ చైతన్,

> On 7/30/19 06:29, కృష్ణ చైతన్య wrote:
 Is there a plan to add support for Native Memory Tracking in
 Apache Common’s jsvc?
> 
>> There is no need to add support.
>> 
>> C:\Program Files\Apache Tomcat 9.0.22> SET 
>> JvmArgs=XX:NativeMemoryTracking=detail
>> 
>> C:\Program Files\Apache Tomcat 9.0.22> bin\service.bat install
>> 
>> Now your service should have memory tracking enabled.
> 
> Do we have instructions for linux as well?  Can you please point
> me to any documentation on this.
For Linux it's even easier: just make sure to include
"-XX:NativeMemoryTracking=detail" in your invocation of jsvn when
launching the service. How you do that depends very much upon how to
launch it.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl1B7BoACgkQHPApP6U8
pFgyYhAAld+de5xjtMpzULQgCphugI6K3+woNvNLTIe6mvm+J69oPpGWaKu3Nvrq
05XhE9wVadwAYqlWkhg5LqVanmnoB17U20gX2OdpRsubVLHBDCQBjTHgXhVJnCm3
3q+CVVlfvfKeEK1rectglSiOHqzeeJga5th3rTByPKzjiNy4TOr8+NLUJNlezIwQ
9C8//oSvpbLFX0puEsm1i4NZuzbzMDI4Mcim6pO0OoImQAgeIWE/GL62ld4ZcTCK
9MIMWgTHtbGzGdjpCLmfGa/glUwjdk0dnE1Sov6FLy34UoTh+wdk0rbe4pDZUW7b
946A2Xy2A8ZMIf44i4s6OQUzdZ7UTzF/yuHQ/wW9tGVggzLT7ZEZBDmgwotz/z6i
7PvQjyTH29oozPCKesMBXXYHg56oO/+sC4vG9v7S8F+DfltTMiWrxS+9z9/4eKS6
zQldzyOoGH3yEFEXoOy+I9PcyqsLoAHFHrmWTVDepzrYYc1tH2HlZVcZIh7JLbWk
m93l+Iq2Qyc+CCzfhAByUsksDA73Gi3sv8onxtWc+Pmp3nhYWHYMn9V0lO3YCz1E
xfrVZxADwn13hTNO91Hng1eeyzxCAwP6y/FFiVZiDpW1faFxJqbdFS6RnnV2y9KY
TY1AU3zgz+sykpsuRHyCKgti0xFRZCOOiEdBfh69ido6UDJccvk=
=eHTN
-END PGP SIGNATURE-

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



RE:Component working in Console not as Service

2019-07-31 Thread Potgieter, Carlo
On 31.07.2019 14:49, Mark Thomas wrote:
> On 31/07/2019 13:03, Potgieter, Carlo wrote:
>>
>>
>> On 31/07/2019 12:48, Potgieter, Carlo wrote:
>>> I was hoping to obtain some assistance. We have used a library to convert 
>>> MS Office documents (docx and pptx) to PDF.
>>>
>>> This works perfectly in the development environment and also when running 
>>> Tomcat in a console window.
>>>
>>> The moment we run Tomcat as a service this specific component gives and 
>>> error. Unfortunately the error is non-specific so we cannot troubleshoot 
>>> the origin.
>>>
>>> My question is, what would be the difference in running Tomcat as a Service 
>>> as oppose to running it in Console that might cause this problem?
>>
>> Tomcat runs as a different user with different access permissions, 
>> particularly to network shares.
>>
>> You probably want to set up a Tomcat specific user with the appropriate 
>> permissions.
>>
>> Mark
>>
>> Thank you Mark for the quick response.
>>
>> My first thought was permissions also, however I have attempted to run it 
>> with local, domain and system user, however the same result.
>>
>> Both local and domain user was part of the local admin group. Is there 
>> anything else I can check?
>
> Are you sure the DDL is being loaded? That normally needs explicit
> configuration to point the JVM at the right path.
>
> Look at the docs for for
> org.apache.catalina.startup.VersionLoggerListener and configure it to
> dump everything. Then compare the console start with the service start.
>

What is also different when Tomcat runs as a Service or in a console, is where 
the JVM that runs tomcat, picks up its environment and command-line switches.
If you are not familiar with this matter, this may help :
verbose explanation : 
https://secure-web.cisco.com/16LxnNI0vUhSt5WCJq8xkkulFgI8kkE6jU6nNTTWH8Edc36MeIASjeU6nUbSA_zE1ivz6c5TGLRI5-1Pf6_zuQkUOEaw8utUuFpuUnCrCLIeiS7dhXxvll2giIW3fHOBe1_gpGzPiGufx1vE50Dzs9UUSm5Rc1iB9G9UILBUZ6dhLaGa3vAEUt8bmVvfaGcwlM8tmxid6q8PydRkxPkVHu_02IIO1w4c2yyYp4O9vhwKqUq1OeApnpAj1c0e2G-t0fT-lxYS5ofL92-i2ZpXEQk9bpTnCXLs0bT0wnFZYQsrFJZ8GQQckDdY-8eBWc946XK9enjcTwIMehHfk013zuw/https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FTOMCAT%2FWindows#Windows-Q11
Official page : 
https://secure-web.cisco.com/1BYhcwXb2ofGRuNXu8K-JZBV4sFyWUkMe0XaNSYXcey93JyiAhWVVK1zM0iJzrwal62xEQvv7bWZTbZIMuGTP_S_2qZdoXT4tLt78CPHzpOJND96h28X7R95_fnapxZO1zDvqNUPkrh23BUmyvnfKvqfef2panME2Z0l8GOvPAP4lZdyaSwgcD0L2TM7oClsAQ4TPAeM8hVEtWCsJsoeQjwh7m4IHyvpPDfPDJ28gRGkBoLQWETM9alb7RHjMtvclQ7-lMp3IYS9kOzQBDVHACmGkdIqgx-XAWNBjM6Wce6IoYmAeiwIgYmPZ0oClxsovFcb1-dH06wAs3t938YQVvw/https%3A%2F%2Ftomcat.apache.org%2Ftomcat-8.5-doc%2Fwindows-service-howto.html

(Perhaps the application expects some value to be set somewhere..)

Also, above you mention "Unfortunately the error is non-specific..", but maybe 
you want to copy the error message here, so that someone else can have a look 
at it ?
Maybe it triggers some recognition by another user having had the same issue 
with that library.


Quickly answering both posts from Mark and Andrei:

Mark: Yes, the DLL is being loaded. There is error handling in place should it 
be unsuccessful in accessing any of the components.
I also compared the output of the VersionLoggerListners:
When running as a service and executing the Tomcat8.exe from cmd the 
information is the same, however the functionality only works when the .exe is 
run from cmd.
When using the Startup.bat script to start the server there are three less 
entries and one extra:

Entries not included:
31-Jul-2019 19:34:37.398 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
exit
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xms128m
31-Jul-2019 19:34:37.399 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Xmx256m

Entry included but not in the other two:
31-Jul-2019 19:37:11.434 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djdk.tls.ephemeralDHKeySize=2048

Again using this method to run the server allows the functionality to work.

Andre: From what I could see, everything is loaded the same as all of them uses 
the sae JVM. Unless I missed something...which is entirely possible.
The zeonpadpdf we are using consists of 3 components, 2 .jar's and 1 .dll. 
zeonpadpdf.jar, jacob-1.18.jar, jacob-1.18-x64.dll
The error we are receiving states: "Conversion error" and is generated from the 
zeonpadpdf.jar which handles the conversion from .docx to pdf.
This is also the error in the stack trace which doesn't provide much more 
information.
Based on what I could find in the zeonpadpdf.jar this is generic error message.

Hope that gives some more context.



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

Re: Can Tomcat log handshake failures, and where?

2019-07-31 Thread Mark Thomas
On 30/07/2019 08:28, Mark Thomas wrote:



> Generally, processing needs to get as far as presenting a request line
> before something is added to the access logs. We could look at expanding
> the access logging to include connections that are dropped earlier but
> that might be a sufficiently invasive change that it needs to wait until
> Tomcat 10.

I've done some work on this and it looks promising. The end result is
entries like this in the access log for a failed TLS handshake:

127.0.0.1 - - [31/Jul/2019:16:45:16 +0100] "-" 400 -
127.0.0.1 - - [31/Jul/2019:16:45:16 +0100] "-" 400 -
127.0.0.1 - - [31/Jul/2019:16:45:17 +0100] "-" 400 -
127.0.0.1 - - [31/Jul/2019:16:45:17 +0100] "-" 400 -

Does this meet your requirement?

Mark

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



Re: Component working in Console not as Service

2019-07-31 Thread logo

All,

sorry for top posting. Nothing down there to relate to.

Could it be that it is something similar like headless on linux? I 
remember something similar when using pdflib back in the days.
As a service there may be something missing (login shell, DISPLAY, 
Terminal)? "Word to PDF" could be well something that requires screen 
information. Worth a check on the requirements of the library.


My 2cts.

Peter


Am 2019-07-31 15:54, schrieb André Warnier:

On 31.07.2019 14:49, Mark Thomas wrote:

On 31/07/2019 13:03, Potgieter, Carlo wrote:



On 31/07/2019 12:48, Potgieter, Carlo wrote:
I was hoping to obtain some assistance. We have used a library to 
convert MS Office documents (docx and pptx) to PDF.


This works perfectly in the development environment and also when 
running Tomcat in a console window.


The moment we run Tomcat as a service this specific component gives 
and error. Unfortunately the error is non-specific so we cannot 
troubleshoot the origin.


My question is, what would be the difference in running Tomcat as a 
Service as oppose to running it in Console that might cause this 
problem?


Tomcat runs as a different user with different access permissions, 
particularly to network shares.


You probably want to set up a Tomcat specific user with the 
appropriate permissions.


Mark

Thank you Mark for the quick response.

My first thought was permissions also, however I have attempted to 
run it with local, domain and system user, however the same result.


Both local and domain user was part of the local admin group. Is 
there anything else I can check?


Are you sure the DDL is being loaded? That normally needs explicit
configuration to point the JVM at the right path.

Look at the docs for for
org.apache.catalina.startup.VersionLoggerListener and configure it to
dump everything. Then compare the console start with the service 
start.




What is also different when Tomcat runs as a Service or in a console,
is where the JVM that runs tomcat, picks up its environment and
command-line switches.
If you are not familiar with this matter, this may help :
verbose explanation :
https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11
Official page :
https://tomcat.apache.org/tomcat-8.5-doc/windows-service-howto.html

(Perhaps the application expects some value to be set somewhere..)

Also, above you mention "Unfortunately the error is non-specific..",
but maybe you want to copy the error message here, so that someone
else can have a look at it ?
Maybe it triggers some recognition by another user having had the same
issue with that library.


-
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: Component working in Console not as Service

2019-07-31 Thread tomcat

On 31.07.2019 14:49, Mark Thomas wrote:

On 31/07/2019 13:03, Potgieter, Carlo wrote:



On 31/07/2019 12:48, Potgieter, Carlo wrote:

I was hoping to obtain some assistance. We have used a library to convert MS 
Office documents (docx and pptx) to PDF.

This works perfectly in the development environment and also when running 
Tomcat in a console window.

The moment we run Tomcat as a service this specific component gives and error. 
Unfortunately the error is non-specific so we cannot troubleshoot the origin.

My question is, what would be the difference in running Tomcat as a Service as 
oppose to running it in Console that might cause this problem?


Tomcat runs as a different user with different access permissions, particularly 
to network shares.

You probably want to set up a Tomcat specific user with the appropriate 
permissions.

Mark

Thank you Mark for the quick response.

My first thought was permissions also, however I have attempted to run it with 
local, domain and system user, however the same result.

Both local and domain user was part of the local admin group. Is there anything 
else I can check?


Are you sure the DDL is being loaded? That normally needs explicit
configuration to point the JVM at the right path.

Look at the docs for for
org.apache.catalina.startup.VersionLoggerListener and configure it to
dump everything. Then compare the console start with the service start.



What is also different when Tomcat runs as a Service or in a console, is where the JVM 
that runs tomcat, picks up its environment and command-line switches.

If you are not familiar with this matter, this may help :
verbose explanation : 
https://cwiki.apache.org/confluence/display/TOMCAT/Windows#Windows-Q11
Official page : 
https://tomcat.apache.org/tomcat-8.5-doc/windows-service-howto.html

(Perhaps the application expects some value to be set somewhere..)

Also, above you mention "Unfortunately the error is non-specific..", but maybe you want to 
copy the error message here, so that someone else can have a look at it ?
Maybe it triggers some recognition by another user having had the same issue with that 
library.



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



Re: Component working in Console not as Service

2019-07-31 Thread Mark Thomas
On 31/07/2019 13:03, Potgieter, Carlo wrote:
> 
> 
> On 31/07/2019 12:48, Potgieter, Carlo wrote:
>> I was hoping to obtain some assistance. We have used a library to convert MS 
>> Office documents (docx and pptx) to PDF.
>>
>> This works perfectly in the development environment and also when running 
>> Tomcat in a console window.
>>
>> The moment we run Tomcat as a service this specific component gives and 
>> error. Unfortunately the error is non-specific so we cannot troubleshoot the 
>> origin.
>>
>> My question is, what would be the difference in running Tomcat as a Service 
>> as oppose to running it in Console that might cause this problem?
> 
> Tomcat runs as a different user with different access permissions, 
> particularly to network shares.
> 
> You probably want to set up a Tomcat specific user with the appropriate 
> permissions.
> 
> Mark
> 
> Thank you Mark for the quick response.
> 
> My first thought was permissions also, however I have attempted to run it 
> with local, domain and system user, however the same result.
> 
> Both local and domain user was part of the local admin group. Is there 
> anything else I can check?

Are you sure the DDL is being loaded? That normally needs explicit
configuration to point the JVM at the right path.

Look at the docs for for
org.apache.catalina.startup.VersionLoggerListener and configure it to
dump everything. Then compare the console start with the service start.

Mark


> 
> Carlo
> 
> *Disclaimer:* This email is subject to important restrictions, qualifications 
> and disclaimers ("the Disclaimer") that must be accessed and read by visiting 
> our website and viewing the webpage at the following address: 
> http://www.deloitte.com/za/disclaimer. The Disclaimer forms part of the 
> content of this email. If you cannot access the Disclaimer, please obtain a 
> copy thereof from us by sending an email to zaitserviced...@deloitte.co.za. 
> Deloitte refers to a Deloitte member firm, one of its related entities, or 
> Deloitte Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a 
> separate legal entity and a member of DTTL. DTTL does not provide services to 
> clients. Please see www.deloitte.com/about to learn more.
> 
> -
> 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:Component working in Console not as Service

2019-07-31 Thread Potgieter, Carlo


On 31/07/2019 12:48, Potgieter, Carlo wrote:
> I was hoping to obtain some assistance. We have used a library to convert MS 
> Office documents (docx and pptx) to PDF.
>
> This works perfectly in the development environment and also when running 
> Tomcat in a console window.
>
> The moment we run Tomcat as a service this specific component gives and 
> error. Unfortunately the error is non-specific so we cannot troubleshoot the 
> origin.
>
> My question is, what would be the difference in running Tomcat as a Service 
> as oppose to running it in Console that might cause this problem?

Tomcat runs as a different user with different access permissions, particularly 
to network shares.

You probably want to set up a Tomcat specific user with the appropriate 
permissions.

Mark

Thank you Mark for the quick response.

My first thought was permissions also, however I have attempted to run it with 
local, domain and system user, however the same result.

Both local and domain user was part of the local admin group. Is there anything 
else I can check?

Carlo

*Disclaimer:* This email is subject to important restrictions, qualifications 
and disclaimers ("the Disclaimer") that must be accessed and read by visiting 
our website and viewing the webpage at the following address: 
http://www.deloitte.com/za/disclaimer. The Disclaimer forms part of the content 
of this email. If you cannot access the Disclaimer, please obtain a copy 
thereof from us by sending an email to zaitserviced...@deloitte.co.za. Deloitte 
refers to a Deloitte member firm, one of its related entities, or Deloitte 
Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal 
entity and a member of DTTL. DTTL does not provide services to clients. Please 
see www.deloitte.com/about to learn more.

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



Re: Component working in Console not as Service

2019-07-31 Thread Mark Thomas
On 31/07/2019 12:48, Potgieter, Carlo wrote:
> I was hoping to obtain some assistance. We have used a library to convert MS 
> Office documents (docx and pptx) to PDF.
> 
> This works perfectly in the development environment and also when running 
> Tomcat in a console window.
> 
> The moment we run Tomcat as a service this specific component gives and 
> error. Unfortunately the error is non-specific so we cannot troubleshoot the 
> origin.
> 
> My question is, what would be the difference in running Tomcat as a Service 
> as oppose to running it in Console that might cause this problem?

Tomcat runs as a different user with different access permissions,
particularly to network shares.

You probably want to set up a Tomcat specific user with the appropriate
permissions.

Mark

> 
> Any assistance would be greatly appreciated!
> 
> Carlo
> 
> Additional information:
> 
> Tomcat 8.0.36
> PDF Library used: zeonpadpdf (Utilises jacob-1.18.jar and jacob-1.18-x64.dll)
> OS  - Windows 10 and Windows Server 2012 R2
> As a standard we run Tomcat as a service.
> JVM 1.8.0_221-b11
> 
> *Disclaimer:* This email is subject to important restrictions, qualifications 
> and disclaimers ("the Disclaimer") that must be accessed and read by visiting 
> our website and viewing the webpage at the following address: 
> http://www.deloitte.com/za/disclaimer. The Disclaimer forms part of the 
> content of this email. If you cannot access the Disclaimer, please obtain a 
> copy thereof from us by sending an email to zaitserviced...@deloitte.co.za. 
> Deloitte refers to a Deloitte member firm, one of its related entities, or 
> Deloitte Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a 
> separate legal entity and a member of DTTL. DTTL does not provide services to 
> clients. Please see www.deloitte.com/about to learn more.
> 
> -
> 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: Resource leak for WebSockets closed with NOT_CONSISTENT reason

2019-07-31 Thread Mark Thomas
On 31/07/2019 04:37, Kirill Ilyukhin wrote:
> Hello Mark,
> 
> Please let me disagree with you. I have connected JVisualVM to Tomcat JVM,
> run the test with 10,000 connections, performed several explicit GCs and
> made a heap dump. All 10,000 WsSessions are in heap. They are referenced as
> following:

Sorry, I can't repeat this. I am using:

- the sample server code provided previously
- the client code provided previously
- the server.xml provided below
- Tomcat 8.5.44-dev (there are no relevant changes since 8.5.43)
- openjdk 1.8.0_212-b04
- linux

I have also tried to re-create the issue on OSX without success.

I have also tried to re-create the issue with 8.5.43 without success.

> this
>  <- wsSession - class:
> org.apache.tomcat.websocket.server.WsHttpUpgradeHandler
>   <- internalHttpUpgradeHandler - class:
> org.apache.coyote.http11.upgrade.UpgradeProcessorInternal
><- val - class: java.util.concurrent.ConcurrentHashMap$Node
> <- [12930] - class: java.util.concurrent.ConcurrentHashMap$Node[]
>  <- table - class: java.util.concurrent.ConcurrentHashMap
>   <- connections - class:
> org.apache.coyote.AbstractProtocol$ConnectionHandler
><- handler - class: org.apache.tomcat.util.net.NioEndpoint
> <- this$0 (Java frame) - class:
> org.apache.tomcat.util.net.NioEndpoint$Acceptor

That suggests connections aren't being closed properly. Various bugs
have been fixed in this area but all those fixes are present in 8.5.43.

> Do you think it might be Tomcat configuration dependent? Please see my
> server.xml below.

I think there is something about your environment that is triggering
this. Have you tried re-creating this with a completely clean (OS, Java,
Tomcat) install?

Mark

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



Component working in Console not as Service

2019-07-31 Thread Potgieter, Carlo
I was hoping to obtain some assistance. We have used a library to convert MS 
Office documents (docx and pptx) to PDF.

This works perfectly in the development environment and also when running 
Tomcat in a console window.

The moment we run Tomcat as a service this specific component gives and error. 
Unfortunately the error is non-specific so we cannot troubleshoot the origin.

My question is, what would be the difference in running Tomcat as a Service as 
oppose to running it in Console that might cause this problem?

Any assistance would be greatly appreciated!

Carlo

Additional information:

Tomcat 8.0.36
PDF Library used: zeonpadpdf (Utilises jacob-1.18.jar and jacob-1.18-x64.dll)
OS  - Windows 10 and Windows Server 2012 R2
As a standard we run Tomcat as a service.
JVM 1.8.0_221-b11

*Disclaimer:* This email is subject to important restrictions, qualifications 
and disclaimers ("the Disclaimer") that must be accessed and read by visiting 
our website and viewing the webpage at the following address: 
http://www.deloitte.com/za/disclaimer. The Disclaimer forms part of the content 
of this email. If you cannot access the Disclaimer, please obtain a copy 
thereof from us by sending an email to zaitserviced...@deloitte.co.za. Deloitte 
refers to a Deloitte member firm, one of its related entities, or Deloitte 
Touche Tohmatsu Limited (“DTTL”). Each Deloitte member firm is a separate legal 
entity and a member of DTTL. DTTL does not provide services to clients. Please 
see www.deloitte.com/about to learn more.


Re: How to enable Native Memory Tracking(NMT) in Tomcat?

2019-07-31 Thread కృష్ణ చైతన్య
Hi Chris,

Do we have instructions for linux as well?  Can you please point me to any 
documentation on this.

Regards,
Krishna Chaitanya.

> On 30-Jul-2019, at 8:33 PM, Christopher Schultz 
>  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> Krishna,
> 
> On 7/30/19 06:29, కృష్ణ చైతన్య wrote:
>> Is there a plan to add support for Native Memory Tracking in Apache
>> Common’s jsvc?
> 
> There is no need to add support.
> 
> C:\Program Files\Apache Tomcat 9.0.22> SET
> JvmArgs=XX:NativeMemoryTracking=detail
> 
> C:\Program Files\Apache Tomcat 9.0.22> bin\service.bat install
> 
> Now your service should have memory tracking enabled.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl1AXFAACgkQHPApP6U8
> pFhyYRAAilFyV+kOskeSc7sF9ajDnfOaExHuVfxgnpXPXgjISKUPAysa783rRF7c
> LUHqGINsakWJeZq9BT7XibYlVoQXm62hEGs3OvhvckiWTU7eG0RESWJokyinarJ1
> OcQ0wUGhH89YidPPuEiJwJAYxuPpfPucm3L+vwUv0k8ZZjGv97iYycl0X3z/JRix
> eheMqabkUMl823TVekIDLR9isMkuAVvvVLi1lVXwg8tJLTvZ2v+FTrQXm2mLjmDq
> EnSo0RihlZnG9Lp+/HeMe1NypQIKu+tOtQEf/md3jp2g/H9bf8ORRcDMgqkqgkr7
> YN985IokXRh+EuuY174svfqLr9HdCQU61zwvwuWcGE6JEx5lt8xFn/F6slsjIv1a
> 0IFDiiR2c4A61F9T/wej5HeVR9mZuN0DEe5CxfLkyiFlmLJVev5y3XmdMJMm3nA6
> Zc07pXCY+wePxpbBzZzIEo6s3Da3AtDbjfz9X8trCSBNn1t6OnXqLUJjxpMHJTQc
> 1oJHtw8zUwdcN/ogCi/Plq0Sb3R+PGUUDNy+UR94bwoxb4KBpvXFOgCzMd4+3P8c
> xKCSFDF2OXPeED1mABnw3nHNMWPZdTT+GKb4wPLYSaVj/vUOVU2EYH6meyfgneeo
> oqPIHgipmjyp7UnBxFs2Ky1MtivnMLYKRYwJ4sBVWsOQma0Sbwk=
> =BbEy
> -END PGP SIGNATURE-
> 
> -
> 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