Re: No binary distribution for mod_jk?

2016-07-22 Thread Paul Roubekas
On 7/22/2016 8:14 PM, Paul Roubekas wrote:
> On 7/22/2016 4:24 PM, Paul Roubekas wrote:
>> On 7/22/2016 4:14 PM, Christopher Schultz wrote:
>>> Paul,
>>>
>>> On 7/21/16 5:08 PM, Paul Roubekas wrote:
>>> > On 7/21/2016 2:21 PM, Coty Sutherland wrote:
>>> >>> Actually my requirement is not that complex.  All I need to do
>>> >>> is host TomEE (a Tomcat 7 superset), Bugzilla and phpBB (forum
>>> >>> software) on the same server.  It is my understanding the I
>>> >>> need httpd to do this.
>>> >> TomEE can run outside of a web server (its it's on web
>>> >> container), but Bugzilla and phpBB seem to require a webserver to
>>> >> run, so you're correct there. If you install Bugzilla and phpBB
>>> >> in httpd, then it should be accessible via http://host/bugzilla
>>> >> (or whatever the path is). Tomcat would be accessible via
>>> >> http://host:8080/. If you wanted tomcat to be accessible via
>>> >> http://host/tomcat, then you'd have to proxy to it.
>>> > understood.
>>> >>
>>> >>> It is also my understanding that I needed mod_jk to have the
>>> >>> httpd route to TomEE (Tomcat 7).  I have TomEE running on the
>>> >>> server now.
>>> >> Unless you only have an AJP connector on TomEE (which isn't
>>> >> likely) it's probably easier/less work for you to use mod_proxy
>>> >> (or mod_proxy_ajp even if you want AJP traffic) instead of
>>> >> mod_jk. It's provided by the httpd package that's likely already
>>> >> installed. You just need to setup ProxyPass[Reverse] rules as
>>> >> documented here:
>>> >> https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass.
>>> >>
>>> >>
>>> I'd also suggest setting proxyName and proxyPort on your connector so
>>> >> that any links generated by your application don't try and bypass
>>> >> the proxy (see:
>>> >> https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attr
>>> ibutes).
>>>
>>> >>
>>> Don't know what AJP is.  Therefore I assume it is not in use.  If my
>>> > understand of AJP is correct, based on a 5 minute read on
>>> > Wikipedia, I only have one server so there is no value in AJP for
>>> > me.
>>>
>>> If you are starting from scratch, I would recommend using mod_proxy
>>> for your proxying with httpd. It comes pre-built with whatever binary
>>> httpd distribution you got, and is arguably easier to configure.
>>>
>>> You can even use either HTTP or AJP as the protocol to connect httpd
>>> -> Tomcat. I would recommend mod_proxy_http just because it's
>>> basically the simplest to configure. If you want to use TLS and get
>>> the certificate information over to Tomcat/TomEE, it's a bit easier to
>>> do with AJP, but not impossible with HTTP.
>>>
>> I have pages that require HTTPS.
>>> I was just assuming you knew you wanted mod_jk and were looking for a
>>> binary.
>>>
>>> Apologies for the confusion.
>> No problem.
>>>
>>> httpd + Tomcat/TomEE is quite easy to get set up with mod_proxy_http.
>>> Simply:
>>>
>>> 1. Configure Tomcat/TomEE as usual, with an HTTP connector listening
>>> on some port (probably 8080 is already being used if you have the
>>> default configuration).
>>>
>>> 2. Enable mod_proxy and mod_proxy_ajp in httpd. You may also want
>>> mod_proxy_balancer if you have multiple Tomcat/TomEE nodes you want to
>>> use for load-balancing.
>> Only one server.  No load balancing at this time.
>>>
>>> 3. Configure a  directive in your httpd configuration that
>>> looks something like this:
>>>
>>> ProxyPass /webappname/ http://tomcathost:8080/webappname/
>>> ProxyPassReverse /webappname/ http://tomcathost:8080/webappname/
>> I have a requirement that when a user enters /http://www.myhost.com
>> they get the TomEE website. That is why my configuration is as below.
>>
>> ProxyPass /  ...
>> ProxyPassReverse  /  ...
>>
>>>
>>> Bounce httpd and hit http://httpdhost/webappname/index.jsp and your
>>> request should go through the reverse-proxy (that's httpd) through to
>>> the Tomcat/TomEE node. The "ProxyPassReverse" will re-write certain
>>> response HTTP header fields as they are passed-back to the client, so
>>> that the client will see the "outside" view of the back-end server,
>>> instead of the "inside view" -- that is, the client will see
>>> http://httpdhost/ as the base URL instead of http://tomcathost:8080/
>>> as the base URL.
>>>
>>> Write back with any questions or problems.
>>>
>>> Welcome to the community!
>>>
>>> -chris
>> > >
>> -
>> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For
>> additional commands, e-mail: users-h...@tomcat.apache.org >
>>
>> -- 
>> The people that bring you Usque .
>>
> I tried going with ajp with the following configuration after reading
> the ajp documentation.
> Adding a Load module for ajp was not needed as per this message.
> =
> apachectl configtest
> [Fri Jul 22 19:42:00.022959

Re: No binary distribution for mod_jk?

2016-07-22 Thread Paul Roubekas
On 7/22/2016 4:24 PM, Paul Roubekas wrote:
> On 7/22/2016 4:14 PM, Christopher Schultz wrote:
>> Paul,
>>
>> On 7/21/16 5:08 PM, Paul Roubekas wrote:
>> > On 7/21/2016 2:21 PM, Coty Sutherland wrote:
>> >>> Actually my requirement is not that complex.  All I need to do
>> >>> is host TomEE (a Tomcat 7 superset), Bugzilla and phpBB (forum
>> >>> software) on the same server.  It is my understanding the I
>> >>> need httpd to do this.
>> >> TomEE can run outside of a web server (its it's on web
>> >> container), but Bugzilla and phpBB seem to require a webserver to
>> >> run, so you're correct there. If you install Bugzilla and phpBB
>> >> in httpd, then it should be accessible via http://host/bugzilla
>> >> (or whatever the path is). Tomcat would be accessible via
>> >> http://host:8080/. If you wanted tomcat to be accessible via
>> >> http://host/tomcat, then you'd have to proxy to it.
>> > understood.
>> >>
>> >>> It is also my understanding that I needed mod_jk to have the
>> >>> httpd route to TomEE (Tomcat 7).  I have TomEE running on the
>> >>> server now.
>> >> Unless you only have an AJP connector on TomEE (which isn't
>> >> likely) it's probably easier/less work for you to use mod_proxy
>> >> (or mod_proxy_ajp even if you want AJP traffic) instead of
>> >> mod_jk. It's provided by the httpd package that's likely already
>> >> installed. You just need to setup ProxyPass[Reverse] rules as
>> >> documented here:
>> >> https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass.
>> >>
>> >>
>> I'd also suggest setting proxyName and proxyPort on your connector so
>> >> that any links generated by your application don't try and bypass
>> >> the proxy (see:
>> >> https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attr
>> ibutes).
>>
>> >>
>> Don't know what AJP is.  Therefore I assume it is not in use.  If my
>> > understand of AJP is correct, based on a 5 minute read on
>> > Wikipedia, I only have one server so there is no value in AJP for
>> > me.
>>
>> If you are starting from scratch, I would recommend using mod_proxy
>> for your proxying with httpd. It comes pre-built with whatever binary
>> httpd distribution you got, and is arguably easier to configure.
>>
>> You can even use either HTTP or AJP as the protocol to connect httpd
>> -> Tomcat. I would recommend mod_proxy_http just because it's
>> basically the simplest to configure. If you want to use TLS and get
>> the certificate information over to Tomcat/TomEE, it's a bit easier to
>> do with AJP, but not impossible with HTTP.
>>
> I have pages that require HTTPS.
>> I was just assuming you knew you wanted mod_jk and were looking for a
>> binary.
>>
>> Apologies for the confusion.
> No problem.
>>
>> httpd + Tomcat/TomEE is quite easy to get set up with mod_proxy_http.
>> Simply:
>>
>> 1. Configure Tomcat/TomEE as usual, with an HTTP connector listening
>> on some port (probably 8080 is already being used if you have the
>> default configuration).
>>
>> 2. Enable mod_proxy and mod_proxy_ajp in httpd. You may also want
>> mod_proxy_balancer if you have multiple Tomcat/TomEE nodes you want to
>> use for load-balancing.
> Only one server.  No load balancing at this time.
>>
>> 3. Configure a  directive in your httpd configuration that
>> looks something like this:
>>
>> ProxyPass /webappname/ http://tomcathost:8080/webappname/
>> ProxyPassReverse /webappname/ http://tomcathost:8080/webappname/
> I have a requirement that when a user enters /http://www.myhost.com
> they get the TomEE website. That is why my configuration is as below.
>
> ProxyPass /  ...
> ProxyPassReverse  /  ...
>
>>
>> Bounce httpd and hit http://httpdhost/webappname/index.jsp and your
>> request should go through the reverse-proxy (that's httpd) through to
>> the Tomcat/TomEE node. The "ProxyPassReverse" will re-write certain
>> response HTTP header fields as they are passed-back to the client, so
>> that the client will see the "outside" view of the back-end server,
>> instead of the "inside view" -- that is, the client will see
>> http://httpdhost/ as the base URL instead of http://tomcathost:8080/
>> as the base URL.
>>
>> Write back with any questions or problems.
>>
>> Welcome to the community!
>>
>> -chris
> > >
> -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For
> additional commands, e-mail: users-h...@tomcat.apache.org >
>
> -- 
> The people that bring you Usque .
>
I tried going with ajp with the following configuration after reading
the ajp documentation.
Adding a Load module for ajp was not needed as per this message.
=
apachectl configtest
[Fri Jul 22 19:42:00.022959 2016] [so:warn] [pid 12080] AH01574: module
proxy_ajp_module is already loaded, skipping

Tomcat 8.0.33, Ubuntu 14.04.3 : shared classloader with embedded Tomcat 8

2016-07-22 Thread oren peer
I have upgraded tomcat from version 7.0.34 to version 8.0.33, and since
then I have been facing a problem to share the web application context and
Junit context.

I have a web application with singleton class that gathers statistic data
about the web application. I also have Junit that runs the web application
in embedded tomcat. the Junit queries the web application and then checks
the statistic data.

I try to make a simple example:

the singleton:

  public class Counter {

  private static Counter instance;
  private AtomicLong counter;

  private Counter(){}

  public static Counter getInstance(){
if(instance == null){
  synchronized (Counter.class) {
if(instance == null){
  instance = new Counter();
}
  }
}

return instance;
  }

  public long incrementAndGet(){
return counter.incrementAndGet();
  }

  public long getValue(){
return counter.get();
  }
}

the servlet:

@WebServlet(name="servlet",loadOnStartup=1,
urlPatterns="/servletTest")public class Servlet extends HttpServlet{

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse
resp) throws ServletException, IOException {
  resp.getWriter().write("Hi, you are the #" +
Counter.getInstance().incrementAndGet() + " visitor");
  }}

contextListener:

public class MyContextListener implements ServletContextListener{
  @Override
  public void contextDestroyed(ServletContextEvent arg0) {}

  @Override
  public void contextInitialized(ServletContextEvent arg0) {
Counter.getInstance().incrementAndGet();
  }}

Test unit:

  public void mainTest() throws ServletException, LifecycleException{
Tomcat tomcat = new Tomcat();

   tomcat.setPort(5);
   StandardContext ctx = (StandardContext) tomcat.addWebapp("/fe",
System.getProperty("FEBaseDir"));

   tomcat.start();

   Counter.getInstance().getValue();

  }

when I used Tomcat 7, everything worked fine. but since I upgraded
tomcat to tomcat 8.0.33, It hasn't been working. the singleton class
with the static data loads twice. first by the tomcat and then by the
Junit itself.

I have tried to pass tomcat a classloader but it doesn't work.

 public void mainTest() throws ServletException, LifecycleException{
Tomcat tomcat = new Tomcat();

   tomcat.setPort(5);
   StandardContext ctx = (StandardContext) tomcat.addWebapp("/fe",
System.getProperty("FEBaseDir")); /

   ctx.setCrossContext(true);
   ctx.setLoader((Loader) new
WebappLoader(Thread.currentThread().getContextClassLoader()));

   ctx.setParentClassLoader(Thread.currentThread().getContextClassLoader());

   
tomcat.getEngine().setParentClassLoader(Thread.currentThread().getContextClassLoader());
   
tomcat.getHost().setParentClassLoader(Thread.currentThread().getContextClassLoader());
   
tomcat.getService().setParentClassLoader(Thread.currentThread().getContextClassLoader());
   
tomcat.getServer().setParentClassLoader(Thread.currentThread().getContextClassLoader());
   tomcat.start();

   Counter.getInstance().getValue();

  }


What am I doing wrong?

Thanks!

Oren


Re: OutOfMemoryError: PermGen space - SOLVED

2016-07-22 Thread Mark Thomas
On 22/07/2016 19:15, Berneburg, Cris J. - US wrote:
> Mark (Thomas), Román, Guido, and Mark (Eggers)
> 
> Thank you all for your suggestions, assistance, and patience.
> 
> With your help and encouragement I learned how to perform heap dumps using 
> Java VisualVM, analyze them using Eclipse Memory Analyzer, and follow 
> instructions.  ;-)
> 
> The OutOfMemoryError in Tomcat Manager was caused by a memory leak when Log4J 
> did not terminate properly.  This was due to my mistake of neglecting to set 
> up the necessary Log4J shutdown procedures.
> 
> Adding Log4jServletContextListener and log4jServletFilter to my app's web.xml 
> solved the problem.  The Find Leaks button on the Tomcat Manager page 
> confirmed.
> 
> I apologize for taking your time and bandwidth on such a newbie mistake.

No need to apologize. Glad we were able to help. Tracking down memory
leaks is never easy and I would have said guiding someone how to do it
via e-mail is close to impossible. I'm impressed at how quickly you
managed to get this fixed.

As an added bonus we now have some great content in the archives to
point people to when they are trying to track down memory leaks.

> Thanks again for your help.  :-)

