Bug 221075 - NetBeans fails to start GlassFish
NetBeans fails to start GlassFish
Status: VERIFIED FIXED
Product: serverplugins
Classification: Unclassified
Component: GlassFish
7.3
PC All
: P1 (vote)
: 7.3
Assigned To: TomasKraus
issues@serverplugins
73beta2-stopper-fixed
: REGRESSION, THREAD
: 221212 230496 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-30 10:51 UTC by tim_sa
Modified: 2013-08-03 23:09 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
IDE logs (136.81 KB, application/octet-stream)
2012-10-30 10:52 UTC, tim_sa
Details
GlassFish Logs (655.33 KB, application/octet-stream)
2012-10-30 10:55 UTC, tim_sa
Details
Ide Log2 (752.23 KB, application/octet-stream)
2012-10-30 14:12 UTC, tim_sa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim_sa 2012-10-30 10:51:08 UTC
[ BUILD # : 201210300001 ]
[ JDK VERSION : <1.7.7 ]

When trying to start my web application I get presented with the following
error message "GlassFish Server 3.1.1 Start Failed"

If I start glassfish using 'asadmin start-domain domain1' and then run my web
application from NetBeans then the web app is succesfully deployed and run.
Comment 1 tim_sa 2012-10-30 10:52:10 UTC
Created attachment 126768 [details]
IDE logs
Comment 2 tim_sa 2012-10-30 10:55:01 UTC
Created attachment 126769 [details]
GlassFish Logs
Comment 3 TomasKraus 2012-10-30 13:20:14 UTC
It looks like process was not started at all. 

 * Is it first 7.3 build that you were testing, or was it working fine with some previous builds?
 * How did you start GlassFish from NetBeans?
 * What exactly did you see in GlassFish log window in GUI?

Please add -J-Dglassfish.level=0 -J-Dorg.glassfish.tools.ide.level=0
options into netbeans_default_options in your netbeans config file (etc/netbeans.conf) and reproduce this issue again. This will produce more detailed logs to let me know what exactly is happening.

Message
[GlassFish Server 3.1.1] Could not connect to localhost:4848: Connection refused: connect
is from new server status check that I finished yesterday. At this point I'm not sure if there is a problem in this test itself or GlassFish did not start at all.
Comment 4 tim_sa 2012-10-30 14:10:10 UTC
>  * Is it first 7.3 build that you were testing, or was it working fine with
> some previous builds?

It was working with previous builds, most recently 201210240001

>  * How did you start GlassFish from NetBeans?
I selected the projected and tried to run it. When this failed I went to Services -> Servers -> GlassFish Server 3.1.1 -> start
>  * What exactly did you see in GlassFish log window in GUI?

The title was "Information"
the message was "GlassFish Server 3.1.1 Start Failed"
 
> Please add -J-Dglassfish.level=0 -J-Dorg.glassfish.tools.ide.level=0
> options into netbeans_default_options in your netbeans config file
> (etc/netbeans.conf) and reproduce this issue again. This will produce more
> detailed logs to let me know what exactly is happening.
> 
> Message
> [GlassFish Server 3.1.1] Could not connect to localhost:4848: Connection
> refused: connect
> is from new server status check that I finished yesterday. At this point I'm
> not sure if there is a problem in this test itself or GlassFish did not start
> at all.

I observed the following when modifying netbeans_default_options

When I added '-J-Dglassfish.level=0 -J-Dorg.glassfish.tools.ide.level=0' to netbeans_default_options 
then GlassFish launched succesfully.

When I added '-J-Dorg.glassfish.tools.ide.level=0' to netbeans_default_options then GlassFish launched succesfully.

When I added '-J-Dglassfish.level=0' to netbeans_default_options then GlassFish failed to launch.
I will attach the IDE Log for this last case.
Comment 5 tim_sa 2012-10-30 14:12:09 UTC
Created attachment 126777 [details]
Ide Log2

-J-Dglassfish.level=0 argument set
Comment 6 TomasKraus 2012-10-30 14:39:42 UTC
OK, looks like server was started but did not respond fast enough. Maybe adding -J-Dorg.glassfish.tools.ide.level=0 slows something down to get glassfish additional time to finish startup.

Unfortunately without -J-Dorg.glassfish.tools.ide.level=0 output I can only guess.
Can you try to put some load on the machine to slow it down and run it with -J-Dorg.glassfish.tools.ide.level=0  again?

This is the only way to see server status check results.
Comment 7 TomasKraus 2012-10-30 15:10:07 UTC
Anyway, I'll raise startup timeout from 2 to 10 minutes.

GlassFish Tooling SDK:
----------------------
changeset:   343:beb80b3513ed
date:        Tue Oct 30 16:08:59 2012 +0100
summary:     Startup timeout raised to 10 minutes

Everything is pointing to this as cause of your problem.
Comment 8 TomasKraus 2012-10-31 11:02:03 UTC
Please try to test it with last build on 
http://bertram2.netbeans.org:8080/job/web-main/9050/

It should give GlassFish 10 minutes to start instead of 2.
Comment 9 Jiri Skrivanek 2012-10-31 11:53:20 UTC
It works only if there is no application deployed on GlassFish. If I create web app with REST web services from DB, run it once, stop server and then it fails when I try to run it again. Unfortunately I cannot reproduce it with logging.
Comment 10 tim_sa 2012-10-31 12:53:46 UTC
(In reply to comment #8)
> Please try to test it with last build on 
> http://bertram2.netbeans.org:8080/job/web-main/9050/
> 
> It should give GlassFish 10 minutes to start instead of 2.

I've just tried this build the problems still occurs.
I think it's worth noting that from starting the server to getting the failure to start message approximately 10 seconds have elapsed.

Also If I open the Task Manager I can see the GlassFish process running, until the  Failure dialog pops up, and then it disappears. 

Will try with the arguements provided previously to see if i can get anything to log.
Comment 11 Petr Hejl 2012-10-31 16:38:07 UTC
Tomasi, this looks like threading issue. Happened to me twice randomly.

For these type of issues (race conditions) it is typical that enabling of logging will semi-synchronizes the code and issue disappears.
Comment 12 TomasKraus 2012-11-01 07:12:54 UTC
Yes, it may be some race condition. I'll go trough this code later today again and I'll check for them.
Comment 13 Marian Mirilovic 2012-11-01 08:14:21 UTC
*** Bug 221212 has been marked as a duplicate of this bug. ***
Comment 14 muellermi 2012-11-01 10:18:49 UTC
see issue 221106 (NB wont stop web app, even thought Shift-Ctrl-F5 is pressed. Might this be related to or reason for current bug?
Comment 15 Petr Hejl 2012-11-01 10:23:47 UTC
My guess is this changeset caused regression: 9779fccf6693.

What is not really ok the changeset contains two unrelated things and that "Server status check rewritten from scratch" does not really sound like anything which is related to mentioned issue #220316 and which should be done in a bug fixing phase (unless justified by defect in server status check).
Comment 16 TomasKraus 2012-11-01 15:00:22 UTC
GlassFish Tooling SDK:
----------------------
changeset:   348:12166bc5d922
summary:     Bug# 221075 - NetBeans fails to start GlassFish: Fixed
             tasks timeout calculation.

NetBeans web-main:
------------------
changeset:   237814:4d0bd0580541
summary:     #221075 - NetBeans fails to start GlassFish: Fixed tasks
             timeout calculation.
Comment 17 TomasKraus 2012-11-01 15:29:27 UTC
Please test Bug# 221101 - Run process not finished together with this fix.
Comment 18 Marian Mirilovic 2012-11-01 15:45:08 UTC
Could somebody port the fix into release73_beta2 branch in releases repository ASAP ?! Thanks in advance.
Comment 19 Petr Jiricka 2012-11-01 15:59:55 UTC
Pushed to release73_beta2 branch: http://hg.netbeans.org/releases/rev/8f1154b4cd3f
Comment 20 Petr Jiricka 2012-11-01 16:03:35 UTC
One question about the patch: I see the SDK is still b29 as it was before - shouldn't the SDK build number be incremented? with changes like this?
Comment 21 Petr Hejl 2012-11-01 16:08:48 UTC
BTW I believe status.close() should be called in finally block.
Comment 22 TomasKraus 2012-11-01 21:41:19 UTC
I updated b29 hash too to make beta2 transplate simple.
There should already be b30 in web-main.
Comment 23 TomasKraus 2012-11-01 21:47:04 UTC
...and yes, close should be in finally block. I'll change it in web-main.
But we can keep beta2 as it is now, all expected exceptions thrown by tasks are already handled so it won't miss close outside finally.
Comment 24 Quality Engineering 2012-11-02 03:29:46 UTC
Integrated into 'main-golden', will be available in build *201211020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4d0bd0580541
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #221075 - NetBeans fails to start GlassFish: Fixed tasks timeout calculation.
Comment 25 Jiri Skrivanek 2012-11-02 10:04:47 UTC
It works for me in build 201211020001. tim_sa, could you please verify?
Comment 26 Quality Engineering 2012-11-02 10:52:34 UTC
Integrated into 'releases', will be available in build *201211020750* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/8f1154b4cd3f
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #221075 - NetBeans fails to start GlassFish: Fixed tasks timeout calculation.
Comment 27 tim_sa 2012-11-02 11:18:11 UTC
confirm as resolved
Comment 28 muellermi 2012-11-02 12:04:27 UTC
works for me
thanks
Comment 29 TomasKraus 2012-11-02 13:16:13 UTC
NetBeans web-main:
------------------
changeset:   238040:4faea3368ab7
summary:     #221075 -  Moved close() call to finally block

This is trunk only checkin to make sure there won't be any mess left.
Comment 30 Petr Jiricka 2012-11-02 14:36:55 UTC
Per agreement with Jirka transplanted the latest changeset to release73_beta2: http://hg.netbeans.org/releases/rev/59346aaa9998
Comment 31 Quality Engineering 2012-11-03 02:42:20 UTC
Integrated into 'main-golden', will be available in build *201211030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4faea3368ab7
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #221075 -  Moved close() call to finally block
Comment 32 Quality Engineering 2012-11-04 23:12:46 UTC
Integrated into 'releases', will be available in build *201211042000* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/59346aaa9998
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #221075 -  Moved close() call to finally block
Comment 33 TomasKraus 2013-08-03 23:09:43 UTC
*** Bug 230496 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo