This document provides instructions for changing the port that Glassfish uses if it fails to start due to a port conflict. It involves opening the domain.xml file, locating the network listener tags, and changing the port numbers to ones that are not already in use such as 8080 to 8090, 8181 to 8191, and 4848 to 4898. The instructions also describe how to test if the port change was successful by starting Glassfish and checking for a message indicating it is running on the new port.
This document provides instructions for changing the port that Glassfish uses if it fails to start due to a port conflict. It involves opening the domain.xml file, locating the network listener tags, and changing the port numbers to ones that are not already in use such as 8080 to 8090, 8181 to 8191, and 4848 to 4898. The instructions also describe how to test if the port change was successful by starting Glassfish and checking for a message indicating it is running on the new port.
This document provides instructions for changing the port that Glassfish uses if it fails to start due to a port conflict. It involves opening the domain.xml file, locating the network listener tags, and changing the port numbers to ones that are not already in use such as 8080 to 8090, 8181 to 8191, and 4848 to 4898. The instructions also describe how to test if the port change was successful by starting Glassfish and checking for a message indicating it is running on the new port.
This document provides instructions for changing the port that Glassfish uses if it fails to start due to a port conflict. It involves opening the domain.xml file, locating the network listener tags, and changing the port numbers to ones that are not already in use such as 8080 to 8090, 8181 to 8191, and 4848 to 4898. The instructions also describe how to test if the port change was successful by starting Glassfish and checking for a message indicating it is running on the new port.
If
Glassfish
fails
to
start,
then
you
may
have
a
port
conflict.
Check
the
NetBeans
“Glassfish
Server”
tab
and
look
for
the
error
“Address
already
in
use..”
If
that
is
the
problem,
then
follow
the
following
steps
to
change
the
Glassfish
ports:
1. If
the
NetBeans
does
not
have
any
previous
project,
create
a
project
by
clicking
File
à
New
Project
à
Java
Web
à
Web
Application.
Accept
all
defaults.
2. Click
on
the
“Services”
tab
at
the
top
left
of
your
NetBeans
software.
3. Expand
the
server
link
to
find
Glassfish
Server
4. Right
click
on
the
server
and
click
“properties”
5. The
installation
location
is
given
in
“common”
(selected
by
default)”
tab
6. Navigate
to
the
“Domains
Folder”.
Find
the
domain.xml
location
in
the
path
specified
in
the
“Domains
Folder”
field.
7. Open
the
file
in
a
text
editor.
8. Find
(Cntl
+f)
the
“<network-‐listeners>”
tag
in
the
domain.xml.
You
should
look
for
3
tags:
“<network-‐listener
protocol="http-‐listener-‐1"
port="8080"
name="http-‐ listener-‐1"
thread-‐pool="http-‐thread-‐pool"
transport="tcp"></network-‐ listener>
<network-‐listener
protocol="http-‐listener-‐2"
port="8181"
name="http-‐listener-‐2”
thread-‐pool="http-‐thread-‐pool"
transport="tcp"></network-‐listener>
<network-‐listener
protocol="admin-‐listener"
port="4848"
name="admin-‐listener"
thread-‐pool="admin-‐thread-‐pool"
transport="tcp"></network-‐listener>”
9. Change
the
port
=
parameter
from
8080
to
8090,8181
to
8191
and
4848
to
4898.
10. Please
note
that
the
actual
port
numbers
may
vary
dependent
on
whether
you
have
a
default
installation
or
not.
The
aim
of
the
exercise
is
to
change
the
port
to
one
that
does
not
conflict
with
installations/processes
already
running
on
your
system.
Testing:
To
test
if
the
port
has
been
changed:
1. Select
the
“Services”
tab
in
the
left
corner
of
NetBeans.
2.
Right
click
on
Glassfish
Server
and
selecting
“Start”
3. Glassfish
server
starts.
Select
the
Glassfish
Server
tab
in
the
output
window
at
the
left
bottom
of
NetBeans.
4. Look
for
a
message
similar
to
this:
“Info:
Created
HTTP
listener
http-‐listener-‐1
on
host/port
0.0.0.0:8090”
5. If
you
get
the
above
message,
GlassFish
is
running
on
port
9090.