users@glassfish.java.net

Re: Error in Listener Config

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 24 Nov 2008 13:17:00 -0800

Hi Burak,

On 11/22/08 02:05 AM, Burak Oguz wrote:
> Hi Jan,
>
> First let me list rpm building steps I followed:
>
> 1. I installed a new GF v3 Prelude AS.(nightly build 03 Oct 2008)
> 2. I entered Admin GUI from port 4848
> 3. I added a new http-listener to port 8009 and added the property
> jkEnabled = true from the GUI.
> 4. I clicked "Save" button from top right corner of the page.
> 5. Port 8009 started to listen 0.0.0.0 <http://0.0.0.0> (netstat output)
> 6. I restart the domain1 from asadmin command from command line.
> 7. Port 8009 started to listen 0.0.0.0 <http://0.0.0.0> again.
> 8. I checked Apache that if mod_jk is working and I saw it works.
> 9. I took domain.xml from
> glassfishv3-prelude/glassfish/domains/domain1/config/domain.xml
> 10. I downloaded zip version of the GF v3 Prelude AS.(nightly build 03
> Oct 2008).
> 11. From the domain.xml and GFv3 zip I created an RPM package.
> 12. In post install section of RPM, it starts the GFv3.
> 13. Port 8181,4848,.... starts to listen. And I check them via browser.
> 14. Port 8009 does not start to listen.
> 15. I check my domain.xml whether it is correct and contains ajp
> related http listener parameters.
> 16. I see them they are there.
> 17. I browse to Admin GUI to http-listener section. I see there the
> ajp connector as http-listener-1 and registered in virtual servers.
> 18. I click the Save button on the top-right corner of the
> http-listener edit page.
> 19. It starts listen port 8009. And I can use this connector over
> Apache via mod_jk.
>
> And my final question is that. When I click that "Save" button, does
> that click event modifies anything other than domain.xml?
>
> Thanks in advance

Thanks for listing the exact sequence of steps.
This is much clearer now.

As you can see from this code in GrizzlyService#postConstruct:

    String jkEnabled = listener.getPropertyValue("jkEnabled");
    if (jkEnabled!=null && ConfigBeansUtilities.toBoolean(jkEnabled)) {
        continue;
    }

any listeners with jkEnabled set to true are being bypassed when the
v3 kernel is started. Their initialization is deferred to when the web
container is started, which happens when the fist web module
(including the admin gui) is deployed to it.

We should explore if we could move up the initialization of any
listeners with
jkEnabled set to true.

In your current situtation, when you start the domain that contains
the listener with jkEnabled set to true, you should see this listener
getting started as soon as you deploy the first WAR file.

Can you please try this out and let us know?

Thanks,


Jan


>
> - Burak
>
> On Sat, Nov 22, 2008 at 2:55 AM, Jan Luehe <Jan.Luehe_at_sun.com
> <mailto:Jan.Luehe_at_sun.com>> wrote:
>
> Hi Burak,
>
>
> On 11/21/08 07:54 AM, Burak Oguz wrote:
>> Hi all,
>>
>> We are trying to setup Glassfish v3 with mod_jk support. We
>> downloaded a nightly build (03 Oct 2008) and tried to configure
>> domain.xml like Jean-François described in his
>> blog(http://weblogs.java.net/blog/jfarcand/archive/2008/08/fronting_glassf.html).
>> After that we built a rpm package from that distro and domain.xml.
>>
>> We could not make AJP connector work when we try to start/restart
>> GF from console. But when we save the listener configuration
>> from admin interface(4848) by clicking the save button on the top
>> right corner, AJP connector starts to listen 8009.
>
> Can you clarify what you mean by "console"? Normally, this refers
> to the admin gui, but you
> seem to be talking about the command line, and referring to the
> admin gui as the admin interface?
>
> Please list the exact steps you've followed in the case where you
> could not get the AJP connector
> to work.
>
> Thanks,
>
> Jan
>
>
>