Re: Cannot receive email from tomcat.apache.org

2019-04-23 Thread Richard Huntrods
I have confirmed with my email provider that tomcat.apache.org does 
indeed have nucleus.com on a blacklist. I can provide proof if needed, 
but I do need to get nucleus.com REMOVED from this blacklist.


Thank you.

-Richard

On 4/23/2019 9:14 AM, Richard Huntrods wrote:
I'm still not receiving any email from either 
'users@tomcat.apache.org' or 'users-dig...@tomcat.apache.org' - not 
since the tomcat listserv server crash in early April.


I asked my mail server provider to check their logs, and this is the 
reply I received yesterday:



Hello Richard,

I received a response from our email admin team this morning 
regarding your inquiry:

There were no emails sent from users@tomcat.apache.org or
users-dig...@tomcat.apache.org to our system between April 15 and 
April 18th.
There was an email sent from huntr...@nucleus.com to 
users@tomcat.apache.org on

Apr 17 14:28:59 EST.

You may want to inquire with the people distributing this digest if 
they can send you a test message to determine what might be causing 
the non-delivery issue, as we are not even seeing it coming into our 
server at this time. 


This seems odd as I know I saw messages on the archive from that time 
- so I should have received at least the digest.


Since my provider is of little help, I have two questions for the 
tomcat.apache.org mailing list admins:


1. Is the digest still being emailed on a regular basis? I never was 
subscribed to 'users', only to 'users-digest'.


2. Could you check and see whether or not tomcat.apache.org has 
"blacklisted" the server 'nucleus.com'? This happened to me once 
before - a site blacklisted nucleus "because it looked suspicious". 
Nucleus.com is a Calgary Alberta Canada internet provider that has 
been in business since before 2000 (I've been a customer since early 
2001) and is most certainly not 'suspicious'. They host many of the 
larger Calgary business accounts as well as consumer accounts. Their 
email servers are robust and secure.


But - it could be the listserv my not recognize nucleus.com and 
therefore won't email to it.


3. Is there any way to reply directly to me at this email address from 
a 'tomcat.apache.org' mail address so we could test this?


Thanks,

-Richard



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


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



Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
Based on what you wrote regarding WebSocket annotations not following Java
inheritance, I imagine the below wouldn't work either.


public class MyServerEndpointConfig extends ServerEndpointConfig {

@Override
public Class getEndpointClass() {
return MyServiceInterface.class;
}
}




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



Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
> The custom Configurator looks fine. The problem is with trying to do
> this with a POJO endpoint. There is an underlying assumption that - for
> a POJO endpoint - the endpoints will will instances of the POJO class.
> This doesn't seem to hold in your case so hence it breaks.
>
> The WebSocket spec explicitly states that WebSocket annotations do not
> follow Java inheritance so moving the annotation to the interface is not
> an option.
>
> I think you are going to have to build your ServerEndpointConfig
> programmatically so you can specify the correct endpoint class.
>
> Mark

Thank you very much Mark for explaining.  After examining the Tapestry-IoC
a little closer, I discovered that what is being returned from the
Registry is in fact a 'service proxy object'.  It implements the same
service interface as my implementation class, but it is NOT an instance of
my implementation class.

I was thinking to shift my WebSocket annotations from the service
implementation to the service interface, but you write that this won't
work either.

So I searched the net and found a number of examples of using build() to
define an endpoint configuration.  Do you happen to have an example where
the objective was the same - or very similar to - my own?  I guess the
goal is in having Tomcat accept a service proxy object that merely
implements a given service interface, yes?

Quoting from the Tapestry-IoC documentation:

"Services consist of two main parts: a service interface and a service
implementation. The service interface is how the service will be
represented throughout the rest of the registry. Since what gets passed
around is normally a proxy, you can't expect to cast a service object down
to the implementation class (you'll see a ClassCastException instead). In
other words, you should be careful to ensure that your service interface
is complete, since Tapestry IoC effectively walls you off from back doors
such as casts."

Regards,

Chris.


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



Re: no temp directory creation wanted when embedding Tomcat

2019-04-23 Thread Garret Wilson

On 4/23/2019 5:46 PM, Garret Wilson wrote:
3. Since the temporary working directory is on a per-context basis, 
and I've only set the "basedir" for the entire `Tomcat` instance, 
Tomcat must be determining a default temporary directory for the 
context. Surely I'm allowed to explicitly specify a temporary 
directory on a per-context basis, but I sure can't find it. The 
`StandardContext` seems to equate the "temporary directory" with the 
"work directory". Are they really the same? If so, I suppose I can 
just call `((StandardContext)context).setWorkDir(String)`?



I decided to just change the `Tomcat` base directory to some location. 
This will let Tomcat create its own per-context temp subdirectory under 
this, and it lowers the risk that I'll wind up with still other unwanted 
temporary directories in my project, which is under source control.


It turns out there's another trick here as well. You have to call 
`tomcat.setBaseDir()` /before/ you call the magic 
`tomcat.getConnector()` (the latter of which secretly creates the 
default connector). Otherwise, if the connector is created first, Tomcat 
decides on its own base directory using the current working directory 
and something in the form `tomcat:8080` (which is apparently why I got 
that particular directory subtree in the first place).


Garret



Re: no temp directory creation wanted when embedding Tomcat

2019-04-23 Thread Garret Wilson

On 4/22/2019 7:58 AM, Mark Thomas wrote:

On 21/04/2019 15:53, Garret Wilson wrote:

…
But now I realize Tomcat is creating this directory structur inside the
"base dir" I specified:

tomcat.8080/work/Tomcat/localhost/ROOT

I don't need this directory. I don't want this directory created. How do
I tell Tomcat not to create no danged directories?

The Servlet specification requires (see section 4.8.1 of the Servlet 4.0
spec) that Tomcat provides a private temporary directory for each
servlet context (web application).



I have have several reactions.

1. The first is, OK, so the servlet spec requires that the servlet 
container expose a temporary directory. Tomcat can't provide a temporary 
directory to the consumer unless it has a temporary directory, so it's 
reasonable that it creates one.


2. But so far nothing has been stored in this directory, so it's 
completely unused. I see also in the `Tomcat` class the comment, "lazy 
init for the temp dir - only when a JSP is compiled or get temp dir is 
called we need to create it. This will avoid the need for the baseDir". 
It sounds like you're lazily creating the JSP temporary directory, so 
why can't we do the same for the context temporary directory, which may 
never be used (and frankly probably won't be used in many applications)? 
But OK, that's a quibble; my other thoughts are more pressing.


3. Since the temporary working directory is on a per-context basis, and 
I've only set the "basedir" for the entire `Tomcat` instance, Tomcat 
must be determining a default temporary directory for the context. 
Surely I'm allowed to explicitly specify a temporary directory on a 
per-context basis, but I sure can't find it. The `StandardContext` seems 
to equate the "temporary directory" with the "work directory". Are they 
really the same? If so, I suppose I can just call 
`((StandardContext)context).setWorkDir(String)`?




The best you can do is specify an absolute path that already exists for
the Context's work directory. It doesn't need to be writeable. If you
are using it for multiple web applications you probably don't want it to
be writeable.



Ah, OK—I had read that response earlier, but didn't understand exactly 
what it meant until I investigated and wrote #2 above. So I guess I was 
right: I need to call`((StandardContext)context).setWorkDir(String)`.


4. But all this "temporary directory requirement" business is for 
servlet containers. I started out just wanted to embed Tomcat to serve 
static files; I don't (yet? ever?) need a servlet container for this 
particular application. So how can I use Tomcat to serve static files 
without bringing in the requirements of a servlet container?


Maybe the answer is that Tomcat serves files by using a 
static-file-serving servlet, which in turn requires me to use Tomcat as 
a servlet container even for serving static files, which in turn 
requires me to have a temporary directory I don't want or need.


I suppose that's just the way it is. This is not so much a complaint as 
a desire to confirm I understand correctly how things stands. (OK, it's 
a teeny-tiny complaint, too.)


Garret


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



RE: Cant configure Tomcat isapi redirect in IIS

2019-04-23 Thread Shpilsky Rita (UniCredit Services)
This message has been marked as UC group - PUBLIC

Yes I used the official guide and triple checked everything like 10 times. I am 
uninstalling it now and trying to do it from scratch at this point

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org]
Sent: Tuesday, April 23, 2019 4:36 PM
To: users@tomcat.apache.org
Subject: Re: Cant configure Tomcat isapi redirect in IIS

On 23/04/2019 20:32, Shpilsky Rita (UniCredit Services) wrote:
> This message has been marked asUC group - PUBLIC
>
>  
>
> Hi,
>
> I have tomcat 9.0.16 installed on windows 2012 server, 64 bit version
>
> I went through all the steps including getting the isapi_redirect.dll
> in
> 64 bit version, but when I try to open one of the applications
> residing in webapps folder of tomcat I get a pop up asking if I want
> to open it instead of executing the. Also I check isapi_redirect log
> file , it doesn't look that its even getting through isapi.
>
> I have tried 100 suggestions from different forums but nothing helped.
> Please let me know what would be a solution

Have you followed the official configuration steps here:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
?

I know they are correct as I tested them against every supported version of 
Windows from 7 through to Server 2016.

If you have and it still isn't working, it is a case of going through each  
part step by step and double checking until you find the bit you missed. I've 
been there several times and I always (eventually) find the step I missed / got 
wrong.

Note: The troubleshooting section is out of date.

Mark

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


This e-mail is confidential and may also contain privileged information. If you 
are not the intended recipient you are not authorised to read, print, save, 
process or disclose this message. If you have received this message by mistake, 
please inform the sender immediately and delete this e-mail, its attachments 
and any copies.
Any use, distribution, reproduction or disclosure by any person other than the 
intended recipient is strictly prohibited and the person responsible may incur 
penalties.
Thank you!

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



Re: Cant configure Tomcat isapi redirect in IIS

2019-04-23 Thread Mark Thomas
On 23/04/2019 20:32, Shpilsky Rita (UniCredit Services) wrote:
> This message has been marked asUC group - PUBLIC
> 
>  
> 
> Hi,
> 
> I have tomcat 9.0.16 installed on windows 2012 server, 64 bit version
> 
> I went through all the steps including getting the isapi_redirect.dll in
> 64 bit version, but when I try to open one of the applications residing
> in webapps folder of tomcat I get a pop up asking if I want to open it
> instead of executing the. Also I check isapi_redirect log file , it
> doesn’t look that its even getting through isapi.
> 
> I have tried 100 suggestions from different forums but nothing helped.
> Please let me know what would be a solution

Have you followed the official configuration steps here:
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
?

I know they are correct as I tested them against every supported version
of Windows from 7 through to Server 2016.

If you have and it still isn't working, it is a case of going through
each  part step by step and double checking until you find the bit you
missed. I've been there several times and I always (eventually) find the
step I missed / got wrong.

Note: The troubleshooting section is out of date.

Mark

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



Re: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Zero

On 4/23/19 10:28 PM, Pablo Salazar wrote:

Hi  Zero,


Not Yet.

DO you recomend it??

REgards,

Pablo Salazar



No I don't know, I am curious about that.


Regards, Harm-Jan Z.




-Original Message-
From: Zero [mailto:hz0...@gmail.com]
Sent: martes, 23 de abril de 2019 03:26 p.m.
To: users@tomcat.apache.org
Subject: Re: It's possible run PHP on Tomcat 8 without use Quercus?

On 4/23/19 9:55 PM, Pablo Salazar wrote:

Thanks Chris,

Do you know if exist some GUIDE to configure Tomcat 8 for run php files???

Regards,

Pablo Salazar


Out of curiosity, did you try PHP-JavaBridge ?


Regards, Harm-Jan Z.



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: martes, 23 de abril de 2019 09:15 a.m.
On 4/23/19 08:44, Pablo Salazar wrote:

Hi,

I am lookling for a solution to my problema.

I have Tomcat 8 installet with Quercus for run PHP, but recently I
need load Imagick module for a new funcionality on my page, but on
the GUIDES of Imagick, it's needed to use php.ini of PHP
intsdallation, but Quercus don't have that file.

I have insalled PHP on some folder (D: \PCSA\php) so into that folder
I have php.ini file, I configure the necesary lines fot Imagick so,
when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but
when I run http://hostname:9095/phpinfo.php (that file it's for
phpinfo() function) the response it's for configuration of Quercus, I
mean, load PHP of Quercus, not d:\PCSA\php.

