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 200507101930 NB4.1,Sun Java Studio Application server 8.1 update 2 1) start NB with clean userdir 2) add SJS appserver instance 3) start/stop server with default server domain(domain1) 3) create new domain and start/stop from command line - I've created the domain sampleDomain exactly as written in help example for 'create-domain' asadmin command,admin port number 7070.I was able to start and stop it from command line without any problem. 4) add and start the new domain from NetBeans. ERROR: Server start fails and error message appears.There's no output neither in netbeans's server output nor server.log file.
moving to sunappserv
I create a new domain with the command line command: M:\>asadmin create-domain --domaindir M:\domains --adminport 4849 --adminuser admin newdom Please enter adminpassword> Please enter adminpassword again> Please enter the master password> Please enter the master password again> Default port 8080 for HTTP Instance is in use. Using 3,530 Default port 7676 for JMS is in use. Using 3,532 Using default port 3,700 for IIOP. Using default port 8,181 for HTTP_SSL. Default port 3820 for IIOP_SSL is in use. Using 3,536 Default port 3920 for IIOP_MUTUALAUTH is in use. Using 3,538 Default port 8686 for JMX_ADMIN is in use. Using 3,540 Domain newdom created. The same password was used for admin as for master admin. I then started newdom from the command line: M:\>asadmin start-domain --domaindir M:\domains newdom Starting Domain newdom, please wait. Log redirected to M:\domains\newdom\logs\server.log. Please enter the master password> Domain newdom is ready to receive client requests. Additional services are being started in background. The server.log file indicated that it had started successfully. I then stopped it manually: M:\>asadmin stop-domain --domaindir M:\domains newdom Domain newdom stopped. I then added newdom as a new application server from Netbean's Runtime->Servers element Sun Java System Application Server 8.1 (1) Location enetered: localhost:4849 Domains folder: M:\domain Instance name: newdom User name: admin Password: same as entered for create-domain This added newdom successfully. I then tried to start newdom from netbeans. The server status bar progressed slowly but nothing was written to the log and it did not start. The command issued by netbeans was: C:\Program Files\netbeans-4.1\SunAppServer8.1\bin\asadmin.bat start-domain -- domaindir M:\domains newdom Eventually I received a dialog box saying Sun app server could not start regards Chris Loftus
*** Issue 60884 has been marked as a duplicate of this issue. ***
Priority raised because of occurence on more than one platform and also this scenario is used more often,than supposed first,especially for j2ee.
root cause: the plugin doesn't play well with domains that are created outside the IDE. The master password is a big part of that. When the user creates a domain that has a non-default master password, the plugin doesn't ask the user for the password when the instance is registered. work-around: add the following to the create-domain command, "--adminpassword <your password goes here>". This will warn you that your domain may be less secure, since somebody might have seen you enter the plain-text password (and it might get logged, to boot). The other side-effect of using the --adminpassword option/argument/whatever is that the domain that you create will use a default master password, that start-domain doesn't need to prompt for.... If you want to convert your existing domain into one that is startable from netbeans, you can do the following: asadmin change-master-password --savemasterpassword=true --domaindir M:\domains newdom This will prompt for the old masterpassword and for a new masterpassword (twice). The start-domain command will use the stored masterpassword, instead or prompting for it.
*** Issue 62334 has been marked as a duplicate of this issue. ***
Need to add master password "hint" to the could not start server dialog message.
updated message http://www.netbeans.org/source/browse/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/Bundle.properties?r1=1.3&r2=1.4 Resolving this requires changes to the server registration UI. Deferred to future release. lowering the priority
I think we have time to finally fix this issue in our startserver logic. Now we detect that the master password is not saved, and we currently use the "changeit" default, which is not a good idea. In this case, we should now popup a dialog asking for the master password (and explain what it is, and also how to save it). This will improve a lot our EE story both for 8.1 and 9.0 servers. The change is simple. I'll work on it.
Thanks Ludo. One security question came to my mind. In CLI, we use --passwordfile to save all the passwords, we deprecate the --password option for the security reason. I wonder if pop up a window asking for the master password can have security exposure ? If so, may be we can consider using a file to save the master password just like what CLI does ?
the reason why CLI needs this option is because one ca do a ps -aef to get the list of all the processes and their CLI arguments (that would include the password). There is no such risk when run from an IDE ui, so this is safe.
We now ask for master pw is it is not known at server start. Checking in sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/StartSunServer.java; /cvs/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/StartSunServer.java,v <-- StartSunServer.java new revision: 1.14; previous revision: 1.13 done
Verified in 200510301900