Skip to main content

admin port 4848 already used

19 replies [Last post]
Anonymous

Hi everybody,

I got a problem when I want to launch glassfish v3 on debian5. It was
working very well but since yesterday it doesn't anymore. I got this error
message when I use asadmin start-domain:

"There is a process already using the admin port 4848 -- it probably is
another instance of a GlassFish server.
Command start-domain failed."

I saw on this forum that other people had this problem and I tried to use
what they said (change admin port) but it doesn't work.

Here is my server.log:
------
04-janv.-2010 16:45:58 com.sun.enterprise.admin.launcher.GFLauncherLogger
info
INFO: JVM invocation command line:
/usr/lib/jvm/java-6-sun/bin/java
-cp
/home/phil/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=/home/phil/glassfishv3/glassfish/domains/domain1/logs/jvm.log
-Xmx512m
-client
-javaagent:/home/phil/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/home/phil/glassfishv3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/home/phil/glassfishv3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/home/phil/glassfishv3/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/home/phil/glassfishv3/glassfish/domains/domain1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dosgi.shell.telnet.ip=127.0.0.1
-Djava.endorsed.dirs=/home/phil/glassfishv3/glassfish/modules/endorsed:/home/phil/glassfishv3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/home/phil/glassfishv3/glassfish
-Djava.ext.dirs=/usr/lib/jvm/java-6-sun/lib/ext:/usr/lib/jvm/java-6-sun/jre/lib/ext:/home/phil/glassfishv3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/home/phil/glassfishv3/glassfish/domains/domain1/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/home/phil/glassfishv3/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dfelix.fileinstall.debug=1
-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false
-Djava.library.path=/home/phil/glassfishv3/glassfish/lib:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
start-domain
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/home/phil/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-domaindir
/home/phil/glassfishv3/glassfish/domains/domain1
-read-stdin
true
--------

Tell me if you need more information.

Thanks
--
View this message in context: http://old.nabble.com/admin-port-4848-already-used-tp27014914p27014914.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jnduan
Offline
Joined: 2006-10-17

just add

127.0.1.1 your-host-name

to /etc/hosts

then it will just be fine.

Mal0mb0
Offline
Joined: 2014-05-12

Thanks jnduan, your solution worked for me.

I added $HOSTNAME=myHostName in /etc/profile.
Then put the myHostName in /etc/hosts as you say and the domain was able to start.

cyanide_bunny
Offline
Joined: 2008-09-10

FYI, that didn't work for me.

Am running Debian Squeeze on new laptop and had same problem bringing up GlassFish.

Realized the problem was i had no internet access via java, i.e. was back to an earlier problem with ipv6 which was introduced during an update sometime back in Jan 2010. There is now an ipv6-only switch in netbase that is set in [b]/etc/sysctl.d/bindv6only.conf.[/b]

need to update this file and change net.ipv6.bindv6only from 1 to 0, then restart the network. after that, Glassfish started fine.

read about it here in its entirety

http://www.eclipse.org/forums/index.php?t=msg&goto=505058&#msg_505058

Deepu Syamaladevi Janardhananachary (UST, IND)

Hi,

Search the port 4848 in domain.xml and change it to some other value say 4849
Then try to restart. On trying to start, it will show again the same error with different port number
Search again that port in the domain.xml and change it to some other value
Continue this process to some 3 or 4 times
Finally, the server will get start without any problem.

Regards,
Deepu Janardhananachary

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Monday, April 19, 2010 9:16 AM
To: users@glassfish.dev.java.net
Subject: Re: admin port 4848 already used

FYI, that didn't work for me.

Am running Debian Squeeze on new laptop and had same problem bringing up GlassFish.

Realized the problem was i had no internet access via java, i.e. was back to an earlier problem with ipv6 which was introduced during an update sometime back in Jan 2010. There is now an ipv6-only switch in netbase that is set in [b]/etc/sysctl.d/bindv6only.conf.[/b]

need to update this file and change net.ipv6.bindv6only from 1 to 0, then restart the network. after that, Glassfish started fine.

read about it here in its entirety

http://www.eclipse.org/forums/index.php?t=msg&goto=505058&#msg_505058
[Message sent by forum member 'cyanide_bunny']

http://forums.java.net/jive/thread.jspa?messageID=397701

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Hassan Schroeder

On Mon, Jan 4, 2010 at 10:56 AM, HowHigH wrote:

> I got a problem when I want to launch glassfish v3 on debian5. It was
> working very well but since yesterday it doesn't anymore. I got this error
> message when I use asadmin start-domain:
>
> "There is a process already using the admin port 4848 -- it probably is
> another instance of a GlassFish server.
> Command start-domain failed."
>
> I saw on this forum that other people had this problem and I tried to use
> what they said (change admin port) but it doesn't work.

So It's probably exactly what the error message says -- did you try
to check whether or not another instance was running? That would
be the first step, rather than trying to reconfigure your installation...

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

HowHigH

...
LOL you are surely a genious... it's the first thing I did and check if the
port was free too...

--
View this message in context: http://old.nabble.com/admin-port-4848-already-used-tp27014914p27016672.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Dominik Dorn

> ...
> LOL you are surely a genious... it's the first thing I did and check if the
> port was free too...
>
you are running linux/unix?

run
netstat -atunp | grep 4848
and you see which process is using port 4848.

also note, its quite impolite how you respond to other users trying to help
you.

--
Dominik Dorn
http://dominikdorn.com
[att1.html]

HowHigH

Dominik Dorn wrote:
>
>> ...
>> LOL you are surely a genious... it's the first thing I did and check if
>> the
>> port was free too...
>>
> you are running linux/unix?
>
> run
> netstat -atunp | grep 4848
> and you see which process is using port 4848.
>
> also note, its quite impolite how you respond to other users trying to
> help
> you.
>
> --
> Dominik Dorn
> http://dominikdorn.com
>
>

have you read what i wrote? no other process is using this port...
i've already done all theses checks.
It was a mistake to ask help when i see the answers..
I did the barbare way ==> reinstall the network part and it's ok

--
View this message in context: http://old.nabble.com/admin-port-4848-already-used-tp27014914p27026722.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Ludovic Champenois

HowHigH wrote:
>
> Dominik Dorn wrote:
>
>>> ...
>>> LOL you are surely a genious... it's the first thing I did and check if
>>> the
>>> port was free too...
>>>
>>>
>> you are running linux/unix?
>>
>> run
>> netstat -atunp | grep 4848
>> and you see which process is using port 4848.
>>
>> also note, its quite impolite how you respond to other users trying to
>> help
>> you.
>>
>> --
>> Dominik Dorn
>> http://dominikdorn.com
>>
>>
>>
>
> have you read what i wrote? no other process is using this port...
> i've already done all theses checks.
> It was a mistake to ask help when i see the answers..
> I did the barbare way ==> reinstall the network part and it's ok
>
>
Great.
What is the "network part" and how do you reinstall it?
Ludo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

arshadm
Offline
Joined: 2009-05-07

HI,

I had the same problem. This is a generic error when Glassfish can't bind to port 4848 on all the interfaces on the computer for some reason.

In my case it was a poorly configured dns server that gave the wrong ip address on dns lookup for the hostname defined on the machine.

You can bind to a specific IP address in domain.xml if you still can't figure out what the problem was.

This is assuming of course that you don't genuinely have another instance running !!!

Regards.

tonyar
Offline
Joined: 2010-02-02

I had this same problem, after moving a server from one subnet to another.

I had forgotten to update /etc/hosts with the new IP address, and got this same error.

Glassfish was obviously tying to bind to the address in /etc/hosts instead of the actual network interface.

When it couldn't do that, I got this "admin port 4848 already used" error.

I spent about 15 minutes checking with netstat / lsof and couldn't find anything using that port.

I also checked for the Java process using ps and Glassfish wasn't even running!

This appears to be poorly written software, in that it can't present a decent error message. Why couldn't it simply state something like "unable to bind to IP x.x.x.x"? Instead of issuing this stupidly obscure error message?

Apparently it doesn't even check the processes to see if it is running!

carilda
Offline
Joined: 2011-12-02

Using Fedora 15. Get port 4848 already in use when I do start-domain.

Netstat and lsof show nothing on the port. I rebooted; can't see anything running that would consume the port.

Tried changing the port number in asadmin - doesn't work because I'm not logged in or something.

Tried changing port number in domain.xml - doesn't make any difference - same error message.

Tried creating another domain with a different port - won't let me do it.

I don't understand why the command line interface needs a port to perform actions.

Please help. I'm an experienced C++ person trying to learn Java and doing some of the Sun courses but they require NetBeans, which requires Glassfish and I am at an impasse.

Thank you all.

c

eve2
Offline
Joined: 2007-01-05

Hi,

why don't you install a fresh one. Download an executable version and install. During the installation process, you are giving the chance to change the default port numbers. Change all of it including the admin console.

http://glassfish.java.net/

EVE

On 2 Dec 2011, at 22:50, forums@java.net wrote:

> Using Fedora 15. Get port 4848 already in use when I do start-domain.
>
> Netstat and lsof show nothing on the port. I rebooted; can't see anything
> running that would consume the port.
>
> Tried changing the port number in asadmin - doesn't work because I'm not
> logged in or something.
>
> Tried changing port number in domain.xml - doesn't make any difference - same
> error message.
>
> Tried creating another domain with a different port - won't let me do it.
>
> I don't understand why the command line interface needs a port to perform
> actions.
>
> Please help. I'm an experienced C++ person trying to learn Java and doing
> some of the Sun courses but they require NetBeans, which requires Glassfish
> and I am at an impasse.
>
> Thank you all.
>
> c
>
>
> --
>
> [Message sent by forum member 'carilda']
>
> View Post: http://forums.java.net/node/699886
>
>
>