First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in 2014. I'm 
not sure you want to trust something that old.


Second Question: How can I configure Quercus for load Imagick module?

I think you'll want to ask that question in a Quercus forum instead of in a 
Tomcat forum.

- -chris



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



RE: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Pablo Salazar
Hi  Zero,


Not Yet.

DO you recomend it??

REgards,

Pablo Salazar

-Original Message-
From: Zero [mailto:hz0...@gmail.com] 
Sent: martes, 23 de abril de 2019 03:26 p.m.
To: users@tomcat.apache.org
Subject: Re: It's possible run PHP on Tomcat 8 without use Quercus?

On 4/23/19 9:55 PM, Pablo Salazar wrote:
> Thanks Chris,
>
> Do you know if exist some GUIDE to configure Tomcat 8 for run php files???
>
> Regards,
>
> Pablo Salazar


Out of curiosity, did you try PHP-JavaBridge ?


Regards, Harm-Jan Z.


> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: martes, 23 de abril de 2019 09:15 a.m.
> On 4/23/19 08:44, Pablo Salazar wrote:
>> Hi,
>>
>> I am lookling for a solution to my problema.
>>
>> I have Tomcat 8 installet with Quercus for run PHP, but recently I 
>> need load Imagick module for a new funcionality on my page, but on 
>> the GUIDES of Imagick, it's needed to use php.ini of PHP 
>> intsdallation, but Quercus don't have that file.
>>
>> I have insalled PHP on some folder (D: \PCSA\php) so into that folder 
>> I have php.ini file, I configure the necesary lines fot Imagick so, 
>> when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but 
>> when I run http://hostname:9095/phpinfo.php (that file it's for
>> phpinfo() function) the response it's for configuration of Quercus, I 
>> mean, load PHP of Quercus, not d:\PCSA\php.
>>
>> First question: How can I run PHP on Tomcat  8 without Quercus?
> I'm certain the answer is "yes", but it might be easiest to use Quercus.
>
> I'd never heard of Quercus before, but it's last release was back in 2014. 
> I'm not sure you want to trust something that old.
>
>> Second Question: How can I configure Quercus for load Imagick module?
> I think you'll want to ask that question in a Quercus forum instead of in a 
> Tomcat forum.
>
> - -chris


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



Re: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Zero

On 4/23/19 9:55 PM, Pablo Salazar wrote:

Thanks Chris,

Do you know if exist some GUIDE to configure Tomcat 8 for run php files???

Regards,

Pablo Salazar



Out of curiosity, did you try PHP-JavaBridge ?


Regards, Harm-Jan Z.



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: martes, 23 de abril de 2019 09:15 a.m.
On 4/23/19 08:44, Pablo Salazar wrote:

Hi,

I am lookling for a solution to my problema.

I have Tomcat 8 installet with Quercus for run PHP, but recently I
need load Imagick module for a new funcionality on my page, but on the
GUIDES of Imagick, it's needed to use php.ini of PHP intsdallation,
but Quercus don't have that file.

I have insalled PHP on some folder (D: \PCSA\php) so into that folder
I have php.ini file, I configure the necesary lines fot Imagick so,
when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but
when I run http://hostname:9095/phpinfo.php (that file it's for
phpinfo() function) the response it's for configuration of Quercus, I
mean, load PHP of Quercus, not d:\PCSA\php.

First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in 2014. I'm 
not sure you want to trust something that old.


Second Question: How can I configure Quercus for load Imagick module?

I think you'll want to ask that question in a Quercus forum instead of in a 
Tomcat forum.

- -chris



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



RE: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Pablo Salazar
Thanks Chris,

Do you know if exist some GUIDE to configure Tomcat 8 for run php files???

Regards,

Pablo Salazar

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: martes, 23 de abril de 2019 09:15 a.m.

To: users@tomcat.apache.org
Subject: Re: It's possible run PHP on Tomcat 8 without use Quercus?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Pablo,

On 4/23/19 08:44, Pablo Salazar wrote:
> Hi,
> 
> I am lookling for a solution to my problema.
> 
> I have Tomcat 8 installet with Quercus for run PHP, but recently I 
> need load Imagick module for a new funcionality on my page, but on the 
> GUIDES of Imagick, it's needed to use php.ini of PHP intsdallation, 
> but Quercus don't have that file.
> 
> I have insalled PHP on some folder (D: \PCSA\php) so into that folder 
> I have php.ini file, I configure the necesary lines fot Imagick so, 
> when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but 
> when I run http://hostname:9095/phpinfo.php (that file it's for 
> phpinfo() function) the response it's for configuration of Quercus, I 
> mean, load PHP of Quercus, not d:\PCSA\php.
> 
> First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in 2014. I'm 
not sure you want to trust something that old.

> Second Question: How can I configure Quercus for load Imagick module?

I think you'll want to ask that question in a Quercus forum instead of in a 
Tomcat forum.

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

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAly/HdsACgkQHPApP6U8
pFg0mw//RSaDgwlFZG03pqcB2DpzdB86GR5mGBk7C3M3E+Lo3EBF8EooNI6eyeXg
p0rOnznl9qBJauu3OXduDRpQHWyJOT2nfgAHidQbhVy6SygVSTF1kSQdRNexXKf+
SLzbRrzB6RNXBCOjLQnCa4wYU8oTM4VqtCv5xCnMbgXXak9TWWkOTicFR92DdDTz
jvpnwd4CqL3YNbAT9kFXfeNqzDPIWccrbVo7keabX7uTvfuwGI1B5t6+Dirjeljk
RTyJ9j55QIZqkJm6YgraseOUlsQ6TwaZ8SPIo6UI31bR/LXotRL4aOQ+VIm3S0kF
zeKc33pTb1UqqPk7h7SMix5tN65pd3ydYkjPMxHII3CI2pDmWn2JWvYqmb8xV6Jm
SrYVCy+TdTEtTMLDO/2I4997BKBl5MYTbRJ+ECeMTW3zCUczJetLsvhsUiahHaMi
WdcUUkIemvR/Hol9G+Xon+Z+jvKEPq6LOFfPgHqqM6MxFd5z5/cK8kY4bsnQuZai
vV1fqw6n3t+F7SmCdvD7cTnHVoF7z64PRCfxOTNf2VLQpnknUbjw0alwaNk7tIkQ
yXp6cCUJTBzrn0Nm3GRNKMrMyUT/B0v4WEY8utqGyB1nKfe0ExyRvCSAW3BoUnkc
4BfPiN4tLxsQq3DdZVr+chCmpwKO/3YjybsDXoOSYKa+QW3tXN4=
=1sPf
-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



