WARNING: Failed to unregister MBean with name

2016-11-30 Thread Wayne Li
Hi,

I got errors as below. What is wrong please?
I use Tomcat 8.0.36, Ubuntu 16.04 and Eclipse Neon 4.6.
Thanks in advance.



Nov 30, 2016 7:29:51 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Nov 30, 2016 7:29:51 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-nio-8009"]
Nov 30, 2016 7:29:51 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Nov 30, 2016 7:29:51 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
Nov 30, 2016 7:29:51 PM org.apache.catalina.util.LifecycleMBeanBase
unregister
WARNING: Failed to unregister MBean with name
[Catalina:type=NamingResources,host=localhost,context=/] during component
destruction
javax.management.InstanceNotFoundException:
Catalina:type=NamingResources,host=localhost,context=/
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
at
org.apache.catalina.util.LifecycleMBeanBase.unregister(LifecycleMBeanBase.java:197)
at
org.apache.catalina.util.LifecycleMBeanBase.destroyInternal(LifecycleMBeanBase.java:73)
at
org.apache.catalina.deploy.NamingResourcesImpl.destroyInternal(NamingResourcesImpl.java:1091)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.StandardContext.destroyInternal(StandardContext.java:5626)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:604)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:703)
at org.apache.catalina.startup.Catalina.start(Catalina.java:664)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Nov 30, 2016 7:29:51 PM org.apache.catalina.util.LifecycleMBeanBase
unregister
WARNING: Failed to unregister MBean with name
[Catalina:type=WebResourceRoot,host=localhost,context=/,name=Cache] during
component destruction
javax.management.InstanceNotFoundException:
Catalina:type=WebResourceRoot,host=localhost,context=/,name=Cache
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
at
org.apache.catalina.util.LifecycleMBeanBase.unregister(LifecycleMBeanBase.java:197)
at
org.apache.catalina.webresources.StandardRoot.destroyInternal(StandardRoot.java:779)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.StandardContext.destroyInternal(StandardContext.java:5644)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:832)
at
org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1012)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at
org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:604)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
at

Tomcat8: WARNING: Problem with directory [/usr/share/tomcat8/common

2016-08-15 Thread Wayne Li
Hi,

I installed tomcat8 on Ubuntu 16 using
   sudo apt install tomcat8
I only need one tomcat, no need for CATALINA_BASE.

But, I got warnings below. Can I ignore these warnings? Or anything I can
do?
Any information would be appreciated. Thanks in advance.

>
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/common/classes],
exists: [false], isDirectory: [false], canRead: [false]
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/common], exists:
[false], isDirectory: [false], canRead: [false]
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/server/classes],
exists: [false], isDirectory: [false], canRead: [false]
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/server], exists:
[false], isDirectory: [false], canRead: [false]
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/shared/classes],
exists: [false], isDirectory: [false], canRead: [false]
Aug 07, 2016 8:01:32 PM org.apache.catalina.startup.ClassLoaderFactory
validateFile
WARNING: Problem with directory [/usr/share/tomcat8/shared], exists:
[false], isDirectory: [false], canRead: [false]


Re: mod_jk errors

2016-07-18 Thread Wayne Li
Thank you for both!

On Fri, Jul 15, 2016 at 3:04 AM, Rainer Jung <rainer.j...@kippdata.de>
wrote:

