I have question regarding the ldapRealm in glassfish6
I am using glassfish 6.2.5 and JDK 11.0.12+7 , when I configure the ldapRealm for authentication I am getting this error ( same configuration works fine with glassfish 4.1.2 and jdk 8)
[glassfish 6.2] [SEVERE] [jakarta.enterprise.system.core.security] [tid: _ThreadID=47 _ThreadName=http-listener-2(4)] [timeMillis: 1661340894726] [levelValue: 1000] [[
ldaprealm.exception
javax.security.auth.login.LoginException: javax.naming.CommunicationException: my-ldap-server:636 [Root exception is java.net.SocketException: Unconnected sockets not implemented]
at com.sun.enterprise.security.auth.realm.ldap.LDAPRealm.findAndBind(LDAPRealm.java:483)
at com.sun.enterprise.security.auth.login.LDAPLoginModule.authenticate(LDAPLoginModule.java:74)
at com.sun.enterprise.security.auth.login.PasswordLoginModule.authenticateUser(PasswordLoginModule.java:80)
at com.sun.enterprise.security.BasePasswordLoginModule.login(BasePasswordLoginModule.java:114)
at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:747)
at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:672)
at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:670)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:670)
at java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:581)
at com.sun.enterprise.security.auth.login.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:327)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:199)
at com.sun.enterprise.security.auth.login.LoginContextDriver.login(LoginContextDriver.java:124)
at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:852)
at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:552)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:237)
at org.apache.catalina.authenticator.AuthenticatorBase.processSecurityCheck(AuthenticatorBase.java:963)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:549)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:579)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:550)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:75)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:114)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:199)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:440)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:190)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: javax.naming.CommunicationException:
my-ldap-server :636 [Root exception is java.net.SocketException: Unconnected sockets not implemented]
at java.naming/com.sun.jndi.ldap.Connection.<init>(Connection.java:252)
at java.naming/com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
at java.naming/com.sun.jndi.ldap.LdapClientFactory.createPooledConnection(LdapClientFactory.java:71)
at java.naming/com.sun.jndi.ldap.pool.Connections.createConnection(Connections.java:185)
at java.naming/com.sun.jndi.ldap.pool.Connections.getAvailableConnection(Connections.java:151)
at java.naming/com.sun.jndi.ldap.pool.Pool.getOrCreatePooledConnection(Pool.java:189)
at java.naming/com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:148)
at java.naming/com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:340)
at java.naming/com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1608)
at java.naming/com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2847)
at java.naming/com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:348)
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:262)
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:226)
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:280)
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:185)
at java.naming/com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:115)
at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:730)
at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
at java.naming/javax.naming.InitialContext.init(InitialContext.java:236)
at java.naming/javax.naming.InitialContext.<init>(InitialContext.java:208)
at java.naming/javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
at com.sun.enterprise.security.auth.realm.ldap.LDAPRealm.findAndBind(LDAPRealm.java:451)
... 29 more
Caused by: java.net.SocketException: Unconnected sockets not implemented
at java.base/javax.net.SocketFactory.createSocket(SocketFactory.java:125)
at java.naming/com.sun.jndi.ldap.Connection.createSocket(Connection.java:303)
at java.naming/com.sun.jndi.ldap.Connection.<init>(Connection.java:231)
... 50 more
Caused by: java.lang.UnsupportedOperationException
at java.base/javax.net.SocketFactory.createSocket(SocketFactory.java:123)
... 52 more
]]
is this is a bug ? or i am suppose to do something else in glassfish 6 with JDK 11 ?
Apologies if i am not suppose to ask such question in this mailing list. was looking for discussion form and just found this mailing list.
Thank you and best regards,
Armstrong.