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 195214 - Ability to change listen port
Summary: Ability to change listen port
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 03:23 UTC by _ gtzabari
Modified: 2011-02-09 06:04 UTC (History)
0 users

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 _ gtzabari 2011-02-09 03:23:10 UTC
It isn't immediately obvious how to deal with the fact that the Glassfish port is in use (not by Glassfish, but by some other system service). In this case, we should be able to modify the listen port directly from within Netbeans without having to shut down the other service or launch Glassfish admin console.
Comment 1 _ gtzabari 2011-02-09 03:30:55 UTC
By the way, modifying Glassfish' configuration files directly doesn't help because Netbeans still launches webapps against port 8080.
Comment 2 Vince Kraemer 2011-02-09 04:18:07 UTC
(In reply to comment #0)
> It isn't immediately obvious how to deal with the fact that the Glassfish port
> is in use (not by Glassfish, but by some other system service). In this case,
> we should be able to modify the listen port directly from within Netbeans
> without having to shut down the other service or launch Glassfish admin
> console.

This reads like an enhancement request...

Since there isn't a clear set of steps that lead to being blocked and/or something going boom, I am going to switch it...

Additional details will help clarify the situation and help create a better solution.
Comment 3 Vince Kraemer 2011-02-09 04:21:38 UTC
(In reply to comment #1)
> By the way, modifying Glassfish' configuration files directly doesn't help
> because Netbeans still launches webapps against port 8080.

That sounds like a real problem... can you describe what steps you followed to end up in this situation.

Note... I recently made changes in the plugin to deal with http port changes... so I may have missed something.  Or, this may have been fixed already.... Without details, I can only guess at what your particular situation is.
Comment 4 _ gtzabari 2011-02-09 04:29:09 UTC
1. Attempt to launch Glassfish with port 8080 in use. You'll get an error.
2. Shut down Netbeans. Open "C:\Program Files\glassfish-3.1-b37\glassfish\domains\domain1\config\domain.xml" and replace port 8080 with 8081.
3. Launch Netbeans. Notice that Glassfish will now launch properly but Netbeans still thinks it is bound to port 8080 so it will launch the browser against the wrong port.

As for the first part, I agree it is an enhancement request.
Comment 5 Vince Kraemer 2011-02-09 04:31:10 UTC
(In reply to comment #4)
> 1. Attempt to launch Glassfish with port 8080 in use. You'll get an error.
> 2. Shut down Netbeans. Open "C:\Program
> Files\glassfish-3.1-b37\glassfish\domains\domain1\config\domain.xml" and
> replace port 8080 with 8081.
> 3. Launch Netbeans. Notice that Glassfish will now launch properly but Netbeans
> still thinks it is bound to port 8080 so it will launch the browser against the
> wrong port.
> 
> As for the first part, I agree it is an enhancement request.

Which IDE build are you using?
Comment 6 Vince Kraemer 2011-02-09 06:04:38 UTC
I committed these changes a few days ago...
 
http://hg.netbeans.org/main-golden/rev/d4aa818d4897

They might have addressed this.

Here is the test that I did:

installed 201102080000 dev build with TC and GF

I created a web app that targeted GF.

I ran the app.
   the IDE started the GF server and the browser opened on localhost:8080
  the app ran successfully.

I stopped GF.

I changed the tc config to start on 8080 and started TC.
   it started successfully

I attempted to start GF.
  it failed to start.

I attempted to run the app I had created earlier.
   the run was not successful, because the server could not start.

I edited domain.xml and set the server to start on 8081 instead of 8080.

I ran the app and the browser opened on localhost:8081.
  the app ran successfully.

Please reopen this issue if you have a detailed set of steps that you can share that demonstrate the problem in a recent dev build of the IDE