flotho
Offline
Joined: 2009-08-25

Hy,

I've got exactly the same problem last week.
The problem was coming from the fact that my machine has a name that is
not listed in the /etc/hosts file.
Finally, I only add for ewample :
/$hostname
ubuntu
$ cat /etc/hosts
...
::1 ubuntu localhost6.localdomain6 localhost6
127.0.1.1 ubuntu.ubuntu-domain ubuntu
/
And everythink work fine finally,

Regards

Le 02/12/2011 23:50, forums@java.net a écrit :
> Using Fedora 15. Get port 4848 already in use when I do start-domain.
>
> Netstat and lsof show nothing on the port. I rebooted; can't see anything
> running that would consume the port.
>
> Tried changing the port number in asadmin - doesn't work because I'm not
> logged in or something.
>
> Tried changing port number in domain.xml - doesn't make any difference
> - same
> error message.
>
> Tried creating another domain with a different port - won't let me do it.
>
> I don't understand why the command line interface needs a port to perform
> actions.
>
> Please help. I'm an experienced C++ person trying to learn Java and doing
> some of the Sun courses but they require NetBeans, which requires
> Glassfish
> and I am at an impasse.
>
> Thank you all.
>
> c
>
>
> --
>
> [Message sent by forum member 'carilda']
>
> View Post: http://forums.java.net/node/699886
>
>

pgreenii
Offline
Joined: 2012-06-14

This corrected my problem.

I ran
echo $HOSTNAME
Result:
webserver

When I checked /etc/hosts, webserver wasn't there.

I added webserver to the end of the 127.0.0.1 line.

The glassfish domain was able to start.

emailnbw
Offline
Joined: 2008-05-28

Check your /etc/hosts file. There has to be an entry in there pointing to eth0.

-Noah

On Dec 2, 2011, at 5:50 PM, forums@java.net wrote:

> Using Fedora 15. Get port 4848 already in use when I do start-domain.
>
> Netstat and lsof show nothing on the port. I rebooted; can't see anything
> running that would consume the port.
>
> Tried changing the port number in asadmin - doesn't work because I'm not
> logged in or something.
>
> Tried changing port number in domain.xml - doesn't make any difference - same
> error message.
>
> Tried creating another domain with a different port - won't let me do it.
>
> I don't understand why the command line interface needs a port to perform
> actions.
>
> Please help. I'm an experienced C++ person trying to learn Java and doing
> some of the Sun courses but they require NetBeans, which requires Glassfish
> and I am at an impasse.
>
> Thank you all.
>
> c
>
>
> --
>
> [Message sent by forum member 'carilda']
>
> View Post: http://forums.java.net/node/699886
>
>

carilda
Offline
Joined: 2011-12-02

I don't have an eth0 - this is a netbook and I'm only using wlan0.

I thought about /etc/hosts and I futzed with it - my `hostname` is netcat (Yeah, I know, it should be a reserved word). I tried putting in a line for netcat.localdomain using the NAT-ed address - no difference.

Then, I removed that line and just added "netcat" as one of the nicknames on the localhost line. At this point, I got the following:

/0.0.0.0 : 4848 --> FREE

netcat/127.0.0.1 : 4848 --> FREE

localhost/127.0.0.1 : 4848 --> FREE

Waiting for domain1 to start Check for pid file: /usr/local/glassfish3/glassfish/domains/domain1/config/pid

with the "Check for pid file" line repeating several times per second until I ctrl-C-ed. No info about why the domain doesn't start. Any ideas? (Please don't tell me to go plug in an ethernet connection because I'm too far away from the router.) Is there a higher level of debug than AS_DEBUG=TRUE?

Thanks.

c

tmueller
Offline
Joined: 2005-10-31

When running disconnected from the network, it may be helpful to set the
environment variable:

AS_NO_REVERSE_DNS=true

Also, are you running the domain using the same user account that you
used to install it (or what was used when you ran unzip)?
The DAS has to be able to create a the "pid" file in the
glassfish/domains/domain1/config file or asadmin will not realize that
the server has started.

Tom

carilda
Offline
Joined: 2011-12-02

I got the glassfish with the JEE installation from Sun/Oracle which I had installed as effective uid root, real uid myself.

I was attempting to start as effective id root, real id myself.

I chown-ed the full directory tree to myself and tried running as me - no difference. Since I was running as root, I should have been able to write anything anywhere - does glassfish change user to some obscure name? My /etc/passwd file has no new users.

Is there anything else to try? Thx.

c