Not at all. Thanks for the good questions. A very large part of being
able to provide an helpful answer is a well written question.

Mark


> 
> --
> Cris Berneburg
> CACI Lead Software Engineer
> 
> -Original Message-
> From: Berneburg, Cris [mailto:cberneb...@caci.com] 
> Sent: Thursday, July 14, 2016 2:27 PM
> To: Tomcat Users List
> Subject: OutOfMemoryError: PermGen space
> 
>> Hi Folks
>>
>> I got this error from the Tomcat Web Application Manager after having
>> stopped and started one of the applications multiple times.  (This was
>> after repeatedly deploying the application manually to attempt to find
>> a bug that I could not reproduce in my IDE.)  Once the error occurred,
>> the server was extremely sluggish to respond even to remote desktop
>> mouse and keyboard events.
> 
> [SNIP]
> 
>> Here's the error:
>>
>> FAIL - Application at context path /someapp could not be started
>> FAIL - Encountered exception java.lang.OutOfMemoryError: PermGen space
>>
>> Is this likely due to a memory leak in my application?
> 
> [SNIP]
> 
>> OS: Win Server 2012 R2
>> Java: 1.6.0_24  (oops, need to upgrade that now)
>> Tomcat: 6.0.37  (hmm... will need to upgrade soon-ish)
> 
> 
> -
> 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: No binary distribution for mod_jk?

