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 229981

Summary: Cannot start GlassFish with password
Product: serverplugins Reporter: Jiri Skrivanek <jskrivanek>
Component: GlassFishAssignee: TomasKraus
Status: VERIFIED FIXED    
Severity: normal CC: mmirilovic, pjiricka
Priority: P1    
Version: 7.3.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 230317    

Description Jiri Skrivanek 2013-05-20 09:11:06 UTC
It is not possible to start GlassFish domain with password. To reproduce (taken from http://wiki.netbeans.org/TS_72_GlassFish "Remote Application Node"):

- add GlassFish 4 (build 87) to IDE
- start server
- add another server instance registered to remote domain localhost:4848
- Right-click server node and choose "View Domain Admin Console"
- In browser click "Change Administrator Password"
- Type new password (e.g. admin) and click Save
- In left menu select "server (Admin Server)"
- Click "Secure Administration..." button
- Click "Enable Secure Admin" and confirm warning dialog
- Wait until server is restarted and return to IDE
- Refresh both "GlassFish Local" and "GlassFish Remote" server nodes but nothing happens. In previous releases it requests user for username and password.
- stop server externally and restart IDE
- start server
- it fails with message "GlassFish Local Start Failed"

Product Version: NetBeans IDE 7.3.1 RC (Build 201305192200)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 1 TomasKraus 2013-05-20 09:37:46 UTC
This was working before. I was testing this many times with older GlassFish builds. Looks like something has changed in new GlassFish.
Comment 2 Petr Jiricka 2013-05-20 09:39:52 UTC
BTW, build 89 is the latest promoted GF 4 build.
Comment 3 TomasKraus 2013-05-20 11:10:32 UTC
I installed GF 4 build 89 from http://javaweb.us.oracle.com/java/re/glassfish/4.0/promoted/b89/archive/bundles/latest-glassfish-unix.sh

And see no problem with this. Maybe you did not update server password in server properties so plugin is unable to sen admin commands to server.
Comment 4 Jiri Skrivanek 2013-05-20 11:14:55 UTC
No, I did not update server properties. As I wrote in description previously it used to prompt for username and password.
Comment 5 TomasKraus 2013-05-20 12:22:23 UTC
It used to work with GF 3 which is responding with valid HTTP response 401 - unauthorized request.
GF 4 broke HTTP handshake and returns HTTP response 200 (OK) with some message in it.
Unfortunately current code is using java.net.Authenticator class to show those pop-up windows and I can't do anything with it except rewritting the whole layer myself. :(
Comment 6 TomasKraus 2013-05-20 12:28:55 UTC
I'll try to find out some as-simple-as-possible solution for 7.3.1 to handle this situation.
Comment 7 TomasKraus 2013-05-21 14:17:41 UTC
Checked into web-main:
----------------------
changeset:   253250:a218d5957ff4
summary:     Bug 229981 - Cannot start GlassFish with password, simple fix for 7.3.1

We can't do more now. Just tell user what is going wrong. Changing property text won't cause any regression.

I'm working on more complex solution for 7.4 but I'll push it later.
Comment 8 TomasKraus 2013-05-21 15:18:20 UTC
Trunk only piece of fix in web-main:
--------------------------------------------
changeset:   253252:a5b5fda41611
summary:     #229981 - GF Tooling Library with auth result support
             in server status check code - trunk only fix

Support in GF Tooling Library to add some username and password popup window into server starup code. It allows to detect authentication issue during server status checks. But it's too much complicated for 7.3.1.
Comment 9 Quality Engineering 2013-05-22 02:37:26 UTC
Integrated into 'main-golden', will be available in build *201305212300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a5b5fda41611
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #229981 - GF Tooling Library with auth result support in server status check code - trunk only fix
Comment 10 Jiri Skrivanek 2013-05-22 08:53:37 UTC
I tried NetBeans IDE Dev (Build 201305212300) and I can see the message from changeset #a218d5957ff4 when you try to start server and registered GlassFish domain is password protected. I agree to put it to release73 branch.

I don't know what is purpose of changeset #a5b5fda41611 but I can't see any change in behaviour.
Comment 11 TomasKraus 2013-05-22 09:33:01 UTC
Yes, #a5b5fda41611 changes nothing at this point. I have to implement 2nd part on netbeans side in 7.4 first.
Comment 12 TomasKraus 2013-05-23 13:01:25 UTC
Pushed into release73 branch
----------------------------
changeset:   261753:637a376a33e1
branch:      release73
summary:     #229981 - Cannot start GlassFish with password, simple fix for 7.3.1

TODO: Implement more complex solution for 7.4
Comment 13 Quality Engineering 2013-05-24 00:12:13 UTC
Integrated into 'releases', will be available in build *201305232200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/637a376a33e1
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #229981 - Cannot start GlassFish with password, simple fix for 7.3.1
Comment 14 Jiri Skrivanek 2013-05-24 07:23:51 UTC
Simple fix verified in NetBeans IDE 7.3.1 (Build 201305232200).
Comment 15 Marian Mirilovic 2013-05-27 11:45:19 UTC
> TODO: Implement more complex solution for 7.4

Please open new bug for trunk integration and keep this one fixed, thanks in advance.