users@glassfish.java.net

Re: Error in Listener Config

From: Burak Oguz <burak.oguz_at_gmail.com>
Date: Wed, 3 Dec 2008 11:40:27 +0200

Hi Amy,

Indeed my problem is context specific, our deployment conditions and war
files are very different and complicated from usual. The problems are solved
when I deployed a simple war file in RPM post action with asadmin deploy
command. I deployed hello.war from http://*glassfish*.
dev.java.net/downloads/quickstart.

Problem is seemed to be solved now. But now I have a JK + Comet problem
which does not have solution :)* except mod_proxy (I guess in that way at
least.)
*
On Mon, Dec 1, 2008 at 11:27 PM, Amy Roh <Amelia.Roh_at_sun.com> wrote:

> Hi Burak,
>
> I see that you are reporting at least 3 different (might be related)
> issues.
>
> 1. jk connector only works after admin "save" button - at least one webapp
> needs to be deployed in order for jk to work
>
> 2. java.lang.ExceptionInInitializerError when deploying xxx.war
>
> 3. java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.jk.server.JkCoyoteHandler when deploying labris-reports.war
>
> Could you file an issue [1] with your configuration and war files? It'll be
> a great help to debug these issue.
>
> Thanks for the detailed report.
>
> Amy
>
> [1] https://glassfish.dev.java.net/servlets/ProjectIssues
>
> Burak Oguz wrote:
>
>> Hi Jan,
>>
>> We have faced with a different error condition. Let me explain :
>>
>> 1- As you said in your previous e-mail, I tried to deploy one of our war
>> files to activate JK port.
>> 2- I started GFv3 Prelude with the configuration file(domain.xml)
>> attached.
>> 3- When I deploy war file with the command:
>> [root_at_zortt ~]# /opt/sun-glassfish/glassfish/bin/asadmin deploy xxx.war
>> remote failure: java.lang.ExceptionInInitializerError
>>
>> Command deploy failed.
>>
>> It gave me such an error and a detailed stack trace in the log files. I
>> attached that exception's stack trace as exception1.txt. Also Port 8009 did
>> not start.
>> 4- When I tried to deploy war file again in the second and the next times:
>> [root_at_zortt ~]# /opt/sun-glassfish/glassfish/bin/asadmin deploy
>> labris-reports.war
>> remote failure: java.lang.NoClassDefFoundError: Could not initialize class
>> org.apache.jk.server.JkCoyoteHandler
>>
>> Command deploy failed.
>> It gave me a different error. I attached that exception's stack trace as
>> exception2.txt. Also Port 8009 did not start.
>> 5- So I could not deploy any war files and I decided to delete JK by
>> deleting its parameter from domain.xml. This time war is deployed and run as
>> it have to be.
>> 6- Then I completely uninstalled and deleted GF and made a clean install.
>> This time first I entered to Admin GUI. Port 8009 started. Then tried to
>> deploy the war and this time war file deployed succesfully and run as it
>> have to be over JK connector.
>>
>> As a conclusion in my opinion in autodeployment code there is something
>> missing or buggy.
>>
>> Thanks in advance
>>
>> -- Burak
>>
>>
>> On Mon, Nov 24, 2008 at 11:17 PM, Jan Luehe <Jan.Luehe_at_sun.com <mailto:
>> Jan.Luehe_at_sun.com>> wrote:
>>
>> 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
>>>
>>>
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>