2016-07-22 Thread Paul Roubekas
On 7/22/2016 4:14 PM, Christopher Schultz wrote:
> Paul,
>
> On 7/21/16 5:08 PM, Paul Roubekas wrote:
> > On 7/21/2016 2:21 PM, Coty Sutherland wrote:
> >>> Actually my requirement is not that complex.  All I need to do
> >>> is host TomEE (a Tomcat 7 superset), Bugzilla and phpBB (forum
> >>> software) on the same server.  It is my understanding the I
> >>> need httpd to do this.
> >> TomEE can run outside of a web server (its it's on web
> >> container), but Bugzilla and phpBB seem to require a webserver to
> >> run, so you're correct there. If you install Bugzilla and phpBB
> >> in httpd, then it should be accessible via http://host/bugzilla
> >> (or whatever the path is). Tomcat would be accessible via
> >> http://host:8080/. If you wanted tomcat to be accessible via
> >> http://host/tomcat, then you'd have to proxy to it.
> > understood.
> >>
> >>> It is also my understanding that I needed mod_jk to have the
> >>> httpd route to TomEE (Tomcat 7).  I have TomEE running on the
> >>> server now.
> >> Unless you only have an AJP connector on TomEE (which isn't
> >> likely) it's probably easier/less work for you to use mod_proxy
> >> (or mod_proxy_ajp even if you want AJP traffic) instead of
> >> mod_jk. It's provided by the httpd package that's likely already
> >> installed. You just need to setup ProxyPass[Reverse] rules as
> >> documented here:
> >> https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass.
> >>
> >>
> I'd also suggest setting proxyName and proxyPort on your connector so
> >> that any links generated by your application don't try and bypass
> >> the proxy (see:
> >> https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attr
> ibutes).
>
> >>
> Don't know what AJP is.  Therefore I assume it is not in use.  If my
> > understand of AJP is correct, based on a 5 minute read on
> > Wikipedia, I only have one server so there is no value in AJP for
> > me.
>
> If you are starting from scratch, I would recommend using mod_proxy
> for your proxying with httpd. It comes pre-built with whatever binary
> httpd distribution you got, and is arguably easier to configure.
>
> You can even use either HTTP or AJP as the protocol to connect httpd
> -> Tomcat. I would recommend mod_proxy_http just because it's
> basically the simplest to configure. If you want to use TLS and get
> the certificate information over to Tomcat/TomEE, it's a bit easier to
> do with AJP, but not impossible with HTTP.
>
I have pages that require HTTPS.
> I was just assuming you knew you wanted mod_jk and were looking for a
> binary.
>
> Apologies for the confusion.
No problem.
>
> httpd + Tomcat/TomEE is quite easy to get set up with mod_proxy_http.
> Simply:
>
> 1. Configure Tomcat/TomEE as usual, with an HTTP connector listening
> on some port (probably 8080 is already being used if you have the
> default configuration).
>
> 2. Enable mod_proxy and mod_proxy_ajp in httpd. You may also want
> mod_proxy_balancer if you have multiple Tomcat/TomEE nodes you want to
> use for load-balancing.
Only one server.  No load balancing at this time.
>
> 3. Configure a  directive in your httpd configuration that
> looks something like this:
>
> ProxyPass /webappname/ http://tomcathost:8080/webappname/
> ProxyPassReverse /webappname/ http://tomcathost:8080/webappname/
I have a requirement that when a user enters /http://www.myhost.com they
get the TomEE website. That is why my configuration is as below.

ProxyPass /  ...
ProxyPassReverse  /  ...

