Skip to main content

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

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
9 replies [Last post]
darkice11
Offline
Joined: 2011-02-08

Hi
I wanted start glassfish but whe I executed
./asadmin start-domain domain1
I had an error.....
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server. Command start-domain failed.

--> but I checked the ports, and the port 4848 is free....
--> too checked my /etc/hosts and has add 127.0.0.1 localhost
I could started glassfish from... java -jar ./modules/glassfish.jar but I couldn't started when use asadmin....
could help me?
thanks....!!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
daniil_k
Offline
Joined: 2011-01-09

In my case it didn't worked. I actuall added to my /etc/hosts 127.0.0.1 hana-009, but when I try to ping hana-009 it says 'bad address'. It seems that it prefer to use my dns in a resolv.conf.
I tried to use different port the result the same. I don't know what is wrong with my network configuration.
[hana-009]# ./asadmin start-domain domain1
CLASSPATH= ./../glassfish/modules/admin-cli.jar
Commands: [start-domain, domain1]
asadmin extension directory: /media/raid/apps/glassfishv3/glassfish/lib/asadmin
Parsing program options
params: {}
operands: [domain1]
Using local password
Setting password to: <non-null>
asadmin --host localhost --port 4848 --interactive=true --echo=false --terse=false start-domain --debug=false --help=false --upgrade=false --verbose=false domain1
/0.0.0.0 : 4848 --> FREE
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed.
[hana-009]#

itdude
Offline
Joined: 2008-02-20

Make sure the hostname (cat /etc/hostname) shows up in the hosts file (/etc/hosts) for 127.0.0.1/localhost
Sven

daniil_k
Offline
Joined: 2011-01-09

I try to run the glassfish on a linux power pc machine and I got the same results.
Did you solve the issue?
Regards,

WU LI Guest
Offline
Joined: 2011-04-25

I met this issue before on a SUSE11. I modified "localhost" to my real
host name in the /etc/hosts file where mapping the IP and host name.
And the problem resolved. Hope it helps.

# i modified this line
127.0.0.1 localhost

On 4/25/2011 3:29 PM, forums@java.net wrote:
> I try to run the glassfish on a linux power pc machine and I got the
> same
> results.
>
> Did you solve the issue?
>
> Regards,
>
>
> --
>
> [Message sent by forum member 'daniil_k']
>
> View Post: http://forums.java.net/node/734001
>
>

Chris_QSS
Offline
Joined: 2013-08-29

Yes, WU LI is correct, I did the modification for /etc/hosts, it worked, but a new error was brought.

Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Error occurred during initialization of VM
java/lang/ClassNotFoundException: error in opening JAR file /asinstall/glassfish3/glassfish/modules/endorsed/._jaxb-api-osgi.jar

Could someone help me for this new error?

Thanks

bouteill
Offline
Joined: 2004-07-02

Did you verify you don't have an instance of GlassFish already running? Do a jps as root to make sure.

darkice11
Offline
Joined: 2011-02-08

yes I made sure that no other instance of glassfish....
just started with java -jar ./modules/glassfish.jar but didn't start with asadmin....

redhat19
Offline
Joined: 2012-01-31

I'm largely facing the same problem here. I just tried starting glassfish using the java -jar method @darkice11 described here and here's what I got:

> cd /usr/glassfish3/glassfish/modules

<b>&gt; java -jar glassfish.jar</b>
Launching GlassFish on Felix platform
Feb 01, 2012 2:26:23 PM com.sun.enterprise.server.logging.LogManagerService postConstruct
WARNING: Record begin marker is not a proper value so using default.
Feb 01, 2012 2:26:23 PM com.sun.enterprise.server.logging.LogManagerService postConstruct
WARNING: Record end marker is not a proper value so using default.
Feb 01, 2012 2:26:23 PM com.sun.enterprise.server.logging.LogManagerService postConstruct
WARNING: Log Format field separator is not a character so using default.
[#|2012-02-01T14:26:23.238-0600|INFO|glassfish3.1.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=1;_ThreadName=main;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2012-02-01T14:26:23.604-0600|SEVERE|glassfish3.1.1|grizzly|_ThreadID=27;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 8181=com.sun.enterprise.v3.services.impl.monitor.MonitorableSSLSelectorHandler@3e9a7e5f
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
|#]

[#|2012-02-01T14:26:23.604-0600|SEVERE|glassfish3.1.1|grizzly|_ThreadID=32;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 3700=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler@7f26bd42
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
|#]

[#|2012-02-01T14:26:23.604-0600|SEVERE|glassfish3.1.1|grizzly|_ThreadID=33;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException
java.net.BindException: No free port within range: 7676=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler@657c395e
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
|#]

[#|2012-02-01T14:26:23.710-0600|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|GlassFish Server Open Source Edition 3.1.1 (12) startup time : Felix (2,404ms), startup services(899ms), total(3,303ms)|#]

[#|2012-02-01T14:26:23.711-0600|SEVERE|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@394047fa|#]

[#|2012-02-01T14:26:23.734-0600|INFO|glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=38;_ThreadName=Thread-21;|Server shutdown initiated|#]

[#|2012-02-01T14:26:23.742-0600|INFO|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=38;_ThreadName=Thread-21;|Already stopped, so just returning|#]

I really would appreciate any help I can get to get GlassFish started.

Thanks.

mkrivan
Offline
Joined: 2012-05-03

I had the same problem (I could not start glassfish with asadmin) and checking the /etc/hosts file based on the suggestion in this thread I have realized that my hostname in /etc/hosts file linked to a static IP which is bad because I have dynamic IP configuration so probably is always different :-)

When I changed it back to the 127.0.0.1 address (of course it could be any other but working and attached IP address), the glassfish could be started properly.

So I think you could check the name resolution protocol, perhaps something is misconfigured or simple do not exists.

Hopefully you will be lucky soon if not yet because your post was quite old :-)
But it was very helpful to me, so many thanks for it!