RE: Cant configure Tomcat isapi redirect in IIS

2019-04-23 Thread Shpilsky Rita (UniCredit Services)


This message has been marked as UC group - PUBLIC

Hi,
I have tomcat 9.0.16 installed on windows 2012 server, 64 bit version
I went through all the steps including getting the isapi_redirect.dll in 64 bit 
version, but when I try to open one of the applications residing in webapps 
folder of tomcat I get a pop up asking if I want to open it instead of 
executing the. Also I check isapi_redirect log file , it doesn't look that its 
even getting through isapi.
I have tried 100 suggestions from different forums but nothing helped. Please 
let me know what would be a solution



Rita Shpilsky
Associate

US96908 ICT New York

UniCredit Business Integrated Solutions S.C.p.A.
New York Branch
150 East 42nd Street
New York , NY 10017  
USA
Phone: 212-672-5903 - Fax: 212-672-5509
mailto:rita.shpil...@unicredit.eu 
www.unicreditmib.eu
UniCredit. Proud Partner of the UEFA Champions League. And you.



This e-mail is confidential and may also contain privileged information. If you 
are not the intended recipient you are not authorised to read, print, save, 
process or disclose this message. If you have received this message by mistake, 
please inform the sender immediately and delete this e-mail, its attachments 
and any copies.
Any use, distribution, reproduction or disclosure by any person other than the 
intended recipient is strictly prohibited and the person responsible may incur 
penalties.
Thank you!


Re: Cannot receive email from tomcat.apache.org

2019-04-23 Thread Richard Huntrods
I'm still not receiving any email from either 'users@tomcat.apache.org' 
or 'users-dig...@tomcat.apache.org' - not since the tomcat listserv 
server crash in early April.


I asked my mail server provider to check their logs, and this is the 
reply I received yesterday:



Hello Richard,

I received a response from our email admin team this morning regarding 
your inquiry:

There were no emails sent from users@tomcat.apache.org or
users-dig...@tomcat.apache.org to our system between April 15 and 
April 18th.
There was an email sent from huntr...@nucleus.com to 
users@tomcat.apache.org on

Apr 17 14:28:59 EST.

You may want to inquire with the people distributing this digest if 
they can send you a test message to determine what might be causing 
the non-delivery issue, as we are not even seeing it coming into our 
server at this time. 


This seems odd as I know I saw messages on the archive from that time - 
so I should have received at least the digest.


Since my provider is of little help, I have two questions for the 
tomcat.apache.org mailing list admins:


1. Is the digest still being emailed on a regular basis? I never was 
subscribed to 'users', only to 'users-digest'.


2. Could you check and see whether or not tomcat.apache.org has 
"blacklisted" the server 'nucleus.com'? This happened to me once before 
- a site blacklisted nucleus "because it looked suspicious". Nucleus.com 
is a Calgary Alberta Canada internet provider that has been in business 
since before 2000 (I've been a customer since early 2001) and is most 
certainly not 'suspicious'. They host many of the larger Calgary 
business accounts as well as consumer accounts. Their email servers are 
robust and secure.


But - it could be the listserv my not recognize nucleus.com and 
therefore won't email to it.


3. Is there any way to reply directly to me at this email address from a 
'tomcat.apache.org' mail address so we could test this?


Thanks,

-Richard


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


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



Re: OutOfMemory on large file download with AJP and cachingAllowed=false

2019-04-23 Thread Olivier Jaquemet

On 23/04/2019 16:12, Christopher Schultz wrote:

Olivier,

Hi Christopher,
Thanks for you answer.

On 4/23/19 05:58, Olivier Jaquemet wrote:

Hi all,

We were able to reproduce a OutOfMemory error when using AJP and
the Resources cachingAllowed=false directive. It looks like a bug
of AJP connector(s), as it does not occurs with other HTTP
connectors.

Could you confirm the behavior described below is indeed bug ? (if
you do, I'll create the issue on bugzilla)

To reproduce :

* Use latest tomcat 8.5 version (tested with Tomcat 8.5.40) * Add
an AJP connector to server.xml 

nb: no compression

nb: NIO connector is in use ; no APR (see stack trace for thread name)


* Add the following directive to context.xml : 

Okay. Why context.xml, by the way?
I don't even know (yet...) why this setting was added in the first place 
in the environment where it was present... !

so why this file... I don't know either :)

* Create a large file in the samples webapp, for example : cd
webapps/examples dd if=/dev/zero of=large.txt bs=1k count=200

~2GiB static file


* Start Tomcat with a 1024 mb heap size (JAVA_OPTS="-Xms1024m
-Xmx1024m" * Configure Apache HTTPD to use mod_proxy_ajp, or mod_jk
(both will have the same issue) [1] * Start Apache HTTPD * Download
file through default HTTP connector
http://localhost:8080/examples/large.txt --> OK * Download file
through Apache/AJP http://localhost/examples/large.txt --> BUG :
OutOfMemory error occurs Exception in thread
"ajp-nio-8009-exec-10" java.lang.OutOfMemoryError: Java heap space
at

org.apache.catalina.webresources.FileResource.getContent(FileResource.

java:207)

  at

org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServl

et.java:992)

  at

org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:

438)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)