>
> Bounce httpd and hit http://httpdhost/webappname/index.jsp and your
> request should go through the reverse-proxy (that's httpd) through to
> the Tomcat/TomEE node. The "ProxyPassReverse" will re-write certain
> response HTTP header fields as they are passed-back to the client, so
> that the client will see the "outside" view of the back-end server,
> instead of the "inside view" -- that is, the client will see
> http://httpdhost/ as the base URL instead of http://tomcathost:8080/
> as the base URL.
>
> Write back with any questions or problems.
>
> Welcome to the community!
>
> -chris
> > -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For
additional commands, e-mail: users-h...@tomcat.apache.org >

-- 
The people that bring you Usque .



signature.asc
Description: OpenPGP digital signature


Re: NullPointerExceptions from Coyote over SSL

2016-07-22 Thread Peter Robbins
Just to update, we were able to work around this by changing our server.xml 
connector config from:

protocol="HTTP/1.1"
to:
protocol="org.apache.coyote.http11.Http11Nio2Protocol" 
sslImplementationName="org.apache.tomcat.util.net.jsse.JSSEImplementation"

Somewhere deep within Http11NioProtocol there is a bug that is fixed in 
Http11Nio2Protocol. Unfortunately, we don’t have the bandwidth to try to 
isolate it further, though I will update if anything else is uncovered.

Thanks,
Peter

On 7/20/16, 11:13 AM, "Peter Robbins"  wrote:

That’s good to know. In the short term I think we’re going to revert back to 
the 8.0.x branch and see if we can find put together a more isolated repro war 
to try to nail this thing down. Thanks for your help!

Peter

On 7/20/16, 7:40 AM, "Rémy Maucherat"  wrote:

2016-07-20 13:59 GMT+02:00 Peter Robbins :

> Ok I'll see if I can dig BC out of the application and have it actually
> start up to try to see if that's the case.
>
> You're saying there are known compatibility issues with Tomcat NIO https
> if you register another j2ee security provider?


No, but we're not testing that kind of configuration at all. Since there's
OpenSSL support, it seems less important now as well.


> The errors we're seeing don't seem crypto related apart from only
> appearing over https.
>

Rémy






Re: No binary distribution for mod_jk?

2016-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Paul,

On 7/21/16 5:08 PM, Paul Roubekas wrote:
> On 7/21/2016 2:21 PM, Coty Sutherland wrote:
>>> Actually my requirement is not that complex.  All I need to do
>>> is host TomEE (a Tomcat 7 superset), Bugzilla and phpBB (forum
>>> software) on the same server.  It is my understanding the I
>>> need httpd to do this.
>> TomEE can run outside of a web server (its it's on web
>> container), but Bugzilla and phpBB seem to require a webserver to
>> run, so you're correct there. If you install Bugzilla and phpBB
>> in httpd, then it should be accessible via http://host/bugzilla
>> (or whatever the path is). Tomcat would be accessible via
>> http://host:8080/. If you wanted tomcat to be accessible via
>> http://host/tomcat, then you'd have to proxy to it.
> understood.
>> 
>>> It is also my understanding that I needed mod_jk to have the
>>> httpd route to TomEE (Tomcat 7).  I have TomEE running on the
>>> server now.
>> Unless you only have an AJP connector on TomEE (which isn't
>> likely) it's probably easier/less work for you to use mod_proxy
>> (or mod_proxy_ajp even if you want AJP traffic) instead of
>> mod_jk. It's provided by the httpd package that's likely already
>> installed. You just need to setup ProxyPass[Reverse] rules as
>> documented here: 
>> https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass.
>>
>> 
I'd also suggest setting proxyName and proxyPort on your connector so
>> that any links generated by your application don't try and bypass
>> the proxy (see:
>> https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attr
ibutes).
>
>> 
Don't know what AJP is.  Therefore I assume it is not in use.  If my
> understand of AJP is correct, based on a 5 minute read on
> Wikipedia, I only have one server so there is no value in AJP for
> me.

If you are starting from scratch, I would recommend using mod_proxy
for your proxying with httpd. It comes pre-built with whatever binary
httpd distribution you got, and is arguably easier to configure.

You can even use either HTTP or AJP as the protocol to connect httpd
- -> Tomcat. I would recommend mod_proxy_http just because it's
basically the simplest to configure. If you want to use TLS and get
the certificate information over to Tomcat/TomEE, it's a bit easier to
do with AJP, but not impossible with HTTP.

I was just assuming you knew you wanted mod_jk and were looking for a
binary.

Apologies for the confusion.

httpd + Tomcat/TomEE is quite easy to get set up with mod_proxy_http.
Simply:

1. Configure Tomcat/TomEE as usual, with an HTTP connector listening
on some port (probably 8080 is already being used if you have the
default configuration).

2. Enable mod_proxy and mod_proxy_ajp in httpd. You may also want
mod_proxy_balancer if you have multiple Tomcat/TomEE nodes you want to
use for load-balancing.

3. Configure a  directive in your httpd configuration that
looks something like this:

ProxyPass /webappname/ http://tomcathost:8080/webappname/
ProxyPassReverse /webappname/ http://tomcathost:8080/webappname/

Bounce httpd and hit http://httpdhost/webappname/index.jsp and your
request should go through the reverse-proxy (that's httpd) through to
the Tomcat/TomEE node. The "ProxyPassReverse" will re-write certain
response HTTP header fields as they are passed-back to the client, so
that the client will see the "outside" view of the back-end server,
instead of the "inside view" -- that is, the client will see
http://httpdhost/ as the base URL instead of http://tomcathost:8080/
as the base URL.

Write back with any questions or problems.

Welcome to the community!

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

iEYEARECAAYFAleSfrgACgkQ9CaO5/Lv0PBthwCfbA4Iph+GfIVsCtTcrzpBBvEH
uYgAn2NhIdyQ/0FMz8uJ7NDCg/I/cHzr
=zDdt
-END PGP SIGNATURE-

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



Re: No binary distribution for mod_jk?

2016-07-22 Thread Paul Roubekas
On 7/22/2016 4:49 AM, André Warnier (tomcat) wrote:
> On 22.07.2016 09:18, Jäkel, Guido wrote:
>>> -Original Message-
>>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>>> Sent: Thursday, July 21, 2016 5:51 PM
>>> To: Tomcat Users List
>>> Subject: Re: No binary distribution for mod_jk?
>>>
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA256
>>>
>>> Paul,
>>>
>>> On 7/20/16 12:12 PM, Paul Roubekas wrote:
 I am trying to install the mod_jk on httpd for my tomcat 7.0.68
 (TomEE) server.

 I am reading this
 https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html


>>> documentation which points to this
 http://tomcat.apache.org/download-connectors.cgi download page.
 But there is no binary download for *unix, just source?
>>>
>>> That's right: the ASF provides source, not binaries (in general). You
>>> will have to build mod_jk yourself on *NIX. The good news is that it's
>>> fairly easy to build yourself.
>>>
>>> - -chris
>>
>> ... but I expect that every serious Linux binary distribution will
>> alson with other additional Apache modules provide it in it's
>> software repository, or is this wrong? As an user of Gentoo I have no
>> experience with this.
>>
>
> At least some (even commercial) Linux distributions have not provided
> mod_jk (at least in the past), and have provided mod_proxy_ajp instead.
> That is always a choice of whoever creates the distribution packages.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Just as a recap.  I have one Fedora 23 server that I need to have three
application running on.  Namely TomEE (tomcat 7), Bugzilla and phpBB
(forum software).
Below are the changes I made to httpd.conf for Tomcat to get the http
traffic.  Have not made configurations for phpBB (www.myDomain.com\bb)
or Bugzilla (www.myDomain.com\tt).


  Require ip 127.0.0.1


ProxyPass /  http://localhost:8080/MyApp
ProxyPassReverse  /  http://localhost:8080/MyApp

server.xml is back to the default ports of 8080 and 8443.

=

My tests show these setting to be wrong and/or insufficient.

=

The first test fail with a permission error on the browser.
I removed the

  Require ip 127.0.0.1

XML stanza and then got a Service Unavailable error.

=

I then tried changing the ServerName configuration.

*Before:*

#ServerName www.example.com:80

 

*After:*

ServerName 70.63.204.226:80


=

There is clearly something else mod_jk would have done for me that this
manual configuration is not doing.  Help please!



-- 
The people that bring you Usque .


signature.asc
Description: OpenPGP digital signature


Re: Tomcat FREAK Issue

2016-07-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Uzair,

On 7/14/16 11:04 PM, uzair rashid wrote:
> Hello Chris,
> 
> We are using Tomcat version: 6.0.36.0
> 
> JRE 1.6.0

Java 1.6 does not support TLSv1.1 or TLSv1.2, so you won't be able to
get those to work. Also, Java 1.6 does not support DH primes larger
than 1024-bit, which have somewhat recently been determined to be weak
[https://weakdh.org/].

I strongly urge you to upgrade your Java version. Even Java 1.7 has
been EOL'd in favor of Java 1.8.

> Do you think I need to change the settings to the following: 
>  SSLProtocol="TLSv1,TLSv1.1,TLSv1.2" 
> ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_
128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES
_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SH
A,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"

This
> 
is confusing to me because SSLProtocol is expected to control the
allowed protocols when using the tcnative+OpenSSL library, but the
"ciphers" is intended to set the ciphers being used with JSSE (which
is the opposite of OpenSSL).

I think you want SSLProtocol + SSLCipherSuite (for
tcnative/OpenSSL[1]) or sslEnabledProtocols + ciphers (for JSSE[2]).

>  SSLProtocol="TLSv1,TLSv1.1,TLSv1.2" 
> ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_
128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES
_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SH
A,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"

Same
> 
issue here.

It's important to know which connector is actually being used. Can you
post the part of your catalina.log file which shows exactly which
connector has been chosen for HTTP/1.1 at runtime? It will either be
the APR connector (which is tcnative/OpenSSL) or the BIO or NIO
connector (which both use JSSE).

The FREAK issue is with EXPORT ciphers being available at all. Your
"ciphers" list above does not have any EXPORT ciphers mentioned, but
if you are using OpenSSL, then you are getting the default list of
ciphers, which, depending upon your environment, might still include the
m.

Try something simple like adding this:

SSLProtocol="TLSv1,TLSv1.1,TLSv1.2"
SSLCipherSuite="!EXPORT:HIGH"

... and see if that improves things.

Have a look at the Tomcat Ciphers reference[3] which includes some
recommendations for what "SSLCipherSuite" can be set to in order to
improve your security.

Hope that helps,
- -chris

[1] http://tomcat.apache.org/tomcat-6.0-doc/apr.html#HTTPS
[2] http://tomcat.apache.org/tomcat-6.0-doc/config/http.html#SSL_Support
[3] https://wiki.apache.org/tomcat/Security/Ciphers
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAleSfDMACgkQ9CaO5/Lv0PCa6QCfdxIBPzRLhI6L3ujqcvP8GSxF
6p4An13L/BK+s5Dxs4gXUhx4AlsaJODK
=J/ZW
-END PGP SIGNATURE-

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



Re: OutOfMemoryError: PermGen space - SOLVED

2016-07-22 Thread Mark Eggers
Cris,

On 7/22/2016 10:15 AM, Berneburg, Cris J. - US wrote:
> Mark (Thomas), Román, Guido, and Mark (Eggers)
> 
> Thank you all for your suggestions, assistance, and patience.
> 
> With your help and encouragement I learned how to perform heap dumps
> using Java VisualVM, analyze them using Eclipse Memory Analyzer, and
> follow instructions.  ;-)
> 
> The OutOfMemoryError in Tomcat Manager was caused by a memory leak
> when Log4J did not terminate properly.  This was due to my mistake of
> neglecting to set up the necessary Log4J shutdown procedures.
> 
> Adding Log4jServletContextListener and log4jServletFilter to my app's
> web.xml solved the problem.  The Find Leaks button on the Tomcat
> Manager page confirmed.
> 
> I apologize for taking your time and bandwidth on such a newbie
> mistake.
> 
> Thanks again for your help.  :-)
> 
> -- Cris Berneburg CACI Lead Software Engineer
> 
> -Original Message- From: Berneburg, Cris
> [mailto:cberneb...@caci.com] Sent: Thursday, July 14, 2016 2:27 PM 
> To: Tomcat Users List Subject: OutOfMemoryError: PermGen space
> 
>> Hi Folks
>> 
>> I got this error from the Tomcat Web Application Manager after
>> having stopped and started one of the applications multiple times.
>> (This was after repeatedly deploying the application manually to
>> attempt to find a bug that I could not reproduce in my IDE.)  Once
>> the error occurred, the server was extremely sluggish to respond
>> even to remote desktop mouse and keyboard events.
> 
> [SNIP]
> 
>> Here's the error:
>> 
>> FAIL - Application at context path /someapp could not be started 
>> FAIL - Encountered exception java.lang.OutOfMemoryError: PermGen
>> space
>> 
>> Is this likely due to a memory leak in my application?
> 
> [SNIP]
> 
>> OS: Win Server 2012 R2 Java: 1.6.0_24  (oops, need to upgrade that
>> now) Tomcat: 6.0.37  (hmm... will need to upgrade soon-ish)

You're more than welcome. Glad that it was a simple 'read and follow the
instructions' problem. Been there, done that, have the palm prints on my
forehead.

Something I've made a habit of (after getting burned several times by
stray threads, threadlocals, and permgen errors) is to search for tomcat
/ servlet container in the context of using a library when I add a new
one to the mix.

