CopyDisable

Monday 15 August 2011

Glassfish domain starting problem

I had a problem of starting one of the glassfish domains in one of our servers. This server has multiple glassfish domain.



Domain was not getting started. When I checked the log file I got the error:
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:106)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:106)
at com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:72)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSSLServerSocket(IIOPSSLSocketFactory.java:406)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:289)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:174)
This means that some port used by this domain is currently being used by some other process, so it is unable to start.
So I found out the ports used by this domain from domain.xml file.
After that I have to find out which of these ports are currently in use. So for that I run the command
C:\Documents and Settings\Administrator>netstat -no > c:\netstat.txt
When I examined the output of this command I found
Active Connections
Proto  Local Address          Foreign Address        State           PID
TCP    127.0.0.1:4843         127.0.0.1:4844         ESTABLISHED     20328
TCP    127.0.0.1:4844         127.0.0.1:4843         ESTABLISHED     20328
TCP    127.0.0.1:4845         127.0.0.1:4846         ESTABLISHED     20328
TCP    127.0.0.1:4846         127.0.0.1:4845         ESTABLISHED     20328
TCP    127.0.0.1:4847         127.0.0.1:4848         ESTABLISHED     20328
TCP    127.0.0.1:4848         127.0.0.1:4847         ESTABLISHED     20328
TCP    127.0.0.1:4849         127.0.0.1:4850         ESTABLISHED     20328
TCP    127.0.0.1:4850         127.0.0.1:4849         ESTABLISHED     20328
TCP    127.0.0.1:4851         127.0.0.1:4852         ESTABLISHED     20328
TCP    127.0.0.1:4852         127.0.0.1:4851         ESTABLISHED     20328
TCP    127.0.0.1:4853         127.0.0.1:4854         ESTABLISHED     20328
The admin console port 4848 of my domain is being used by the process with process id 20328.
So I have to use a different port for admin console or I have to terminate the process 20328 and start my domain.
When I checked in windows task manager I found that the process 20328 is another domain of glassfish. So I could afford to kill that process and start both the domains.
So, I killed the process 20328 and started both the domains.

This is a very basic problem but  I think it may be helpful for somebody..


জয় আই অসম,
প্রণব শর্মা

No comments:

Post a Comment