...

That's ... interesting. What if you request the file more than once
via the default connector? I would have expected these code paths to
be relatively the same.
There are no problems at all if I request the file many times in // 
using the default HTTP connector.

Can you generate a heap dump when the OOME occurs? Use the following
JVM startup options:

- -XX:+HeapDumpOnOutOfMemoryError
- -XX:HeapDumpPath=/path/to/heap-dump-file

Sure. Here are heap dumps and log file from two different run :
https://www.dropbox.com/sh/q6iqpe42fxvsvin/AAARR4uOnn-qJ4PCg8e_Ll8La?dl=0

If you generate a heap dump, are you able to navigate it? I've heard
that Eclipse MAT is good. I've mostly used YourKit and it's quite
good, able to pick-out the "big things" and help locate what kind of
object(s) is/are taking up all the space.


I've used MAT some times before, and indeed it's a really nice tool !
However, if you are familiar with YourKit, you might find the culprit 
faster than me...

Can you have a look a the heap dump I shared above ?

I did have a look at it with MAT... however I could not find any 
definitive conclusion ...
There is a BufferedWriter of an AccessLogValve which reference a large 
char array with \0 (like the content of the large generated file...).
There are many (leaking?) 
java.util.zip.ZipFile$ZipFileInflaterInputStream (however you said there 
were no compression, though here they are)

...


Reading the code for FileResource.getContent, it's clear that the
entire file is being loaded into memory, which obviously isn't going
to work, here. I'm wondering why that's happening since streaming is
the correct behavior when caching=false. Also strange is that
DefaultServlet will attempt to call FileResource.getContent() -- which
returns a byte[] -- and, if that returns null, it will call
FileResource.getInputStream which ... calls this.getContent. So this
looks like a special-case for FileResource just trying to implement
that interface in the simplest way possible.

FileResource seems to implement in-memory caching whether it's enabled
or not.

I can't understand why this doesn't fail for the other kind of
connector. Everything else is the same? You have two separate
connectors in one instance, or are you changing the connector between
tests?


Everything is exactly the same as I have only one instance with two 
separate connectors (AJP+HTTP).


One last (confusing) information in form of an exception, that I could 
*not* reproduce our test environments, but that I saw on the server 
where the symptom first occurred.
I don't think this is related to the OOM, but it might be another 
symptom of the same resource configuration.


java.lang.ArrayIndexOutOfBoundsException: Unable to return 
[/path/to/file/being/downloaded.ext] as a byte array since the resource 
is [2,637,615,704] bytes in size which is larger than the maximum size 
of a byte array
    at 
org.apache.catalina.webresources.FileResource.getContent(FileResource.java:196)
    at 
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1000)
    at 

Re: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Pablo,

On 4/23/19 08:44, Pablo Salazar wrote:
> Hi,
> 
> I am lookling for a solution to my problema.
> 
> I have Tomcat 8 installet with Quercus for run PHP, but recently I
> need load Imagick module for a new funcionality on my page, but on
> the GUIDES of Imagick, it’s needed to use php.ini of PHP
> intsdallation, but Quercus don’t have that file.
> 
> I have insalled PHP on some folder (D: \PCSA\php) so into that
> folder I have php.ini file, I configure the necesary lines fot
> Imagick so, when I run pgp -i | findstr -i “imagick” the moduel t’s
> loaded, but when I run http://hostname:9095/phpinfo.php (that file
> it’s for phpinfo() function) the response it’s for configuration of
> Quercus, I mean, load PHP of Quercus, not d:\PCSA\php.
> 
> First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in
2014. I'm not sure you want to trust something that old.

> Second Question: How can I configure Quercus for load Imagick
> module?