That search has saved me lots of grief.

. . . just my two cents.
/mde/





signature.asc
Description: OpenPGP digital signature


RE: OutOfMemoryError: PermGen space - SOLVED

2016-07-22 Thread Berneburg, Cris J. - US
Mark (Thomas), Román, Guido, and Mark (Eggers)

Thank you all for your suggestions, assistance, and patience.

With your help and encouragement I learned how to perform heap dumps using Java 
VisualVM, analyze them using Eclipse Memory Analyzer, and follow instructions.  
;-)

The OutOfMemoryError in Tomcat Manager was caused by a memory leak when Log4J 
did not terminate properly.  This was due to my mistake of neglecting to set up 
the necessary Log4J shutdown procedures.

Adding Log4jServletContextListener and log4jServletFilter to my app's web.xml 
solved the problem.  The Find Leaks button on the Tomcat Manager page confirmed.

I apologize for taking your time and bandwidth on such a newbie mistake.

Thanks again for your help.  :-)

--
Cris Berneburg
CACI Lead Software Engineer

-Original Message-
From: Berneburg, Cris [mailto:cberneb...@caci.com] 
Sent: Thursday, July 14, 2016 2:27 PM
To: Tomcat Users List
Subject: OutOfMemoryError: PermGen space

> Hi Folks
>
> I got this error from the Tomcat Web Application Manager after having
> stopped and started one of the applications multiple times.  (This was
> after repeatedly deploying the application manually to attempt to find
> a bug that I could not reproduce in my IDE.)  Once the error occurred,
> the server was extremely sluggish to respond even to remote desktop
> mouse and keyboard events.

[SNIP]

> Here's the error:
>
> FAIL - Application at context path /someapp could not be started
> FAIL - Encountered exception java.lang.OutOfMemoryError: PermGen space
>
> Is this likely due to a memory leak in my application?

[SNIP]

> OS: Win Server 2012 R2
> Java: 1.6.0_24  (oops, need to upgrade that now)
> Tomcat: 6.0.37  (hmm... will need to upgrade soon-ish)


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



RE: OutOfMemoryError: PermGen space

2016-07-22 Thread Berneburg, Cris J. - US
Mark (Eggers) and Mark (Thomas)

BLUF:  Memory leak found and fixed.  I did not set up the necessary Log4J 
shutdown procedures.  Please see below.

-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID]
Sent: Thursday, July 21, 2016 8:32 PM
To: Tomcat Users List
Subject: Re: OutOfMemoryError: PermGen space

> > From the log4j2 web site:
> > 
> > https://logging.apache.org/log4j/2.x/manual/webapp.html

[SNIP]

> > If you are using Log4j in a Servlet 2.5 web application, or if you 
> > have disabled auto-initialization with the 
> > isLog4jAutoInitializationDisabled context parameter, you must 
> > configure the Log4jServletContextListener and Log4jServletFilter in 
> > the deployment descriptor or programmatically.
>
> *** I did not do that at all.  Is it the context listener's responsibility
> for shutting down properly?  Why the filter is needed?  Guess I'll set them
> up and see if that makes a diff.


That fixed it.  Adding Log4jServletContextListener and log4jServletFilter to my 
web.xml solves the problem.  The Find Leaks button on the Tomcat Manager page 
confirms.

Chalk it up to a newbie error.

Thanks for your help and patience.  :-)

--
Cris Berneburg
CACI Lead Software Engineer


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



RE: OutOfMemoryError: PermGen space

2016-07-22 Thread Berneburg, Cris J. - US
Mark (Eggers) and Mark (Thomas)

BLUF:  I might not have set up the necessary Log4J shutdown procedures.  Please 
(especially) see my responses flagged by ***.

-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] 
Sent: Thursday, July 21, 2016 8:32 PM
To: Tomcat Users List
Subject: Re: OutOfMemoryError: PermGen space

> Mark and Cris,
> 
> On 7/21/2016 12:47 PM, Mark Thomas wrote:
> > On 21/07/2016 18:17, Berneburg, Cris wrote:
> >> From: Mark Thomas [mailto:ma...@apache.org]
> > 
> > 
> > 
> >> 
> >> Used the Java Visual VM to pull a heap dump after the app restart and 
> >> GC.  Used Eclipse Memory Analyzer to analyze the heap dumps.
> >> Found the WebappClassLoader with started == false and used Path to GC 
> >> roots:
> >> 
> >> 
> >> org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean ...
> >> com.sun.jmx.mbeanserver.StandardMBeanIntrospector
> >> 
> [SNIP]
> > 
> >> I don't see anything pointing back to our code.  With no previous 
> >> experience with heap analysis on my part, it looks to me to be due to 
> >> Log4J2.
> > 
> > Agreed.
> > 
> [SNIP]
> > 
> >> Not sure what else I can do.  Report it to the Log4J2 dev group 
> >> perhaps?
> > 
> > Ask on their users' list. It may be that when you use log4j2 in a 
> > webapp there is some clean-up method you need to call from a 
> > ServletContextListener.


OK, I'll follow up with that next-next.


> From the log4j2 web site:
> 
> https://logging.apache.org/log4j/2.x/manual/webapp.html


Thanks for pointing that out.  I'm looking through it again now:


> you'll need to add the log4j-web module to your deployment [...]
>
> To avoid problems the Log4j shutdown hook will automatically be
> disabled when the log4j-web jar is included. 


Hmm...  Log4j-web-2.3.jar is included in our apps lib folder.  I wonder if 
there is a shutdown procedure I am missing then.


> If you are using Log4j in a Servlet 2.5 web application, or if
> you have disabled auto-initialization with the
> isLog4jAutoInitializationDisabled context parameter, you must
> configure the Log4jServletContextListener and Log4jServletFilter
> in the deployment descriptor or programmatically.


