users@glassfish.java.net

Re: SSL port conflict

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 24 Aug 2009 22:15:11 -0400

Salut,

can you delete the listener, grab a netstat -an | grep 443, then
restart? I suspect the socket is not yet closed. Probably waiting for a
couple of second will do the trick (yes I know that's not good).

Which version are you using exactly?

A+

-- Jeanfrancois

glassfish_at_javadesktop.org wrote:
> I can delete the ssl listener without problems. What I did previously was delete it, then ran the above script to check which ports were in use... 443 was not in use anymore. Then I rebuilt the ssl listener, enabled it and restarted the server, but I get an exception about a port conflict:
>
> [code]
> Exception in thread "main" [#|2009-08-06T17:10:32.624-0400|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.stream.err|_ThreadID=10;|java.lang.Error: Untranslated exception
> at sun.nio.ch.Net.translateToSocketException(Net.java:63)
> at sun.nio.ch.Net.translateException(Net.java:79)
> at sun.nio.ch.Net.translateException(Net.java:85)
> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
> at com.sun.enterprise.server.ss.ASServerSocket.bind(ASServerSocket.java:258)
> at com.sun.enterprise.server.ss.ASServerSocketImpl.listen(ASServerSocketImpl.java:121)
> at java.net.ServerSocket.bind(ServerSocket.java:320)
> 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:71)
> at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:98)
> at com.sun.enterprise.web.connector.grizzly.SelectorThread.initEndpoint(SelectorThread.java:548)
> at com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol.init(GrizzlyHttpProtocol.java:188)
> at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1446)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:899)
> at com.sun.enterprise.web.WebContainer.start(WebContainer.java:707)
> at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:507)
> at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
> at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
> at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
> at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
> Caused by: java.net.SocketException: Already bound
> at sun.nio.ch.Net.translateToSocketException(Net.java:49)
> ... 21 more
> Caused by: sun.nio.ch.AlreadyBoundException
> at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:114)
> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
> ... 18 more
>
> [/code]
>
> Another question: what is the difference between enabling security for a listener on port 80, and creating a new security enabled listener on port 443? Would they not have the same result... that being https?
> [Message sent by forum member 'black_lotus' (black_lotus)]
>
> http://forums.java.net/jive/thread.jspa?messageID=361023
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>