users@glassfish.java.net

Re: how to eliminate SEVERE errors (No class name for worker...) when starting up domain?

From: Amy Roh <amy.roh_at_oracle.com>
Date: Mon, 13 Feb 2012 18:47:58 -0800

On 2/13/12 6:18 PM, modjklist_at_comcast.net wrote:
> Hi Amy,
>
> Thanks for all the help! The SEVERE errors disappeared by including
> the apache/conf/workers.properties file as you expected (yay!).

Great!
>
> I even eliminated the WARNING for threadpool.max_threads_too_low
> because I had mistakenly increased the Default configuration rather
> than the Server configuration's settings in the web console (after I
> increased the server configuration's settings the warning went away).
>
> Some follow-up questions:
>
> 1. Do my final (and complete) configuration settings below look OK?
>
> asadmin> start-domain --port 4850
>
> asadmin> deploy /home/glassfish/apps/hello.war --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> create-jvm-options
> -Dcom.sun.enterprise.web.connector.enableJK.propertyFile=/home/glassfish/glassfish3/glassfish/domains/domain1/config/glassfish-jk.properties
> --port 4850
>
> asadmin> restart-domain --port 4850
>
>
> We didn't talk about the 2nd to last line above (e.g.
> create-jvm-options), but it's mentioned in step 7 here:
> http://docs.oracle.com/cd/E18930_01/html/821-2416/gfaad.html

You don't need the create-jvm-option step. The jvm-option was needed
before since http-listener (unlike network-listener) didn't support
jk-configuration-file attribute.

>
> 2. Can you give specific details on how to exactly set maxThreads
> using the admin console? For example, how to navigate to the screen
> where the setting may be input, and which fields to fill out what, etc.?

Go to Configurations ->server-config -> Thread Pools -> http-thread-pool
-> and edit Max Thread Pool Size.

Amy

>
> Thanks so much, -GKK
>
> ------------------------------------------------------------------------
> *From: *"Amy Roh" <amy.roh_at_oracle.com>
> *To: *users_at_glassfish.java.net
> *Sent: *Monday, February 13, 2012 5:09:37 PM
> *Subject: *Re: how to eliminate SEVERE errors (No class name for
> worker...) when starting up domain?
>
>
>
> On 2/13/12 4:37 PM, modjklist_at_comcast.net wrote:
>
> Hi Amy,
>
> Over the last week I tried to find examples for setting connector
> attributes using glassfish-jk.properties, but could find much.
> Most of the time I see things like this (scroll down to bottom):
>
> http://code.google.com/p/eid-archetype/wiki/UsageJavaEE6
>
> where the ONLY thing inside the glassfish-jk.properties file are
> worker info.
>
> Example 6-5 here
> http://docs.oracle.com/cd/E18930_01/html/821-2416/gfaad.html is
> also misleading when it says "This example shows a
> workers.properties*or glassfish-jk.properties file*that is set for
> mod_jk."
>
>
>
> I see where you're getting mislead. There should be two properties
> files. One for workers (referenced by JkWorkersFilefrom httpd.conf)
> and another one for Connector (referenced by
> server-config.network-config.network-listeners.network-listener.jk-connector.jk-configuration-file).
> The above example uses glassfish-jk.properties as the file name for
> JkWorkersFile to define workers info where I was using
> glassfish-jk.properties name to refer to the other (Connector attributes).
>
> Try adding the following to apache/conf/httpd.conf and add worker info
> in workers.properties
>
> JkWorkersFile conf/workers.properties
>
> Add maxThreads=256 to glassfish-jk.properties and set it either using
> admin console or asadmin set command.
>
> set
> server-config.network-config.network-listeners.network-listener.jk-connector.jk-configuration-file=/home/glassfish/glassfish3/glassfish/domains/domain1/config/glassfish-jk.properties
>
> You can find the format of Properties from
> http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html.
> See load for key/element examples.
>
> I will relay this input to the docs team to update the docs to be more
> clear in the next release.
>
> Thanks,
> Amy
>
>
> Do you have an example glassfish-jk.properties file you could send
> me? I want to see the correct syntax for setting attributes.
>
> For example, should the glassfish-jk.properties file be:
>
> protocol=AJP/1.3
> maxThread=256
>
> or,
>
> protocol="AJP/1.3"
> maxThreads="256"
>
> or something else(?).
>
> Maybe I missed this in the documentation somewhere? Thanks, GKK
>
>
> ------------------------------------------------------------------------
> *From: *"Amy Roh" <amy.roh_at_oracle.com>
> *To: *users_at_glassfish.java.net
> *Sent: *Monday, February 13, 2012 3:56:06 PM
> *Subject: *Re: how to eliminate SEVERE errors (No class name for
> worker...) when starting up domain?
>
>
>
> On 2/13/12 3:38 PM, modjklist_at_comcast.net wrote:
>
> Hi Amy, I'll add a workers.properties file as well (you might
> make a note to clarify this in the Administration Guide). I
> guess this opens the question -- should the
> glassfish-jk.properties file then contain everything the
> workers.properties file contains PLUS the additional
> attributes such as maxThreads (or just those additional
> attributes such as MaxThreads, and not worker.list=worker1,
> worker.worker1.type=ajp13, etc.)?
>
> glassfish-jk.properties is for Connector attributes only so you
> shouldn't put worker info there.
>
>
> Also, I previously used the GlassFish web-console (port 4850
> for me) to manually adjust the "max thread pool size" for
> http-thread-pool from 5 to 200 (which didn't improve the
> thread size warning). Will your recommended command,
>
> I didn't see that you already did this. If you'd done admin
> console to update then asadmin set isn't necessary.
>
> Amy
>
>
> asadmin set
> configs.config.server-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=newvalue'
>
> attempt to do the same thing (assuming I use 200 for "new
> value")? The max size for admin-thread-pool is 50 and
> thread-pool-1 is 200, so none of these 3 thread pools should
> be the issue (that is, unless the thread pool size is supposed
> to update from default values at a time later than the warning
> message issues).
>
> Lastly, I'll use the following commands as mentioned below
> unless you recommend otherwise:
>
> asadmin> delete-http-listener jk-connector
> 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
>
> Thanks, GKK
>
> ------------------------------------------------------------------------
> *
> *
>