Created attachment 138864 [details]
Please try following steps:
- install (from installator) trunk NetBeans, full distribution with bundled GlassFish4
- run NetBeans, create e.g. Java Web project and run it
- quit NetBeans and uninstall them (remove user dir and NetBeans installation dir, but KEEP Glassfish installed)
- install the same NetBeans again, this time GF is recognized as already installed
- start NetBeans, create a new Java Web project
- previously installed GF is automatically added to list of available servers (it is the only one there)
- run the application
- you are asked to provide some password for username "admin", press Cancel (I've tried OK as well though)
=> action fails (but GS is actually running).
<html>GlassFish Server 4.0 start failed<br/>Please check server admin user name and password properties.<br/>Also please check the server log file for other possible causes.</html>
/home/vriha/NetBeansProjects/WebApplication7/nbproject/build-impl.xml:1045: Deployment error: <html>GlassFish Server 4.0 start failed<br/>Please check server admin user name and password properties.<br/>Also please check the server log file for other possible causes.</html>
See the server log for details.
I was told that during the first installation, some admin password is created (and indeed the first IDE instance shows some random string in server's properties dialog), but this information is somehow lost with removing userdir and if I open server's properties dialog in the 2nd installation, password field is empty.
This is imho quite confusing. Workaround seems to be again register the server with creating a new domain, but this is hard to discover. I'd vote for P2 but I'm really not sure.
Product Version: NetBeans IDE Dev (Build 201308182300)
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b39
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Created attachment 138865 [details]
(In reply to Vladimir Riha from comment #0)
> => action fails (but GS is actually running).
I'm sorry, I've ment GF, GlassFish is running
Well, this was requested by security team in GF4. So I did it.
Password is stored in Keyring so it's lost when Keyring is removed.
Server properties UI allows user to see this password (what I think is a security hole) but I got an order to do it this way.
So yes, GF is started because no password is required to start GF task. Unfortunately plugin is unable to run a single asadmin command without proper password so it's impossible to verify that running server is the one being started.
Possible solution is to allow password reset. Workaround is to read password ater it's generated and update properties after netbeans are reinstalled.
But I don't consider this as a bug.
I'm fine with some/any workaround but I think there could be some help to tell user what to do.
Yes, but I'm unable to find out why password is missing. I just see auth failure response from asadmin interface on GF -> this will open credentials popup and block startup scans.
But there is no way to proceed when this is cancelled. That's why current popup window is talking about credentials and log file.
Adding Peter Hejl into cc because he was implementing this too. Maybe he was already solving similar problem with his plugin and can come with some idea.
The only thing on my mind is to allow killing the server process and resetting password for domain. There is already code to support this in the plugin. I need to add server node menu items for those actions.
Checked into web-main:
summary: #234594 - GlassFish server process kill support
This is not activated yet, because there is some inconsistency when server is killed while StartTask is still running.
I need to modify StartTask to handle cancel event and there shall not be any active StartTask when KillTask is being started.
Unfortunately this is opening quite commin problem with all server lifecycle tasks. Currently there is no 100% reliable way to controll how many such tasks are running. But there shall be only one, otherwise terrible race condition with server life cycle may happen (one taks is starting it, second one restarting and another one killin git).
Also all sasks shall be able to exit silently without sending any events when cancelled.
I'm targeting this for next release. It's too late to trwrite lifecycle tasks week before code freeze.