Quantcast

Startup Problem - Port used

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Startup Problem - Port used

glassfish-2
Hi,
trying to start up glassfish v3b74 but get port used error

[b]root@ubuntu:~/glassfishv3/glassfish/bin# ./asadmin start-domain domain1
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed[/b].

but the port is not used. (I get the same error for any port that I would configure)

[b]root@ubuntu:~/glassfishv3/glassfish/bin# netstat -tlunp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2149/sshd      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2441/cupsd      
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      2075/postgres  
tcp6       0      0 :::22                   :::*                    LISTEN      2149/sshd      
tcp6       0      0 :::5432                 :::*                    LISTEN      2075/postgres  
udp        0      0 0.0.0.0:68              0.0.0.0:*                           2082/dhclient3  
udp        0      0 0.0.0.0:39256           0.0.0.0:*                           2413/avahi-daemon:
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           2413/avahi-daemon:
root@ubuntu:~/glassfishv3/glassfish/bin# [/b]

There is no firewall.

Other Info
[b]Ubuntu Jaunty 9.04
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)[/b]

I am not expert enough if it is problem that I can solve by Glassfish or Linux configuration.

Thanks for hints
Sven
[Message sent by forum member 'itdude' ]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

Jeanfrancois Arcand-2
Salut,

[hidden email] wrote:

> Hi,
> trying to start up glassfish v3b74 but get port used error
>
> [b]root@ubuntu:~/glassfishv3/glassfish/bin# ./asadmin start-domain domain1
> There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
> Command start-domain failed[/b].
>
> but the port is not used. (I get the same error for any port that I would configure)
>
> [b]root@ubuntu:~/glassfishv3/glassfish/bin# netstat -tlunp
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
> tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2149/sshd      
> tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2441/cupsd      
> tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      2075/postgres  
> tcp6       0      0 :::22                   :::*                    LISTEN      2149/sshd      
> tcp6       0      0 :::5432                 :::*                    LISTEN      2075/postgres  
> udp        0      0 0.0.0.0:68              0.0.0.0:*                           2082/dhclient3  
> udp        0      0 0.0.0.0:39256           0.0.0.0:*                           2413/avahi-daemon:
> udp        0      0 0.0.0.0:5353            0.0.0.0:*                           2413/avahi-daemon:
> root@ubuntu:~/glassfishv3/glassfish/bin# [/b]
>
> There is no firewall.

Can you post your server.log file (under
${glassfish.home}/domains/domain1/logs ?

Thanks!

-- Jeanfrancois

>
> Other Info
> [b]Ubuntu Jaunty 9.04
> Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)[/b]
>
> I am not expert enough if it is problem that I can solve by Glassfish or Linux configuration.
>
> Thanks for hints
> Sven
> [Message sent by forum member 'itdude' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=374417
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
In reply to this post by glassfish-2
Thanks !

root@ubuntu:~/glassfishv3/glassfish/domains/domain1/logs# cat server.log
Dec 3, 2009 3:53:50 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/usr/lib/jvm/java-6-sun-1.6.0.13/bin/java
-cp
/root/glassfishv3/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-XX:+LogVMOutput
-XX:LogFile=/root/glassfishv3/glassfish/domains/domain1/logs/jvm.log
-Xmx512m
-client
-javaagent:/root/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=/root/glassfishv3/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/root/glassfishv3/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/root/glassfishv3/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/root/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=/root/glassfishv3/glassfish/modules/endorsed:/root/glassfishv3/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/root/glassfishv3/glassfish
-Djava.ext.dirs=/usr/lib/jvm/java-6-sun-1.6.0.13/lib/ext:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/ext:/root/glassfishv3/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/root/glassfishv3/glassfish/domains/domain1/config/cacerts.jks
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/root/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=/root/glassfishv3/glassfish/lib:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.13/lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
start-domain,,,domain1
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/root/glassfishv3/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-domaindir
/root/glassfishv3/glassfish/domains/domain1
-read-stdin
true
root@ubuntu:~/glassfishv3/glassfish/domains/domain1/logs#
[Message sent by forum member 'itdude' ]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
In reply to this post by glassfish-2
I believe it is some kind of GF problem, or the way the it opens ports to listen.

On the same server I started a simple Groovy Script to listen a port as XML RPC Server and it works fine

[b]import groovy.net.xmlrpc.*;
def server = new XMLRPCServer()
server.echo = { return it + ' TEST BLA' }
def serverSocket = new ServerSocket(12126)    
server.startServer(serverSocket)          
[/b]
How does GF open ports for listening ?

Thanks
[Message sent by forum member 'itdude' ]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
Can you please do:

java -jar <gf-install>/modules/glassfish.jar and see if the server starts up?

Thanks,
Kedar
[Message sent by forum member 'km' ]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
Thanks for the hint !

Executing glassfish.jar directly gave me this

[i][..]
root@ubuntu:~# java -jar glassfishv3/glassfish/modules/glassfish.jar
Dec 8, 2009 6:01:37 AM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform

Welcome to Felix
================

Dec 8, 2009 6:01:48 AM com.sun.enterprise.v3.server.SystemTasks setSystemPropertiesFromEnv
SEVERE: cannot determine host name, will use localhost exclusively
java.net.UnknownHostException: ubuntu: ubuntu
        at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
        at com.sun.enterprise.util.net.NetUtils.getCanonicalHostName(NetUtils.java:103)
        at com.sun.enterprise.v3.server.SystemTasks.setSystemPropertiesFromEnv(SystemTasks.java:152)
[..][/i]

Root cause: [b]There is NO etc/hosts file on the server[/b].
Creating one solves the problem.

[i]127.0.0.1 localhost
127.0.1.1 servername[/i]

(Remark: Simple reason though)
[Message sent by forum member 'itdude' ]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
In reply to this post by glassfish-2
Hi!

It appears I am seeing a similar problem on fedora 11. I just download glassfishv3 web profile and when I try starting the zip install version, I get the same error that port 4848 is being used by another process. Nothing seems to be running on port 4848. I also started
tomcat on this port to just check if there was something running that might be using the port. I also explicitly disabled iptables (firewall is disable). Log does not seem to show much information other than it is trying to start the server. Is there a way to enable more tracing ?

(the self extracting gui version just hangs when I click next after setting the admin password).

- TIA
[Message sent by forum member 'glassfish123' ([hidden email])]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
Ok! I was able to resolve this problem. This problem seems to occur if you have two interfaces, and the hostname returned by the command `hostname` is being used for the ip address for second interface (eth1) in the /etc/hosts file. I moved the name to the ipaddress on eth0 (first entry in /etc/hosts) and the problem went away.
[Message sent by forum member 'glassfish123' ([hidden email])]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Startup Problem - Port used

glassfish-2
In reply to this post by glassfish-2
Once I got a similar exception, and I post the solution here just in case someone digging around needs it:
[b]There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.[/b]

java.net.BindException: Invalid arguments: bind: 7676=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler

Then, you'd have to change the key  "net.ipv6.bindv6only" from "1" to "0" in "/etc/sysctl.d/bindv6only.conf", which is a kernel parameter that if set to 1 enables IPV6 applications to listen only IPV6 "requests" (OK, request is not the expression, but you get the point).
[Message sent by forum member 'snookiex']

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...