*** I did not do that at all.  Is it the context listener's responsibility for 
shutting down properly?  Why the filter is needed?  Guess I'll set them up and 
see if that makes a diff.


> Asynchronous Requests and Threads
> [SNIP]
> Note that you must call clearLoggerContext once your thread is
> finished processing. Failing to do so will result in memory leaks.


*** Wait a minute.  Maybe I don't understand how servlet threads work in 
Tomcat.  We don't launch any separate threads, but do override doPost and doGet 
in our servlets.  Is that synchronous or asynchronous?  Do we still have to 
call webLifeCycle.clearLoggerContext?


> In servlet spec 3.0 and greater, there appears to be annotation
> that gets everything running.
> 
> In servlet spec 2.5, you'll have to add a bunch of stuff to
> your web.xml.
>
> The reference above gives a more detailed explanation and an
> example for the 2.5 web.xml.


Since we still use Tomcat 6, we used a 2.5 servlet spec config.  All the Log4J 
config info is in log4j2.xml.


> I am just starting to get things migrated to log4j2,
> so I'll know how it goes shortly.


Please do!

--
Cris Berneburg
CACI Lead Software Engineer


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



RE: OutOfMemoryError: PermGen space

2016-07-22 Thread Berneburg, Cris J. - US
Guido

Thanks for following up with me:

-Original Message-
From: Jäkel, Guido [mailto:g.jae...@dnb.de] 
Sent: Friday, July 22, 2016 4:31 AM
To: Berneburg, Cris
Subject: RE: OutOfMemoryError: PermGen space

> >-Original Message-
> >From: Berneburg, Cris [mailto:cberneb...@caci.com]
> >Sent: Thursday, July 21, 2016 6:18 PM
> >To: Tomcat Users List
> >Subject: RE: OutOfMemoryError: PermGen space
> >
> >Mark
> >
> >Thanks again for taking the time to assist with the OutOfMemoryError.  
> >BLUF, it looks like Log4J2 is the culprit.  Will you please check my work 
> >below to see if I have interpreted correctly?
> 
> Dear Chris,
> 
> Is the Log4J-JAR located at the "right place" with respect
> to the classloader path, i.e. inside the webapps lib directory?


Yup, the Log4J jars are in the webapp's lib folder and not in Tomcat's lib 
folder.  I just triple-checked.  ;-)


> Is Log4J2 is just used for your application or for Tomcat logging, too? 


Just for my app and not Tomcat.

--
Cris Berneburg
CACI Lead Software Engineer



RE: OutOfMemoryError: PermGen space

2016-07-22 Thread Berneburg, Cris J. - US
Mark

BLUF:  Thanks for your explanations and assistance.  I plan to follow up with 
the Log4J2 group.  My simple responses below.

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Thursday, July 21, 2016 3:47 PM
To: Tomcat Users List
Subject: Re: OutOfMemoryError: PermGen space

> On 21/07/2016 18:17, Berneburg, Cris wrote:
> > From: Mark Thomas [mailto:ma...@apache.org]
> 
> 
> 
> > 
> > Used the Java Visual VM to pull a heap dump after the app
> > restart and GC.  Used Eclipse Memory Analyzer to analyze
> > the heap dumps.  Found the WebappClassLoader with started
> > == false and used Path to GC roots:
> > 
> >  org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean ... 
> > com.sun.jmx.mbeanserver.StandardMBeanIntrospector
> > 
> >  org.apache.logging.log4j.core.jmx.LoggerContextAdmin ... 
> > com.sun.jmx.mbeanserver.StandardMBeanIntrospector
> > 
> >  org.apache.logging.log4j.core.jmx.StatusLoggerAdmin ... 
> > com.sun.jmx.mbeanserver.StandardMBeanIntrospector
> 
> The three above look problematic.
> 
> > referent java.util.WeakHashMap$Entry ... java.lang.reflect.Proxy
> 
> That should disappear once the problematic entries have been fixed
> 
> >  $Proxy3 ... java.lang.reflect.Proxy
> 
> That looks to be related to the previous GC root and should also
> disappear once the problematic entries are fixed.
> 
> > referent java.util.WeakHashMap$Entry ... 
> > org.apache.juli.ClassLoaderLogManager
> > ... (many java.util.logging.*)
> 
> Again, those will disappear once the issues are fixed. They are Tomcat's
> internal logging


Thanks for explaining those to me.


> > I don't see anything pointing back to our code.  With 
> > no previous experience with heap analysis on my part,
> > it looks to me to be due to Log4J2.
> 
> Agreed.


Great!


> >  Changing the args for the call to LogManager.getLogger from
> Class clazz to none made no appreciable difference.
> 
> I wouldn't expect that to make any difference.
> 
> >  (Did I somehow set up Log4J2 incorrectly to get it to misbehave?)
> 
> I don't think so.


I wanted to make sure that holding onto class references wasn't a problem.  
Later I even replaced all the static vars with non-static locals as an 
experiment just in case ;-) and it made no diff.  Yeah, I know, you previously 
said that removing a static would not help, but I had to try anyway because I 
don't fully understand it all.  If there's a chance I did something goofy to 
cause the issue, I want to eliminate that possibility.


> >  Not sure what else I can do.  Report it to the Log4J2 dev group perhaps?
> 
> Ask on their users' list. It may be that when you use log4j2 in a webapp
> there is some clean-up method you need to call from a
> ServletContextListener.


OK, I'll do that next after following up with the other folks in this group.


> >> One thing worth noting. Yourkit offers two types of heap dumps.
> >> You don't want YourKit's own. There is a JVM bug that prevents
> >> some GC roots from being shown in that format and if your leak
> >> traces back to one of those you can end up scratching your head
> >> for days.
> >>
> >> Mark
> > 
> > 
> > Is there a likely chance that the bug interfered with my usage of
> > Java Visual VM and Eclipse Memory Analyzer and thus prevented me
> > from determining the real problem source?
> 
> No. The bug just hides GC roots. If the only GC roots you see are for
> weak references then you might have hit this bug.


Ah good, that's a relief and good to know.

Thanks!

--
Cris Berneburg
CACI Lead Software Engineer


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



Re: No binary distribution for mod_jk?

2016-07-22 Thread tomcat

On 22.07.2016 09:18, Jäkel, Guido wrote:

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Thursday, July 21, 2016 5:51 PM
To: Tomcat Users List
Subject: Re: No binary distribution for mod_jk?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Paul,

On 7/20/16 12:12 PM, Paul Roubekas wrote:

I am trying to install the mod_jk on httpd for my tomcat 7.0.68
(TomEE) server.

I am reading this
https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html



documentation which points to this

http://tomcat.apache.org/download-connectors.cgi download page.
But there is no binary download for *unix, just source?


That's right: the ASF provides source, not binaries (in general). You
will have to build mod_jk yourself on *NIX. The good news is that it's
fairly easy to build yourself.

- -chris


... but I expect that every serious Linux binary distribution will alson with 
other additional Apache modules provide it in it's software repository, or is 
this wrong? As an user of Gentoo I have no experience with this.



At least some (even commercial) Linux distributions have not provided mod_jk (at least in 
the past), and have provided mod_proxy_ajp instead.

That is always a choice of whoever creates the distribution packages.



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



Re: Tomcat starts but home page cannot open with url http://localhost:8080

2016-07-22 Thread tomcat

On 22.07.2016 05:28, chandra sekhar wrote:

Actually, i didn't configure the Apex ORDS yet with DB.As i told you in
previous mail chain i just extracted and trying to see the apche tomcat
home page first before going to configure Apex ORDS.


a) If you are using Internet Explorer, go into the "extra" or "preferences" settings, and 
find and disable the "show friendly error pages" option.

You might then see what is really returned by Tomcat (or whatever the error 
really is).

b) out of the logfile which you posted earlier, I have extracted the following part, which 
shows


1) the end of a previous Tomcat startup sequence :


Jul 21, 2016 8:13:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 128687 ms


2) Then almost immediately (4 s later), a shutdown sequence :


Jul 21, 2016 8:13:40 PM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port.
Stopping the Server instance.
Jul 21, 2016 8:13:40 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-1036"]
Jul 21, 2016 8:13:40 PM org.apache.catalina.core.StandardService
stopInternal
INFO: Stopping service Catalina
Jul 21, 2016 8:13:40 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesJdbc
SEVERE: The web application [/apex_bkp] registered the JDBC driver
[oracle.jdbc.OracleDriver] but failed to unregister it when the web
application was stopped. To prevent a memory leak, the JDBC Driver has been
forcibly unregistered.
Jul 21, 2016 8:13:40 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-1036"]
Jul 21, 2016 8:13:40 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-1036"]


3) then, more than one hour later, a new startup :


Jul 21, 2016 9:32:36 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Jul 21, 2016 9:32:36 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jul 21, 2016 9:32:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 633 ms
Jul 21, 2016 9:32:37 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Jul 21, 2016 9:32:37 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
Jul 21, 2016 9:32:37 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive
/data1/app/apache-tomcat-7.0.55/webapps/apex.war
Jul 21, 2016 9:32:40 PM
oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder:
/data1/app/apache-tomcat-7.0.55/webapps/apex/apex
Default Database connection not configured properly
Jul 21, 2016 9:33:41 PM oracle.dbtools.rt.web.SCListener
contextInitialized
INFO: Oracle REST Data Services initialized
Oracle REST Data Services version : 2.0.8.163.10.40
Oracle REST Data Services server info: Apache Tomcat/7.0.55

Jul 21, 2016 9:33:50 PM org.apache.catalina.util.SessionIdGenerator
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [8,478] milliseconds.
Jul 21, 2016 9:33:50 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive
/data1/app/apache-tomcat-7.0.55/webapps/apex.war has finished in 72,969 ms
Jul 21, 2016 9:33:50 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/data1/app/apache-tomcat-7.0.55/webapps/ROOT
Jul 21, 2016 9:33:50 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deployment of web application directory
/data1/app/apache-tomcat-7.0.55/webapps/ROOT has finished in 36 ms
Jul 21, 2016 9:33:50 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/data1/app/apache-tomcat-7.0.55/webapps/apex_bkp
Jul 21, 2016 9:33:51 PM
oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration folder:
/data1/app/apache-tomcat-7.0.55/webapps/apex/apex_bkp
Jul 21, 2016 9:33:52 PM oracle.dbtools.rt.web.SCListener
contextInitialized
INFO: Oracle REST Data Services initialized
Oracle REST Data Services version : 2.0.8.163.10.40
Oracle REST Data Services server info: Apache Tomcat/7.0.55

Jul 21, 2016 9:33:52 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deployment of web application directory
/data1/app/apache-tomcat-7.0.55/webapps/apex_bkp has finished in 2,089 ms
Jul 21, 2016 9:33:52 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/data1/app/apache-tomcat-7.0.55/webapps/apex_old
Jul 21, 2016 9:33:53 PM
oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
INFO: Using configuration f

RE: OutOfMemoryError: PermGen space

2016-07-22 Thread Jäkel , Guido
>-Original Message-
>From: Berneburg, Cris J. - US [mailto:cberneb...@caci.com]
>Sent: Thursday, July 21, 2016 6:18 PM
>To: Tomcat Users List
>Subject: RE: OutOfMemoryError: PermGen space
>
>Mark
>
>Thanks again for taking the time to assist with the OutOfMemoryError.  BLUF, 
>it looks like Log4J2 is the culprit.  Will you
>please check my work below to see if I have interpreted correctly?

Dear Chris,

Is the Log4J-JAR located at the "right place" with respect to the classloader 
path, i.e. inside the webapps lib directory? Is Log4J2 is just used for your 
application or for Tomcat logging, too? 

Guido

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



RE: No binary distribution for mod_jk?

2016-07-22 Thread Jäkel , Guido
>-Original Message-
>From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>Sent: Thursday, July 21, 2016 5:51 PM
>To: Tomcat Users List
>Subject: Re: No binary distribution for mod_jk?
>
>-BEGIN PGP SIGNED MESSAGE-
>Hash: SHA256
>
>Paul,
>
>On 7/20/16 12:12 PM, Paul Roubekas wrote:
>> I am trying to install the mod_jk on httpd for my tomcat 7.0.68
>> (TomEE) server.
>>
>> I am reading this
>> https://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
>>
>>
>documentation which points to this
>> http://tomcat.apache.org/download-connectors.cgi download page.
>> But there is no binary download for *unix, just source?
>
>That's right: the ASF provides source, not binaries (in general). You
>will have to build mod_jk yourself on *NIX. The good news is that it's
>fairly easy to build yourself.
>
>- -chris

... but I expect that every serious Linux binary distribution will alson with 
other additional Apache modules provide it in it's software repository, or is 
this wrong? As an user of Gentoo I have no experience with this.

Guido

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