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 93053 - Improve registering domain that is installed with root privileges
Summary: Improve registering domain that is installed with root privileges
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 57023 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-23 16:08 UTC by Petr Blaha
Modified: 2007-03-23 01:44 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch file (14.44 KB, application/octet-stream)
2007-02-07 19:10 UTC, Michal Mocnak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Blaha 2007-01-23 16:08:36 UTC
When the NB+AS bundle is installed on Unix system as root then for non root
users the server isn't registered in IDE. We could try to create new personal
domain in $USERHOME/domain1 directory with default user/password and register
this domain automatically in IDE.
Comment 1 Roman Strobl 2007-01-23 16:21:09 UTC
+1 this is a usability bug.
Comment 2 Vince Kraemer 2007-01-23 16:33:49 UTC
is there any pointer to the thread that exposed this issue?  I would like to
make sure I understand the issue, before implementing a solution.
Comment 3 Petr Blaha 2007-01-26 13:52:53 UTC
The original issue is reported in CR 6509792. The application server is not
registered (serious issue because a large part of features of NetBeans won't
work). I try to configure the application server which was installed by the
installer but it doesn't work - the domain can't be registered.

AS plugin can create personal domain in user's home directory and register it
when the domain can't be read for instance that is specified in
com.sun.aas.installRoot.
Comment 4 Vince Kraemer 2007-01-26 15:57:17 UTC
Please try out the NB 6.0 build with com.sun.aas.installRoot set.

The plugin doesn't create the domain automagically, but it does set the first
page of the wizard up correctly... (prefills the platform location field with
the value from com.sun.aas.installRoot and sets the radio button to be 'Create
Personal Domain'.

Having the plugin create an instance automatically at start up has always been
veto'ed by folks, because of the performance hit...

Could we change the new project wizards to have a step between the "select
project type" page and the "fill in the details" page that would create and
register instances, if they wanted to? 
Comment 5 Petr Blaha 2007-01-26 16:07:40 UTC
I tested this in NetBeans 6.0 (070126) and can confirm that installation
directory is set and also create domain option is used in case the server is
installed with root privileges. Then, user can create personal domain himself. 

It seems as fixed. Can we port this in NetBeans 5.5.1?
Comment 6 Vince Kraemer 2007-01-26 16:21:36 UTC
That fix does not really address this bug, but we can port that fix into 5.5.1...

I want to keep this issue open and try to propose a fix that will address this
issue correctly.

Can I change this to an enhancement?
Comment 7 Petr Blaha 2007-01-26 16:28:14 UTC
The issue was that user doesn't know where the server is installed and also the
wizard doesn't suggest to create personal domain. These issues are addressed now. 

You explained that automatically creation of domain isn't right direction due
performance hence we can't do more. I believe that this might improve usability
for users that start IDE as non-root.

If you think that you are able to find better solution, let's wait for this and
merge the fix in NB 5.5.1 then.
Comment 8 Michal Mocnak 2007-02-07 19:09:23 UTC
I did not read the patch thoroughly, but I think I noticed that you are using
fixed port numbers there. This is wrong. What if the installation is multi-user
environment on a Sun Ray server?

Not sure if we want such a complex change in 5.5.1. Should be very carefully
reviewed and tested.

------- Additional comments from blaha Wed Feb 7 17:16:47 +0000 2007 -------

I don't assume that this change should be in NB 5.5.1 as well. I guess that we
can check ports before domain is created.

------- Additional comments from anebuzelsky Wed Feb 7 18:15:45 +0000 2007 -------

> check ports before domain is created

Could we actually recheck ports every time we are starting the domain and change
them for the domain if they are occupied by someone else at the particular moment?

Still thinking about the SunRay scenario - several students in a class starting
their IDEs one after another and creating the domain at random moments. If we
only check the ports before domain creation, there could still be two IDEs
trying to use the same ports for their domains.

------- Additional comments from mmocnak Wed Feb 7 18:38:20 +0000 2007 -------

Changing ports every time we are starting domain is problem. All ports are
stored in the xml config files in domain. We would have to parse and serialize them.

What we can do is to check ports before domain is created. I will attach updated
patch in a few minutes.
Comment 9 Michal Mocnak 2007-02-07 19:10:00 UTC
Created attachment 38191 [details]
patch file
Comment 10 Vince Kraemer 2007-02-10 01:42:32 UTC
*** Issue 57023 has been marked as a duplicate of this issue. ***
Comment 11 Vince Kraemer 2007-03-23 01:44:19 UTC
A variation of this is integrated into the trunk... 2007-02-16