legacy-knowledge-base
公開されました Jul. 2, 2025

LDAPユーザーがログインできない(Caused by: java.net.SocketException: Connection reset)

投稿者

Sivakumar Perumal

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

問題

  • LDAPが設定されている場合、LDAPユーザーがログインしようとすると、認証に失敗し、サーバーコンソールに以下のエラーが表示されるようになりました。
ERROR [liferay/scheduler_dispatch-4][PortalLDAPImporterImpl:717] Unable to import user CN=makansal: null:null:{samaccountname=sAMAccountName: makansal}
javax.naming.CommunicationException: Connection reset [Root exception is java.net.SocketException: Connection reset]; remaining name 'CN=makansal,CN=Users,DC=ad,DC=keysight,DC=com'
at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:2003)
at com.sun.jndi.ldap.LdapCtx.doSearchOnce(LdapCtx.java:1934)
at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1327)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139)
at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:152)
at com.liferay.portal.security.ldap.PortalLDAPUtil._getAttributes(PortalLDAPUtil.java:905)
at com.liferay.portal.security.ldap.PortalLDAPUtil.getUserAttributes(PortalLDAPUtil.java:582)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAPByUser(PortalLDAPImporterImpl.java:702)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:203)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:139)
at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importFromLDAP(PortalLDAPImporterImpl.java:101)
at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importFromLDAP(PortalLDAPImporterUtil.java:39)
at com.liferay.portlet.admin.messaging.LDAPImportMessageListener.doReceive(LDAPImportMessageListener.java:51)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at sun.reflect.GeneratedMethodAccessor383.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at com.sun.proxy.$Proxy300.receive(Unknown Source)
at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:77)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at com.sun.jndi.ldap.Connection.run(Connection.java:853)

環境

  • Liferay DXP 7.0

解像度

  • LiferayとLDAPの間で通信障害が発生した場合、サーバーコンソールで上記エラーが確認されます。 したがって、LiferayとLDAPの間に接続を確立することで、LDAPユーザーの認証が成功することになります。
  • テストすること: PLiferayが動作しているマシンからLDAPサーバーのIPアドレスを取得し、返信があるかどうかを確認します。

追加情報

  • LDAPインポートオプションを有効にしている場合、上記のエラーに加え、以下のエラーが発生することがあります。
ERROR [liferay/scheduler_dispatch-5][PortalLDAPImporterImpl:210] Error importing LDAP users and groups 
javax.naming.NamingException: LDAP response read timed out, timeout used:15000ms.; remaining name 'CN=Users,DC=ad,DC=keysight,DC=com'
  • 上記のエラー は、Liferay で "import" オプションが有効になっており、LDAP からユーザーをインポートしようとしていることを示しています。 何らかの通信/ネットワーク障害が発生しているため、LiferayはLDAPサーバーと接続するために15000ms(portal.properties に設定されている値) を待ちましたが、それでも接続は確立されていません。
did-this-article-resolve-your-issue

legacy-knowledge-base