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 189133 - GlassFish: default ports
Summary: GlassFish: default ports
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Other
: P2 normal with 1 vote (vote)
Assignee: Vince Kraemer
Depends on:
Reported: 2010-08-02 16:25 UTC by puce
Modified: 2011-11-16 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

a proposed modification to the registration wizard (61.72 KB, image/png)
2010-08-18 17:14 UTC, Vince Kraemer

Note You need to log in before you can comment on or make changes to this bug.
Description puce 2010-08-02 16:25:30 UTC
Under certain conditions, NetBeans creates GlassFish domains with non-default ports.

Show why the default ports couldn't be used, provide a way to resolve this if possible and a way to reset the domain to the defaults ports.
Comment 1 Vince Kraemer 2010-08-02 16:31:08 UTC
Please describe the 'certain conditions' a bit more clearly.
Comment 2 puce 2010-08-02 16:38:47 UTC
I don't know the exact cause. I just know it happens.

Eg. I had this issue last December on Linux:

And now on Windows 7. I uninstalled GlassFish, reinstalled it and registered it in NetBeans.

But either NetBeans or GlassFish seems to know the cause, otherwise the default ports would have been used. That's why I said this cause should be display along with ways to resolve and reset it.
Comment 3 Vince Kraemer 2010-08-02 19:09:04 UTC has a bit of background on this.

The primary reason for choosing non-default ports is to try to avoid situations where the user tries to start their server on a machine that has a server already running...
Comment 4 Vince Kraemer 2010-08-02 22:45:00 UTC
What issue are you running into due to the use of the non-default ports?

Instruction on how to reproduce your results would be very useful.
Comment 5 puce 2010-08-03 09:17:23 UTC
In December I had an issue where on Linux the non-default ports were set when running NetBeans as non-root user (I installed NetBeans and GlassFish to /opt as root. My user doesn't have and shouldn't have write access rights there.) (

This time, on Windows 7, the non-default ports were set when choosing a non-default location for the domain, though I reinstalled GlassFish and rebooted my system.

I tried now with the default domain location (to which fortunatly I have enough rights, although I installed GlassFish with "Run as Administrator") and it worked.

So there are 3 different possible location:
- in a subdirectory of the installation dir (users usually shouldn't have write access there)
- in a subdirectory of ".netbeans" in the user dir
- custom location

Some of them cause NetBeans/ GlassFish to set non-default ports.

Non-default ports are harder to remember and can cause problems with expected defaults such as with "new InitialContext()"

You can reset them manually in the admin console, but you need to know where to look and what the default ports are. That's why a reset option should be available.
Comment 6 puce 2010-08-03 09:25:07 UTC
The link you mentioned addresses the access rights problems, but not the port problems. And it is a bit out-dated as well, as the wizard looks different with NetBeans v6.9 (which reminds me that the "Register Local Domain" should have a directory chooser)
Comment 7 Vince Kraemer 2010-08-18 17:14:58 UTC
Created attachment 101496 [details]
a proposed modification to the registration wizard

Does this meet your expectations?
Comment 8 puce 2010-08-18 17:56:41 UTC
Hi Vince,

Altough this doesn't show you why it wouldn't use the default ports without that checkbox by default (there might be a problem if you just force the default ports but there was a good reason not to select them) and although it doesn't provide you a way to reset an existing configuration to use the default ports (which still could be useful), I guess this solution is sufficient for now, as it allows you to force the usage of the default ports at creation time.

Maybe just one point: it probably would be good to check this checkbox by default. What do you think?
Comment 9 Vince Kraemer 2010-08-18 19:17:33 UTC

I think I will make the following change to the default value logic of the CB.

Check to see if you can follow it and it makes sense to you.

The checkbox will be selected and enabled iff there is not a process currently using 4848, 8080, etc.  The user may unselect it to get the 'random port' behavior.

If the checkbox is disabled it will also be in the unselected state. The tooltip for the checkbox will provide a hint on 'why'.
Comment 10 puce 2010-08-19 07:11:22 UTC
Sounds good.

I'm only wondering if the "why" information as tooltip is enough. Do you see another place where you could display it as well? For me the tooltip is fine, since I know now that I have to look at the tooltip but another user might miss that. I'm not an UI expert though. Maybe it's really enough.
Comment 11 Quality Engineering 2010-08-20 03:11:21 UTC
Integrated into 'main-golden', will be available in build *201008200001* on (upload may still be in progress)
User: Vince Kraemer <>
Log: #189133: allow user to create a domain with the default ports.
Comment 12 Vince Kraemer 2010-08-20 04:25:58 UTC
please reopen this issue with any notes you may have if this change did not suffice