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 174476 - startup detection issues
Summary: startup detection issues
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-13 17:16 UTC by m_potociar
Modified: 2009-10-19 18:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
invalid startup failure detected by NB (357.86 KB, image/png)
2009-10-14 11:31 UTC, m_potociar
Details
after clicking "refresh" - startup detected (431.05 KB, image/png)
2009-10-14 11:32 UTC, m_potociar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_potociar 2009-10-13 17:16:43 UTC
Steps taken:
1. I have downloaded and installed GFv3 b65 and created 2 domains (domain1, domain2)
2. I have registered these 2 domains with NB
3. I have downloaded and installed GFv3 b66 and created 2 domains (domain1, domain2)
     - an important fact to note is that while "domain1" domains in both GFv3 b65 and b66 is configured to use same
ports, domain2 in each GFv3 build has a random port assigned => the port configurations are not equal for "domain2" domains

4. I have registered these 2 domains with NB too
5. I have started both GFv3 b65 domains via NB
6. I have stopped both GFv3 b65 domains via NB
7. I have tried to start both GFv3 b66 domains.

Observed behavior:
After Step 7 the NB detects correctly that "domain1" has started (probably because it has the same port config). But
when I start the "domain2", I can see that it has started properly but NB fails to detect it and displays a dialog with
a message saying that "domain2" start has failed on port XXXX, where the port number is obviously wrongly taken from the
GFv3 b65 "domain2" config.

Workaround:
Restart NB. After restart I am able to start both GFv3 b66 domains. Again, it would be a problem to subsequently start
domains from multiple GFv3 installations and another restart of NB would be required between the attempts.
Comment 1 Vince Kraemer 2009-10-13 17:41:06 UTC
which NB build?
Comment 2 m_potociar 2009-10-13 17:57:33 UTC
Product Version: NetBeans IDE 6.8 M2 (Build 200910071658)
Java: 1.6.0_15; Java HotSpot(TM) 64-Bit Server VM 14.1-b02-92
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)
Comment 3 Vince Kraemer 2009-10-13 18:16:12 UTC
what were the directory names of the two installations?

did you use NB to create the b65/domain2 and b66/domain2?
Comment 4 Vince Kraemer 2009-10-13 20:25:43 UTC
I followed your steps with a recently pulled build of web-main.

I installed b66 and b67.
I registered domain1 from each
I created and registered a domain2 from each.

I started the b66 domains
I stopped the b66 domains
I started the b67 domains

I started b66 domain2, while b67 domain2 was running.

I confirmed that there were actually two independent servers running by deploying an app to one of them and confirming
that it did not appear on the other one...

I do not know what would have changed between these builds that would account for this.

I know that the M2 code and the trunk split around Sept. 26... and folks have been busy fixing issues in the trunk.

Please try this test with a recent dev build of 6.8.  If you still run into trouble. please reopen this issue with
appropriate details.
Comment 5 m_potociar 2009-10-13 21:58:47 UTC
1. Directory names are not relevant IMHO. Anyway, they are "$HOME/dev/glassfish/glassfishv3-b65" and
"$HOME/dev/glassfish/glassfishv3-b66".

2. Domains have been created outside NB via a custom script.

3. Please confirm that the domains you are starting have been created outside NB, bear the same physical name (e.g.
"domain2") and have different network listener ports configured in their domain.xml files. Once that is confirmed I will
proceed with reinstalling NB and retesting. I am rather reluctant to start with that without your confirmation as I have
already lots of other tasks on my plate. I am sure you can understand it :)
Comment 6 Vince Kraemer 2009-10-13 23:07:30 UTC
1. you never know when there might be a relevant detail...

2. okay. another detail that is worth knowing.

3. I just created two domains using asadmin create-domain --portbase X domain4 (since I had used domain2 already, and
forgot to use portbase the first time I called create domain...) where X=10000 for the domain4 associated with b66 and
X=20000 for the other domain4...

Again, the four domains started up correctly, and I had both domain4's running at the same time... started by the IDE.

You mentioned a script that you use to create the domains... could you attach it to this issue (or provide more details
about the 'relevant portion'... where you call asadmin create-domain)
Comment 7 m_potociar 2009-10-14 11:30:39 UTC
Here's the domain creation part of the script:

        <exec executable="${asadmin}" failonerror="true">
            <arg line="create-domain"/> 
            <arg line="--user admin"/>
            <arg line="--adminport 4849"/>
            <arg line="--savemasterpassword=true"/>
            <arg line="--passwordfile=${javaee.server.passwordfile}"/>
            <arg line="domain2"/>
        </exec>

Anyway, I have tested the issue with latest NB Dev build - Product Version: NetBeans IDE Dev (Build 200910140201) - and
I cannot reproduce it now. What I still see however is that NB fails to detect the GF startup (see attached screenshots).  
Comment 8 m_potociar 2009-10-14 11:31:45 UTC
Created attachment 89424 [details]
invalid startup failure detected by NB
Comment 9 m_potociar 2009-10-14 11:32:45 UTC
Created attachment 89425 [details]
after clicking "refresh" - startup detected
Comment 10 Vince Kraemer 2009-10-14 17:15:15 UTC
change summary to reflect current focus of issue.
Comment 11 Vince Kraemer 2009-10-15 17:30:45 UTC
it looks like you did two things... entered authentication data and hit refresh...

Q: do both domains have passwords or just domain2?
Comment 12 Vince Kraemer 2009-10-15 17:54:05 UTC
NOTE: you may want to change your ant script a little bit...

replace 

--adminport 4849

with 

--portbase XYZ

Why? --adminport just changes the value of the admin port for a domain... the other ports (like 8080) still overlap.

The resulting config may be a bit tangled and hard to figure out if both domains are executing at the same time...

Note: if you use portbase value of 10000, the selected ports are...
Using port 10048 for Admin.
Using port 10080 for HTTP Instance.
Using port 10076 for JMS.
Using port 10037 for IIOP.
Using port 10081 for HTTP_SSL.
Using port 10038 for IIOP_SSL.
Using port 10039 for IIOP_MUTUALAUTH.
Using port 10086 for JMX_ADMIN.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=dhcp-usca14-133-43.SFBay.Sun.COM,OU=GlassFish,O=Sun Microsystems,L=Santa Clara,ST=California,C=US]

Comment 13 Vince Kraemer 2009-10-19 18:35:22 UTC
I am not able to reproduce this with 200910170201.

Here is what I did...

install 200910170201
create a domain in the glassfish-v3-b68 directory tree that uses port 4849 for its admin port.
i started the ide
   domain1 was registered automagically -- as expected.
I registered domain2
I started domain1... it started correctly.
I stopped domain1... it shutdown correctly.
I started domain2...
  The process for domain2 started.
  The authentication dialog appeared... I entered the authentication information.
  The IDE detected that the start-up was successful.

IF you wait, and do not enter the authentication info, the IDE cannot assume that domain2 is started, since it is unable
to validate that the process that is responding on the admin port actually IS the domain...
   So, it will say that the domain2 startup failed...

Once the authentication info is entered correctly, the IDE can control domain...

Closing as works for me.