I think you'll want to ask that question in a Quercus forum instead of
in a Tomcat forum.

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

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAly/HdsACgkQHPApP6U8
pFg0mw//RSaDgwlFZG03pqcB2DpzdB86GR5mGBk7C3M3E+Lo3EBF8EooNI6eyeXg
p0rOnznl9qBJauu3OXduDRpQHWyJOT2nfgAHidQbhVy6SygVSTF1kSQdRNexXKf+
SLzbRrzB6RNXBCOjLQnCa4wYU8oTM4VqtCv5xCnMbgXXak9TWWkOTicFR92DdDTz
jvpnwd4CqL3YNbAT9kFXfeNqzDPIWccrbVo7keabX7uTvfuwGI1B5t6+Dirjeljk
RTyJ9j55QIZqkJm6YgraseOUlsQ6TwaZ8SPIo6UI31bR/LXotRL4aOQ+VIm3S0kF
zeKc33pTb1UqqPk7h7SMix5tN65pd3ydYkjPMxHII3CI2pDmWn2JWvYqmb8xV6Jm
SrYVCy+TdTEtTMLDO/2I4997BKBl5MYTbRJ+ECeMTW3zCUczJetLsvhsUiahHaMi
WdcUUkIemvR/Hol9G+Xon+Z+jvKEPq6LOFfPgHqqM6MxFd5z5/cK8kY4bsnQuZai
vV1fqw6n3t+F7SmCdvD7cTnHVoF7z64PRCfxOTNf2VLQpnknUbjw0alwaNk7tIkQ
yXp6cCUJTBzrn0Nm3GRNKMrMyUT/B0v4WEY8utqGyB1nKfe0ExyRvCSAW3BoUnkc
4BfPiN4tLxsQq3DdZVr+chCmpwKO/3YjybsDXoOSYKa+QW3tXN4=
=1sPf
-END PGP SIGNATURE-

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



Re: OutOfMemory on large file download with AJP and cachingAllowed=false

2019-04-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Olivier,

On 4/23/19 05:58, Olivier Jaquemet wrote:
> Hi all,
> 
> We were able to reproduce a OutOfMemory error when using AJP and
> the Resources cachingAllowed=false directive. It looks like a bug
> of AJP connector(s), as it does not occurs with other HTTP
> connectors.
> 
> Could you confirm the behavior described below is indeed bug ? (if
> you do, I'll create the issue on bugzilla)
> 
> To reproduce :
> 
> * Use latest tomcat 8.5 version (tested with Tomcat 8.5.40) * Add
> an AJP connector to server.xml  protocol="AJP/1.3" redirectPort="8443" />

nb: no compression

nb: NIO connector is in use ; no APR (see stack trace for thread name)

> * Add the following directive to context.xml :  cachingAllowed="false" />

Okay. Why context.xml, by the way?

> * Create a large file in the samples webapp, for example : cd
> webapps/examples dd if=/dev/zero of=large.txt bs=1k count=200

~2GiB static file

> * Start Tomcat with a 1024 mb heap size (JAVA_OPTS="-Xms1024m
> -Xmx1024m" * Configure Apache HTTPD to use mod_proxy_ajp, or mod_jk
> (both will have the same issue) [1] * Start Apache HTTPD * Download
> file through default HTTP connector 
> http://localhost:8080/examples/large.txt --> OK * Download file
> through Apache/AJP http://localhost/examples/large.txt --> BUG :
> OutOfMemory error occurs Exception in thread
> "ajp-nio-8009-exec-10" java.lang.OutOfMemoryError: Java heap space 
> at
> 
> org.apache.catalina.webresources.FileResource.getContent(FileResource.
java:207)
>
>  at
> 
> org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServl
et.java:992)
>
>  at
> 
> org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:
438)
>
> 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
> ...

That's ... interesting. What if you request the file more than once
via the default connector? I would have expected these code paths to
be relatively the same.

Can you generate a heap dump when the OOME occurs? Use the following
JVM startup options:

- -XX:+HeapDumpOnOutOfMemoryError
- -XX:HeapDumpPath=/path/to/heap-dump-file

If you generate a heap dump, are you able to navigate it? I've heard
that Eclipse MAT is good. I've mostly used YourKit and it's quite
good, able to pick-out the "big things" and help locate what kind of
object(s) is/are taking up all the space.

Reading the code for FileResource.getContent, it's clear that the
entire file is being loaded into memory, which obviously isn't going
to work, here. I'm wondering why that's happening since streaming is
the correct behavior when caching=false. Also strange is that
DefaultServlet will attempt to call FileResource.getContent() -- which
returns a byte[] -- and, if that returns null, it will call
FileResource.getInputStream which ... calls this.getContent. So this
looks like a special-case for FileResource just trying to implement
that interface in the simplest way possible.

FileResource seems to implement in-memory caching whether it's enabled
or not.

