users@glassfish.java.net

Re: using asadmin to stop domain running on a specific port number

From: <modjklist_at_comcast.net>
Date: Tue, 3 Jul 2012 18:57:05 +0000 (UTC)

(including list)

Thanks Tom, Here's what I get when I type what you suggested:

[root_at_host9 ~]# netstat -tulpn | grep 4850
tcp 0 0 :::4850 :::* LISTEN 20037/java

Not sure what it means. I know that I setup the GlassFish web administrators console to use port 4850 during installation (instead of default port 4848). So that should be what is using port 4850.

I'm confused though. For whatever reason, I've been using the following to start/stop/restart domain1 (showing restart for example):

adasmin> restart-domain --port 4850

and it has always worked fine. Today when I try it I get:

asadmin> start-domain --port 4850
There is a process already using the admin port 4850 -- it probably is another instance of a GlassFish server.
Command start-domain failed.
asadmin> start-domain domain1 --port 4850
There is a process already using the admin port 4850 -- it probably is another instance of a GlassFish server.
Command start-domain failed.

How would I start domain1?
What's the connection between domain1 and port 4850?



----- Original Message -----
From: "Tom Mueller" <tom.mueller_at_oracle.com>
To: users_at_glassfish.java.net
Cc: modjklist_at_comcast.net
Sent: Tuesday, July 3, 2012 11:44:58 AM
Subject: Re: using asadmin to stop domain running on a specific port number

The list-domains command will only identify domains in the domain
directory that it is operating on. By default, this is the
"glassfish/domains" directory in the install directory for the asadmin
command. However, there is a --domaindir option for list-domains that
allows specifying something else.

The process that you have running on port 4850 could be a GlassFish
server process from another domain that is in a non-default domains
directory, or it could be from a domain from another install of
GlassFish on the same host, or the process could be some completely
different process that happens to be using port 4850.

On Linux, you can use "netstat -tulpn" to find out what process is
listening on a port, i.e.:

$ netstat -tulpn | grep 4850

Tom


On 7/3/2012 1:21 PM, modjklist_at_comcast.net wrote:
> I am observing the following:
>
> asadmin> list-domains
> domain1 not running
> Command list-domains executed successfully.
> asadmin> start-domain domain1 --port 4850
> There is a process already using the admin port 4850 -- it probably is another instance of a GlassFish server.
> Command start-domain failed.
>
> Shouldn't the "list-domains" show running domains on port 4850? Or, more importantly, how do I stop whatever is running on port 4850, so I can start domain1 on that port?