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 60856 - Unable to start Appserver in non-default domain from Netbeans
Summary: Unable to start Appserver in non-default domain from Netbeans
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: _ ludo
URL:
Keywords:
: 60884 62334 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-12 09:17 UTC by Jaroslav Pospisil
Modified: 2006-03-24 12:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2005-07-12 09:17:22 UTC
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.
Comment 1 Sherold Dev 2005-07-12 10:18:25 UTC
moving to sunappserv
Comment 2 chris_loftus 2005-07-12 14:38:50 UTC
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


Comment 3 Petr Blaha 2005-07-12 14:50:06 UTC
*** Issue 60884 has been marked as a duplicate of this issue. ***
Comment 4 Jaroslav Pospisil 2005-07-20 13:25:03 UTC
Priority raised because of occurence on more than one platform and also this
scenario is used more often,than supposed first,especially for j2ee.
Comment 5 Vince Kraemer 2005-07-20 23:57:25 UTC
*** Issue 60884 has been marked as a duplicate of this issue. ***
Comment 6 Vince Kraemer 2005-07-21 20:46:53 UTC
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.

Comment 7 _ ludo 2005-08-16 20:41:41 UTC
*** Issue 62334 has been marked as a duplicate of this issue. ***
Comment 8 Vince Kraemer 2005-08-29 17:32:25 UTC
Need to add master password "hint" to the could not start server dialog message.
Comment 9 Vince Kraemer 2005-09-13 01:50:40 UTC
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
Comment 10 _ ludo 2005-10-18 18:12:27 UTC
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.
Comment 11 judytang 2005-10-18 19:49:25 UTC
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 ?
Comment 12 _ ludo 2005-10-19 08:12:49 UTC
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.
Comment 13 _ ludo 2005-10-28 22:59:54 UTC
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


Comment 14 Jaroslav Pospisil 2005-11-01 15:32:39 UTC
Verified in 200510301900