I can't understand why this doesn't fail for the other kind of
connector. Everything else is the same? You have two separate
connectors in one instance, or are you changing the connector between
tests?

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

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAly/HVsACgkQHPApP6U8
pFgkLg//SGrPQ86VAyamI2nK0Ai67C1Y33+pBqEqlPP4UzPUu8cjnQd8cigvGqrv
HvgJJJrsDEA5XRpS7I2Xw/rUMHHyXjalarCHr0dHQdYbL108HLDlXSzhOBD/viA+
PZIeMjWAlcpZfRk1Eg9pZtlAbzANi8X6EdbKutpkMo+6clUmAaAMLI4C3e/OInKA
IqfUqqEseeS6Bdi51GZoNfm8yspWz5hEcBSoWI5H5kTQCbLZ4Wpf4D2RXFI5Cj1s
rVaGG9ne47QQKa1dS5iQGBVFE8MwLWPIW7rkyIrRbVaNWd54mX18cL/hMmQuiOfd
9D3KrUm6j8TeP48OcD5LFW5uz8k92cOZ114cVlql5ndifBp1XdC2TXddGjiC4Uf8
8DhG94wGIiv6U51v1XEtF9u7/b4d8UMsEsqpzZ/EcN85Bs5ZHrzGzDrhgq/SrsC3
tutVODV78FWM5daxvilFhzXAtbaF+wqFzakGIeHQ8QefQFR9rEPvMKxrrMKJgvM2
2DLNNvKUmBZICYDEahzHTbcdaELVRwbQwO5cElk1rcBp66EhG4DY0wgvimeQbnjA
iPjMG2VCSIXsVghV0qgLTPk8B8S00i/e18TYl46ciJpTvLE5tleDS/kRb75oj3Hm
aWOZ+qAAYpAiP1vsUFyHQfWYBIqfK7h7fRjruWDfBAtabbPRRyg=
=VhGf
-END PGP SIGNATURE-

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



It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Pablo Salazar
Hi,

I am lookling for a solution to my problema.

I have Tomcat 8 installet with Quercus for run PHP, but recently I need load 
Imagick module for a new funcionality on my page, but on the GUIDES of Imagick, 
it’s needed to use php.ini of PHP intsdallation, but Quercus don’t have that 
file.

I have insalled PHP on some folder (D: \PCSA\php) so into that folder I have 
php.ini file, I configure the necesary lines fot Imagick so, when I run pgp -i 
| findstr -i “imagick” the moduel t’s loaded, but when I run 
http://hostname:9095/phpinfo.php (that file it’s for phpinfo() function) the 
response it’s for configuration of Quercus, I mean, load PHP of Quercus, not 
d:\PCSA\php.

First question: How can I run PHP on Tomcat  8 without Quercus?

Second Question: How can I configure Quercus for load Imagick module?

REgards,

Pablo Salazar




OutOfMemory on large file download with AJP and cachingAllowed=false

2019-04-23 Thread Olivier Jaquemet

Hi all,

We were able to reproduce a OutOfMemory error when using AJP and the 
Resources cachingAllowed=false directive.
It looks like a bug of AJP connector(s), as it does not occurs with 
other HTTP connectors.


Could you confirm the behavior described below is indeed bug ? (if you 
do, I'll create the issue on bugzilla)


To reproduce :

 * Use latest tomcat 8.5 version (tested with Tomcat 8.5.40)
 * Add an AJP connector to server.xml
   
 * Add the following directive to context.xml :
   
 * Create a large file in the samples webapp, for example :
   cd webapps/examples
   dd if=/dev/zero of=large.txt bs=1k count=200
 * Start Tomcat with a 1024 mb heap size (JAVA_OPTS="-Xms1024m -Xmx1024m"
 * Configure Apache HTTPD to use mod_proxy_ajp, or mod_jk (both will
   have the same issue) [1]
 * Start Apache HTTPD
 * Download file through default HTTP connector
   http://localhost:8080/examples/large.txt
   --> OK
 * Download file through Apache/AJP http://localhost/examples/large.txt
   --> BUG : OutOfMemory error occurs
   Exception in thread "ajp-nio-8009-exec-10"
   java.lang.OutOfMemoryError: Java heap space
    at
   
org.apache.catalina.webresources.FileResource.getContent(FileResource.java:207)
    at
   
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:992)
    at
   org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:438)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    ...

Additionnal informations :

 * The bug could be reproduced on both Linux/Windows
 * Tested with latest OpenJDK 8.

Regards,

Olivier


[1] the HTTPD configuration :

 * if using mod_proxy_ajp (sudo a2enmod proxy proxy_ajp)

   ProxyPass /  ajp://127.0.0.1:8009/

 * if using mod_jk : (sudo a2enmod jk)

   JkWorkerProperty worker.list=tomcat
   JkWorkerProperty worker.tomcat.type=ajp13
   JkWorkerProperty worker.tomcat.host=localhost
   JkWorkerProperty worker.tomcat.port=8009

   JkMount / tomcat
   JkMount /* tomcat