On 2/13/12 11:40 AM, modjklist_at_comcast.net wrote:
> Hello, I just joined the mailing list and coincidently saw one of my
> forum posting
> <http://www.java.net/forum/topic/glassfish/glassfish/need-help-glassfish-install-front-ended-apache2-modjk#comment-822065>
> appear at users_at_glassfish.java.net after I edited it. I now realize
> people on the mailing list may reply to the forum posting having only
> viewed the last posting in the forum. Thus I'm writing this email to
> try to summarize the complete question in one email. I'll continue to
> update my forum posting based on whatever I learn. One thing I don't
> know is if this email will trigger a new forum posting (in which case
> I'll close the original forum posting).
>
> I have a new CentOS 6.2 server with fresh installs of GlassFish 3.1.1,
> Apache 2.2.21, mod_jk 1.2.32, and using the bug fix grizzly tar file
> (see here
> <http://java.net/jira/browse/GLASSFISH-17068?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel>)
> to get mod_jk working. I'm using the recommended hello.war file to
> verify correct operation. This application runs fine when accessed
> externally over the internet.
>
> However, I notice one type of SEVERE error in my server.log file,
> which occurs multiple times. The error appears every time I restart
> the domain (that is, asadmin> restart-domain --port 4850). At the
> bottom of this email, I cut-and-pasted a snippet of the server.log
> file showing this error, and I've attached the domain.xml file as well
> in case it helps.
>
> QUESTION 1: How to eliminate the SEVERE errors for...
>
> |No class name for worker.worker1 worker|
>
> QUESTION 2: How to remove the WARNING related to:
> |threadpool.max_threads_too_low|.
>
> Which thread pool are they referring to? If I type: # asadmin>
> list-threadpools server
> admin-thread-pool
> http-thread-pool
> thread-pool-1
> I changed the http-thread-pool max size from 5 to 200 in the admin
> web-console then restarted the domain, but this had no effect on the
> WARNING message in server.log shown below. How to remove this warning?
>
> QUESTION 3: The official Administration Guide uses the following lines
> to bring up GlassFish:
> asadmin> deploy /path/to/file/hello.war --port 4850
> asadmin> create-http-listener --listenerport 8009 --listeneraddress 0.0.0.0 --defaultvs server gf_listener --port 4850
> asadmin> create-network-listener --protocol http-listener-1 --listenerport 8009 --jkenabled true jk-connector --port 4850
> asadmin> set server-config.network-config.network-listeners.network-listener.jk-connector.jk-configuration-file=/home/glassfish/glassfish3/glassfish/domains/domain1/config/glassfish-jk.properties --port 4850
> asadmin> restart-domain --port 4850
> I obtained the above lines from: go
> tohttp://docs.oracle.com/cd/E18930_01/html/821-2416/
> <http://www.java.net/external?url=http://docs.oracle.com/cd/E18930_01/html/821-2416/> and
> click on the PDF link, turn to page 151 and see Steps 5 and 6, which
> shows the above sequence. However, Amy's blog
> <http://weblogs.java.net/blog/amyroh/archive/2009/06/running_glassfi.html> (http://weblogs.java.net/blog/amyroh/archive/2009/06/running_glassfi.html)
> only creates http-listener (not a network-listener), and the set
> command is different between the two. I assume the 3.1.1 documentation
> to be more relevant than Amy's blog, since this blog was written in
> 2009. Would LOVE to know which method is officially recommended. Here
> is Amy's sequence:
> asadmin> deploy /path/to/file/hello.war --port 4850
> asadmin> create-http-listener --listenerport 8009 --listeneraddress 0.0.0.0 --defaultvs server jk-connector --port 4850
> asadmin> set configs.config.server-config.network-config.network-listeners.network-listener.jk-connector.jk-enabled=true --port 4850
> asadmin> restart-domain --port 4850
I read the doc again and I agree it could be misleading to use both
create-http-listener and create-network-listener. You should use either
and not both. I've talked to the doc person and he will update this
section to be more clear in the 3.1.2 release.
All you need to do is the following with 3.1.1 if you're not using
glassfish-jk.properties file.
(1) asadmin create-network-listener--protocol http-listener-1
--listenerport 8009 --jkenabled true jk-connector
(2) restart GF
That's it.
> If I use the 3.1.1 documentation, I'm not quite sure why I need to
> issue a create-http-listener as well as a create-network-listener.
> Could someone explain when one is used versus the other and if they're
> always both required, etc.? I couldn't find information regarding this
> anywhere, so I'm following the 3.1.1 Administrative Guide document to
> the letter. Anyway, I tried both methods, and they both result in the
> same problems noted above, except the 3.1.1 documentation's method
> duplicates the SEVERE errors twice (once for each of http-listener and
> network-listener), whereas Amy's method simply has SEVERE errors for
> the http-listener.
>
> Here's what I placed in httpd.conf:
> LoadModule jk_module /etc/httpd/modules/mod_jk.so
> JkWorkersFile /home/glassfish/glassfish3/glassfish/domains/domain1/config/glassfish-jk.properties
> JkLogFile /etc/httpd/logs/mod_jk.log
> JkLogLevel debug
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> ...
> Listen 0.0.0.0:80
>
> The glassfish-jk.properties file is:
>
> worker.list=worker1
> worker.worker1.type=ajp13
> worker.worker1.host=localhost
> worker.worker1.port=8009
> maxThreads=256
I didn't see that you set
network-listener.jk-configuration-file=glassfish-jk.properties above.
This isn't necessary and you can just put workers info in apache/conf.
Do you have the following workers.properties in apache/conf?
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
I'd suggest the following -
* Copy the above workers.properties in apache/conf
* Restart Apache
* Delete all jk listeners you created (or start with clean domain.xml)
* asadmin create-network-listener--protocol http-listener-1
--listenerport 8009 --jkenabled true jk-connector
* Restart GF
Let me know if you still get errors.
Amy
> I followed Amy's method to bring up the GlassFish domain (see above),
> and as soon as GlassFish comes up, I look at the server.log file.
> Here's a snippet showing SEVERE error for "No class name for
> worker..." and WARNING for threadpool.max_threads_too_low (and my
> desperate plea for help):
>
> [#|2012-02-13T09:58:34.900-0800|INFO|glassfish3.1.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=Thread-2;|Registered
> org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
> persistence-type = replicated in Bac
>
> kingStoreFactoryRegistry|#]
>
> [#|2012-02-13T09:58:35.676-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Thread-2;|Grizzly
> Framework 1.9.36 started in: 48ms - bound to [0.0.0.0:8080]|#]
>
> [#|2012-02-13T09:58:35.676-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=12;_ThreadName=Thread-2;|Grizzly
> Framework 1.9.36 started in: 15ms - bound to [0.0.0.0:3700]|#]
>
> [#|2012-02-13T09:58:35.676-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=14;_ThreadName=Thread-2;|Grizzly
> Framework 1.9.36 started in: 26ms - bound to [0.0.0.0:4850]|#]
>
> [#|2012-02-13T09:58:35.676-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=11;_ThreadName=Thread-2;|Grizzly
> Framework 1.9.36 started in: 10ms - bound to [0.0.0.0:7676]|#]
>
> [#|2012-02-13T09:58:35.676-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=15;_ThreadName=Thread-2;|Grizzly
> Framework 1.9.36 started in: 31ms - bound to [0.0.0.0:8181]|#]
>
> [#|2012-02-13T09:58:35.747-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=10;_ThreadName=Thread-2;|The
> Admin Console is already installed, but not yet loaded.|#]
>
> [#|2012-02-13T09:58:36.098-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0169:
> Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]
>
> [#|2012-02-13T09:58:36.111-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0169:
> Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]
>
> [#|2012-02-13T09:58:36.121-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0169:
> Created HTTP listener [admin-listener] on host/port [0.0.0.0:4850]|#]
>
> [#|2012-02-13T09:58:36.140-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0170:
> Apache mod_jk/jk2 attached to virtual-server [server] listening on
> port [8,009]|#]
>
> [#|2012-02-13T09:58:36.178-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0171:
> Created virtual server [server]|#]
>
> [#|2012-02-13T09:58:36.181-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0171:
> Created virtual server [__asadmin]|#]
>
> [#|2012-02-13T09:58:36.829-0800|INFO|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=10;_ThreadName=Thread-2;|WEB0172:
> Virtual server [server] loaded default web module []|#]
>
> [#|2012-02-13T09:58:37.005-0800|SEVERE|glassfish3.1.1|org.apache.jk.server.JkMain|_ThreadID=10;_ThreadName=Thread-2;|No
> class name for worker.worker1 worker|#]
>
> [#|2012-02-13T09:58:37.005-0800|SEVERE|glassfish3.1.1|org.apache.jk.server.JkMain|_ThreadID=10;_ThreadName=Thread-2;|No
> class name for worker.worker1 worker|#]
>
> [#|2012-02-13T09:58:37.005-0800|SEVERE|glassfish3.1.1|org.apache.jk.server.JkMain|_ThreadID=10;_ThreadName=Thread-2;|No
> class name for worker worker|#]
>
> [#|2012-02-13T09:58:37.006-0800|SEVERE|glassfish3.1.1|org.apache.jk.server.JkMain|_ThreadID=10;_ThreadName=Thread-2;|No
> class name for worker.worker1 worker|#]
>
> [#|2012-02-13T09:58:37.006-0800|INFO|glassfish3.1.1|org.apache.jk.common.ChannelSocket|_ThreadID=10;_ThreadName=Thread-2;|JK:
> ajp13 listening on /0.0.0.0:8009|#]
>
> [#|2012-02-13T09:58:37.012-0800|WARNING|glassfish3.1.1|org.apache.tomcat.util.threads.ThreadPool|_ThreadID=10;_ThreadName=Thread-2;|threadpool.max_threads_too_low|#]
>
> [#|2012-02-13T09:58:37.026-0800|INFO|glassfish3.1.1|org.apache.jk.server.JkMain|_ThreadID=10;_ThreadName=Thread-2;|Jk
> running ID=0 time=0/32 config=null|#]
>
> [#|2012-02-13T09:58:37.603-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=10;_ThreadName=Thread-2;|core.start_container_done|#]
>
> [#|2012-02-13T09:58:37.892-0800|INFO|glassfish3.1.1|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=10;_ThreadName=Thread-2;|SEC1002:
> Security Manager is OFF.|#]
>