> Am 12.07.2016 um 19:44 schrieb Wayne Li:
>
>> Hi,
>>
>> I have a servlet/jsp application running on tomcat 7.0.47. There are no
>> static html files.
>> Now I am try to use apache 2.4.7 (Ubuntu)
>> as the front and forward eveything to tomcat. I installed mod_jk using
>> Ubuntu's software
>> center.. Things are working. But I have errors in
>> /var/log/apache2/mod_jk.log:
>>
>> [Mon Jul 11 20:19:32.261 2016] [1175:140389159810944] [info]
>> init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
>> [Mon Jul 11 20:19:32.279 2016] [1175:140389159810944] [error]
>> extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
>> 'jk-manager' in uri map post processing.
>> [Mon Jul 11 20:19:32.279 2016] [1175:140389159810944] [error]
>> extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
>> 'jk-status' in uri map post processing.
>> [Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [info]
>> init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
>> [Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [error]
>> extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
>> 'jk-manager' in uri map post processing.
>> [Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [error]
>> extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
>> 'jk-status' in uri map post processing.
>>
>> If I add the following lines, the errors go away:
>>
>> worker.list=jk-status
>> worker.jk-status.type=status
>> worker.jk-status.read_only=true
>> worker.list=jk-manager
>> worker.jk-manager.type=status
>>
>> But the added line read funny. The same thing appears on the left-side of
>> the equal sign twice.
>> Are they correct? Do I need these lines? Can I ignore the errors?
>>
>> Any information would be appreciated. Thanks in advance.
>>
>
> In addition to André's excellent tutorial: mod_jk knows that some
> properties configured via workers.properties take (comma-separated) lists
> as values. Since sometimes maintaining these lists is error-prone, it
> allows you to define the properties multiple times and will collect all
> given values into one big list. That makes maintaining hte list a more
> modular job.
>
> In your case the following is exactly equivalent:
>
> Either:
>
> worker.list=jk-status,jk-manager,myworker
>
> Or:
>
> worker.list=jk-status
> #Some more config items concerning jk-status
> worker.list=jk-manager
> #Some more config items concerning jk-manager
> worker.list=myworker
> #Some more config items concerning myworker
>
> In both cases the internal value of worker.list after parsing the complete
> file will be "jk-status,jk-manager,myworker".
>
> So what look a bit funny to you was supposed to be helpful ;)
>
> Can you ignore the errors: No.
>
> - If you don't want the jk-status and/or jk-manager worker features, then
> look for the JkMount directives where you referenced them (or entried in a
> uriworkermap.properties file but that's rarely used).
>
> - If you want to use the jk-status and/or jk-manager workers, you need to
> define them in workers.properties like you did above.
>
> Regards,
>
> Rainer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


mod_jk errors

2016-07-12 Thread Wayne Li
Hi,

I have a servlet/jsp application running on tomcat 7.0.47. There are no
static html files.
Now I am try to use apache 2.4.7 (Ubuntu)
as the front and forward eveything to tomcat. I installed mod_jk using
Ubuntu's software
center.. Things are working. But I have errors in
/var/log/apache2/mod_jk.log:

[Mon Jul 11 20:19:32.261 2016] [1175:140389159810944] [info]
init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Jul 11 20:19:32.279 2016] [1175:140389159810944] [error]
extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
'jk-manager' in uri map post processing.
[Mon Jul 11 20:19:32.279 2016] [1175:140389159810944] [error]
extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
'jk-status' in uri map post processing.
[Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [info]
init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [error]
extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
'jk-manager' in uri map post processing.
[Mon Jul 11 20:19:32.386 2016] [1177:140389159810944] [error]
extension_fix::jk_uri_worker_map.c (564): Could not find worker with name
'jk-status' in uri map post processing.

If I add the following lines, the errors go away:

worker.list=jk-status
worker.jk-status.type=status
worker.jk-status.read_only=true
worker.list=jk-manager
worker.jk-manager.type=status

But the added line read funny. The same thing appears on the left-side of
the equal sign twice.
Are they correct? Do I need these lines? Can I ignore the errors?

Any information would be appreciated. Thanks in advance.


Re: [somewhat OT] mod-jk + ssl: requests are not forward to tomcat correctly

2016-07-12 Thread Wayne Li
Thanks for all!

On Tue, Jul 12, 2016 at 7:17 AM, Rainer Jung <rainer.j...@kippdata.de>
wrote:

> Am 12.07.2016 um 12:06 schrieb André Warnier (tomcat):
>
>> On 12.07.2016 01:39, Wayne Li wrote:
>>
>>> Probably the quickest : download these files, install them on your
>>>>
>>> server, and change the above links.
>>> Like : create a sub-directory "/js" of your webapp, and install them
>>> there.
>>> Then change the above links to : href="js/jquery.mobile-1.4.5.min.css"
>>>
>>> Yes. It works. Thanks.
>>>
>>> It is okay for now. but, if I do not want host these files, what should I
>>> do? Can you point a direction for me please?
>>>
>>>
>> I just wante to make some personal comments here, to what you write above
>> :
>>
>> You are saying that you do not really want to "host" those files on your
>> server, and that you (presumably) would like to continue to link to them
>> directly on the jquery host.
>> But I believe that there are a few considerations to take into account
>> here, on the practical, ethical, and security levels :
>>
>> Basically, if you do this, then it means that any browser, anywhere,
>> that is using your application, will now (try to) access and download
>> these files directly from the jquery server, instead of from your server.
>>
>> 1) ethical aspect :
>> Users of your application will now be using the resources and bandwidth
>> of a server that is not yours, and which is supported by someone else.
>> That someone else may not like this very much.
>> I had a (quick and not exhaustive) look at the jquery website, and I did
>> not find anything which explicitly discourages people from doing this.
>> And it may well be that they actually encourage people to do this (maybe
>> they are pleased to have a lot of traffic).
>>
>> But I believe that before doing something like this, you may want to at
>> least ask them if this is ok, or what they recommend. And in particular
>> in this case, since jquery is a non-profit, open-source resource for
>> which you do not pay in the first place.
>>
>> 2) practical aspect :
>> By doing this, your application becomes dependent on the fact that any
>> of your user's browsers would actually be able to access that external
>> server, which is not under your control. There could be some firewall
>> rule which prevents such an access (now, or at any time in the future).
>> That server could be down for maintenance; it could be re-organised, so
>> that the files are no longer at that specific URL location; the file
>> content could be changed, so that things do no longer work in exactly
>> the same way; etc..
>> As you have just found out, even some browser rules (which can change
>> over time) may prevent access to these files.
>> And I know of some websites which take active measures to prevent people
>> doing this (using their resources in such a way), for example by
>> checking the "Referer" of the access to their resources.
>>
>> Another practical aspect, is that if something does not work anymore in
>> one of your applications, your users will come to you for an
>> explanation; and it may be time-consuming, in a case like this, to find
>> out what exactly isn't working.
>>
>> 3) security aspect :
>> If anyone managed to replace the content of that file (again, this is
>> not under your control), they would be able to "inject" malicious
>> content into your application.
>> And to the world at large, this would at first look as if it was your
>> application which is the culprit.
>>
>> These are my personal opinions only.  But for the reasons above, I would
>> rather host myself the resources needed by my applications.
>>
>
> and
>
> 4) Privacy: the owner of the external server (here: jquery) is able to
> track who is visiting your site. Your visitors might not like this.
>
> Regards,
>
> Rainer
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: mod-jk + ssl: requests are not forward to tomcat correctly

2016-07-11 Thread Wayne Li
> Probably the quickest : download these files, install them on your
server, and change the above links.
Like : create a sub-directory "/js" of your webapp, and install them there.
Then change the above links to : href="js/jquery.mobile-1.4.5.min.css"

Yes. It works. Thanks.

It is okay for now. but, if I do not want host these files, what should I
do? Can you point a direction for me please?

On Mon, Jul 11, 2016 at 12:38 PM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 11.07.2016 19:38, Wayne Li wrote:
>
>> Thank you for quick reply.
>> Thank you for suggest LiveHTTPHeaders for firefox. I just tried. Good. It
>> says that the file was loaded. So I think the problems are in the lines
>> of:
>>
>>http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"/>
>>http://code.jquery.com/jquery-1.11.3.min.js&quot</a>;>
>>http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js&quot</a>;>
>>
>> These lines could not be forwarded under ssl? What should I do?
>> Thanks.
>>
>
> Probably the quickest : download these files, install them on your server,
> and change the above links.
> Like : create a sub-directory "/js" of your webapp, and install them there.
> Then change the above links to : href="js/jquery.mobile-1.4.5.min.css"
>
>
>>
>> On Mon, Jul 11, 2016 at 9:28 AM, André Warnier (tomcat) <a...@ice-sa.com>
>> wrote:
>>
>> On 11.07.2016 15:57, Wayne Li wrote:
>>>
>>> Hi All,
>>>>
>>>>
>>>> Hi. Thanks you for communicating the versions and the configuration
>>> below..
>>> That helps a lot in helping you.
>>>
>>> Can you also provide the version of the mod_jk module ? It should be in
>>> the first line of the Apache httpd error log (when it starts up).
>>>
>>> I have a servlet/jsp application running on tomcat 7.0.47. There are no
>>>
>>>> static html files.
>>>> Now I am try to use apache 2.4.7 (Ubuntu)
>>>> as the front and forwad eveything to tomcat. I installed mod_jk using
>>>> Ubuntu's software
>>>> center.. Things are working: I type "localhost" on my brower bar, it
>>>> shows
>>>> my application.
>>>>
>>>> Then, I also trying to use ssl and generated self-signed certificate. It
>>>> works, because
>>>> the browser warns me about unknown certificate. If I type "
>>>> https://www.mytest.com/index.jsp;
>>>> on the browser's bar, it shows the page. But not correctly: the page
>>>> contains:
>>>>   
>>>>   
>>>> These extra files are not be called.
>>>>
>>>>
>>> Sorry to ask, but *are* these files present, in the same directory as
>>> your
>>> index.jsp page ?
>>>
>>>
>>> What is wrong on my side? Any information would be appreciated. Thank you
>>>
>>>> in advance.
>>>>
>>>>
>>> There is some configuration information missing below : in
>>> /etc/apache2/mods-available, there should be a couple of files : jk.load
>>> and jk.conf.
>>> What is the content of these files ?
>>>
>>>
>>> the /etc/apache2/conf/default-ssl.conf:
>>>> 
>>>>   
>>>> SSLEngine on
>>>> SSLCertificateFile /etc/apache2/ssl/server.crt
>>>> SSLCertificateFile /etc/apache2/ssl/server.crt
>>>>
>>>>
>>> above, duplicate lines ?
>>>
>>>
>>> JkMount /* ajp13_worker
>>>
>>>>   
>>>> 
>>>>
>>>> the /etc/apache2/conf/000-default.conf:
>>>> 
>>>> ServerName localhost
>>>> DocumentRoot /ROOT
>>>> JkMountCopy On
>>>> 
>>>>   JkMount jk-status
>>>>   Order deny,allow
>>>>   Allow from 127.0.0.1,localhost
>>>> 
>>>> 
>>>>   JkMount jk-manager
>>>>   Order deny,allow
>>>>   Allow from 127.0.0.1,localhost
>>>>  
>>>> 
>>>>
>>>> the /etc/apache2/workers/worker.properties:
>>>> workers.tomcat_home=/tomcat
>>>> workers.java_home=/jdk8
>>>> ps=/
>>>> worker.list=ajp13_worker
>>>> worker.ajp13_worker.port=8009
>>>> 

Re: mod-jk + ssl: requests are not forward to tomcat correctly

2016-07-11 Thread Wayne Li
Thank you for quick reply.
Thank you for suggest LiveHTTPHeaders for firefox. I just tried. Good. It
says that the file was loaded. So I think the problems are in the lines of:

  http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"/>
  http://code.jquery.com/jquery-1.11.3.min.js&quot</a>;>
  http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js&quot</a>;>

These lines could not be forwarded under ssl? What should I do?
Thanks.


On Mon, Jul 11, 2016 at 9:28 AM, André Warnier (tomcat) <a...@ice-sa.com>
wrote:

> On 11.07.2016 15:57, Wayne Li wrote:
>
>> Hi All,
>>
>>
> Hi. Thanks you for communicating the versions and the configuration below.
> That helps a lot in helping you.
>
> Can you also provide the version of the mod_jk module ? It should be in
> the first line of the Apache httpd error log (when it starts up).
>
> I have a servlet/jsp application running on tomcat 7.0.47. There are no
>> static html files.
>> Now I am try to use apache 2.4.7 (Ubuntu)
>> as the front and forwad eveything to tomcat. I installed mod_jk using
>> Ubuntu's software
>> center.. Things are working: I type "localhost" on my brower bar, it shows
>> my application.
>>
>> Then, I also trying to use ssl and generated self-signed certificate. It
>> works, because
>> the browser warns me about unknown certificate. If I type "
>> https://www.mytest.com/index.jsp;
>> on the browser's bar, it shows the page. But not correctly: the page
>> contains:
>>  
>>  
>> These extra files are not be called.
>>
>
> Sorry to ask, but *are* these files present, in the same directory as your
> index.jsp page ?
>
>
> What is wrong on my side? Any information would be appreciated. Thank you
>> in advance.
>>
>
> There is some configuration information missing below : in
> /etc/apache2/mods-available, there should be a couple of files : jk.load
> and jk.conf.
> What is the content of these files ?
>
>
>> the /etc/apache2/conf/default-ssl.conf:
>>
>>  
>>SSLEngine on
>>SSLCertificateFile /etc/apache2/ssl/server.crt
>>SSLCertificateFile /etc/apache2/ssl/server.crt
>>
>
> above, duplicate lines ?
>
>
>JkMount /* ajp13_worker
>>  
>>
>>
>> the /etc/apache2/conf/000-default.conf:
>> 
>>ServerName localhost
>>DocumentRoot /ROOT
>>JkMountCopy On
>>
>>  JkMount jk-status
>>  Order deny,allow
>>  Allow from 127.0.0.1,localhost
>>
>>
>>  JkMount jk-manager
>>  Order deny,allow
>>  Allow from 127.0.0.1,localhost
>> 
>> 
>>
>> the /etc/apache2/workers/worker.properties:
>>workers.tomcat_home=/tomcat
>>workers.java_home=/jdk8
>>ps=/
>>worker.list=ajp13_worker
>>worker.ajp13_worker.port=8009
>>worker.ajp13_worker.host=localhost
>>worker.ajp13_worker.type=ajp13
>>worker.ajp13_worker.lbfactor=1
>>worker.loadbalancer.type=lb
>>worker.loadbalancer.balance_workers=ajp13_worker
>>worker.list=jk-status
>>worker.jk-status.type=status
>>worker.jk-status.read_only=true
>>worker.list=jk-manager
>>worker.jk-manager.type=status
>>
>>
> That workers.properties looks old, and contains some deprecated lines :
> >workers.tomcat_home=/tomcat
> >workers.java_home=/jdk8
>
> Also, you do not have a load-balancing setup, so I suggest to simplify the
> above and just have the following in worker.properties :
>
> >worker.list=ajp13_worker
> >worker.ajp13_worker.port=8009
> >worker.ajp13_worker.host=localhost
> >worker.ajp13_worker.type=ajp13
>
> You can find this here :
> http://tomcat.apache.org/connectors-doc/common_howto/quick.html
> -> Minimum workers.properties
>
> If you need the rest, you can re-add it later.
>
> Another recommendation : use the browser feature (or plugin or add-on)
> that allows you to see the exact dialog between the browser and the server
> (HTTP requests, HTTP responses, status codes, HTTP headers etc.). That will
> immensely simplify the debugging work.
> For example, in Mozilla Firefox I use "LiveHTTPHeaders",
> and with IE, I use "Fiddler2".
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


mod-jk + ssl: requests are not forward to tomcat correctly

2016-07-11 Thread Wayne Li
Hi All,

I have a servlet/jsp application running on tomcat 7.0.47. There are no
static html files.
Now I am try to use apache 2.4.7 (Ubuntu)
as the front and forwad eveything to tomcat. I installed mod_jk using
Ubuntu's software
center.. Things are working: I type "localhost" on my brower bar, it shows
my application.

Then, I also trying to use ssl and generated self-signed certificate. It
works, because
the browser warns me about unknown certificate. If I type "
https://www.mytest.com/index.jsp;
on the browser's bar, it shows the page. But not correctly: the page
contains:


These extra files are not be called.
What is wrong on my side? Any information would be appreciated. Thank you
in advance.

the /etc/apache2/conf/default-ssl.conf:
  

  SSLEngine on
  SSLCertificateFile /etc/apache2/ssl/server.crt
  SSLCertificateFile /etc/apache2/ssl/server.crt
  JkMount /* ajp13_worker

  

the /etc/apache2/conf/000-default.conf:

  ServerName localhost
  DocumentRoot /ROOT
  JkMountCopy On
  
JkMount jk-status
Order deny,allow
Allow from 127.0.0.1,localhost
  
  
JkMount jk-manager
Order deny,allow
Allow from 127.0.0.1,localhost
   


the /etc/apache2/workers/worker.properties:
  workers.tomcat_home=/tomcat
  workers.java_home=/jdk8
  ps=/
  worker.list=ajp13_worker
  worker.ajp13_worker.port=8009
  worker.ajp13_worker.host=localhost
  worker.ajp13_worker.type=ajp13
  worker.ajp13_worker.lbfactor=1
  worker.loadbalancer.type=lb
  worker.loadbalancer.balance_workers=ajp13_worker
  worker.list=jk-status
  worker.jk-status.type=status
  worker.jk-status.read_only=true
  worker.list=jk-manager
  worker.jk-manager.type=status