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.

Bug 233049 - Glassfish started, but shown as stopped
Summary: Glassfish started, but shown as stopped
Status: RESOLVED DUPLICATE of bug 230317
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-19 09:29 UTC by viggonavarsete
Modified: 2013-08-01 13:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of Netbeans showing Glassfish not running (163.30 KB, image/png)
2013-07-19 09:29 UTC, viggonavarsete
Details

Note You need to log in before you can comment on or make changes to this bug.
Description viggonavarsete 2013-07-19 09:29:04 UTC
Created attachment 137430 [details]
Screenshot of Netbeans showing Glassfish not running

I started Glassfish from within Netbeans, opened Admin Console, logged in, changed password and went back to Netbeans again. The server doesn't have the green arrow showing it is running, and when trying to start it, it says it's already started!

Btw, why is the Domains folder pointing to GF3 (assume it means Glassfish 3), when I'm running Glassfish 4?
Comment 1 TomasKraus 2013-07-19 09:41:34 UTC
This is correct.

You have GlassFish 3 local server registered pointing to Glassfish 4 remote domain.
It will not show server as running because your local domain is GF 3 it it is expecting GF 3 on remote side. It will not allow you to start it because admin port is occupied by running GF 4.

Just put the same GF 4 locally and register it again. First 2 version numbers of local and remote server must match (in your case it may be 3.1.2.2 vs. 4.0.0.0) otherwise remote server is not considered as running instance of the same server you have locally.

Server status monitoring was rewritten from scratch and this change is there since 16th July so it may be a bit confusing at the beginning.
Comment 2 viggonavarsete 2013-07-19 09:47:48 UTC
Probably too detailed information for me to digest Tomas:)

What I've done: I've uninstalled previous version of Netbeans 7.4 Beta (yes, I do have a 7.3.1 of Netbeans installed from before, which is still alive), and clicked for installing Glassfish 4 when I installed Netbeans today. I *assumed* the installer would setup everything to work *by default* using the freshly installed Glassfish 4, and if that isn't the case, then THAT is the bug in my point of view.
I haven't fiddled with any settings for Glassfish myself ever, so I shouldn't need it now either I think.
Still consider this to be a bug, somewhere.
Comment 3 viggonavarsete 2013-07-19 10:32:03 UTC
And another thing: If it's true that a local GF3 can't communicate with a remote GF4, why am I able to start the GF4 from Netbeans?
Comment 4 viggonavarsete 2013-07-19 10:40:42 UTC
Short update on my last comment: The startup seems to work, but I get an error message in Netbeans telling me something went wrong, so you might be right, it partly works.

But still, I consider it to be a bug that a clean installation of Netbeans + GF4 doesn't work without modifications (if Netbeans 7.3.x with GF3 exists).
Comment 5 TomasKraus 2013-07-19 10:44:29 UTC
Maybe there is some problem with installer. And maybe I did not understand you
correctly. Check Services tab / Servers node and also  look into properties.
How many servers are registered in your NetBeans? What are their installation
roots and domain roots? Do some of them point also to remote server?

Think best you can do is to delete that server and register GF 4 again
correctly using wizard (Services tab, right click on Servers, select Add).

This looks like installer of NB4 installed GF4 but during server registration
process it mixed old MB 7.3.1 settings of GF 3 with new server record somehow.
So deleting current servers records in NB 7.4 and registering them again is
the best you can do.

I know that installer support for GlassFish needs to be rewritten but
unfortunately there are more important tasks to do now. :(
Comment 6 viggonavarsete 2013-07-19 12:02:53 UTC
Ok, will try what you suggests Tomas. But what do we do about this issue, keep it open to fix the issue with the installer? Maybe you could write a better description of the problem for the (future) developers to use when fixing it?
Comment 7 Stepan Zebra 2013-07-19 12:22:50 UTC
The installer seems to be working right, there is probably just a confusion about the fact that it creates domain under folder named "GF3".
When I perform a full fresh installation, domain for GlassFish 4.0 is created under
${DEFAULT_USERDIR_ROOT}/dev/config/GF3
and for previously installed GlassFish 3.1.2, a domain is created under
${DEFAULT_USERDIR_ROOT}/dev/config/GF3_1
The installer should probably use "GF4" as name of the domain folder for GlassFish 4.0. Should I send a request for this to the installer component?

As for the originally reported problem, I can easily reproduce that. Once I change admin password in the Admin Console, NetBeans doesn't reflect that and as a result the registered Domain in NB looses control over the running server. Can something be done about this?
Comment 8 TomasKraus 2013-07-19 12:41:39 UTC
No, we can't to anything here. Once there is wrong password in NetBeans there is no way to verify that server is running. All I know is that server admin port is busy and I'm getting auth failure responses.

Bug# 230317 will add handle for auth failure responses which will open popup window asking for valid username and password for GF4. But it's not implemented yet. this bug is P2 so it will for sure be in 7.4. Maybe we can close this issue as 230317 duplicate.

Also I would like to implement an option to change admin password on server and update server properties in NetBeans in one shot. But I don't know if there is enough time to implement this for 7.4, this is not that simple.
Comment 9 TomasKraus 2013-07-19 14:36:02 UTC
...also there is even possibility to allow password reset for local server. I already have code that can update key file in server configuration directory.

But all those things shall wait after all P1/P2 bugs will be fixed and number of P3 bugs will be at least under 30. We have to get plugin stable enough first.
Comment 10 TomasKraus 2013-07-22 12:33:42 UTC
Bug# 230317 is fixed now. I'm closing this one as its duplicate.

*** This bug has been marked as a duplicate of bug 230317 ***
Comment 11 Stepan Zebra 2013-08-01 10:17:54 UTC
(In reply to comment #7)
> ...
> When I perform a full fresh installation, domain for GlassFish 4.0 is created
> under
> ${DEFAULT_USERDIR_ROOT}/dev/config/GF3
> and for previously installed GlassFish 3.1.2, a domain is created under
> ${DEFAULT_USERDIR_ROOT}/dev/config/GF3_1
> The installer should probably use "GF4" as name of the domain folder for
> GlassFish 4.0. Should I send a request for this to the installer component?
> ...

Tomas, what convention should be used here? Should the domain folder for GlassFish 4.x be renamed to "GF4"? If yes, will the change be handled on installer side or on your side? Thanks.
Comment 12 TomasKraus 2013-08-01 13:10:01 UTC
Think GF4 is OK.

Some code that is trying to create this directory is in org.netbeans.modules.glassfish.common.GlassfishInstance#getDomainsRoot()
But it uses hard-coded "GF3" for everything.
I'm too busy with P2 bugs now to rewrite it to something based on real server version.
Comment 13 Stepan Zebra 2013-08-01 13:59:48 UTC
(In reply to comment #12)
> Think GF4 is OK.
> 
> Some code that is trying to create this directory is in
> org.netbeans.modules.glassfish.common.GlassfishInstance#getDomainsRoot()
> But it uses hard-coded "GF3" for everything.
> I'm too busy with P2 bugs now to rewrite it to something based on real server
> version.

I opened issue 233789 to track the change. It's not a high priority.