This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ 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.
Created attachment 126768 [details] IDE logs
Created attachment 126769 [details] GlassFish Logs
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.
> * 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.
Created attachment 126777 [details] Ide Log2 -J-Dglassfish.level=0 argument set
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.
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.
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.
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.
(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.
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.
Yes, it may be some race condition. I'll go trough this code later today again and I'll check for them.
*** Bug 221212 has been marked as a duplicate of this bug. ***
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?
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).
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.
Please test Bug# 221101 - Run process not finished together with this fix.
Could somebody port the fix into release73_beta2 branch in releases repository ASAP ?! Thanks in advance.
Pushed to release73_beta2 branch: http://hg.netbeans.org/releases/rev/8f1154b4cd3f
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?
BTW I believe status.close() should be called in finally block.
I updated b29 hash too to make beta2 transplate simple. There should already be b30 in web-main.
...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.
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.
It works for me in build 201211020001. tim_sa, could you please verify?
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.
confirm as resolved
works for me thanks
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.
Per agreement with Jirka transplanted the latest changeset to release73_beta2: http://hg.netbeans.org/releases/rev/59346aaa9998
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
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
*** Bug 230496 has been marked as a duplicate of this bug. ***
Sorry for my English. Waaoo after long long time, finally I can find an easy, temporary and not definitive to solve this issue, but it works for me. I can proved in nb 7.x an 8.x for Glassfish 4.x. That solution depends if you have one copy for your original installation domain.xml file, because for some reason Netbeans let it to read this file after you deploy an re-deploy your applications. First stop all your domain instances, if you can do this with Netbeans, do it with asadmin. Steps 1- go to <glassfish directory install>\glassfish\domains\<your domain>\config 2- edit your domain.xml backed file with your <network-listeners> if your domain do not use default ports and if you have more than one domain, maybe you have to edit your <jmx-connector> connection port to avoid conflicts. 3- That is all, now you can start your Netbeans and start your server instance. 4- Now don't forget it. Please Be happy.
As far as I remember, GF4 was not available at the time when I was working on those changes. Unfortunately I moved to another project and my current NetBeans contributions are very limited. :( Anyway, it's good to have some workaround for GF4.