{"action":"created","issue":{"url":"https://api.github.com/repos/apache/cloudstack/issues/2853","repository_url":"https://api.github.com/repos/apache/cloudstack","labels_url":"https://api.github.com/repos/apache/cloudstack/issues/2853/labels{/name}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/2853/comments","events_url":"https://api.github.com/repos/apache/cloudstack/issues/2853/events","html_url":"https://github.com/apache/cloudstack/issues/2853","id":361672393,"node_id":"MDU6SXNzdWUzNjE2NzIzOTM=","number":2853,"title":"LDAP login java.lang.NullPointerException","user":{"login":"izenk","id":6417697,"node_id":"MDQ6VXNlcjY0MTc2OTc=","avatar_url":"https://avatars2.githubusercontent.com/u/6417697?v=4","gravatar_id":"","url":"https://api.github.com/users/izenk","html_url":"https://github.com/izenk","followers_url":"https://api.github.com/users/izenk/followers","following_url":"https://api.github.com/users/izenk/following{/other_user}","gists_url":"https://api.github.com/users/izenk/gists{/gist_id}","starred_url":"https://api.github.com/users/izenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izenk/subscriptions","organizations_url":"https://api.github.com/users/izenk/orgs","repos_url":"https://api.github.com/users/izenk/repos","events_url":"https://api.github.com/users/izenk/events{/privacy}","received_events_url":"https://api.github.com/users/izenk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T10:04:26Z","updated_at":"2018-09-21T20:48:01Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nVerify first that your issue/request is not already reported on GitHub.\r\nAlso test if the latest release and master branch are affected too.\r\nAlways add information AFTER of these HTML comments, but no need to delete the comments.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!-- Pick one below and delete the rest -->\r\n * Bug Report\r\n \r\n##### COMPONENT NAME\r\n<!--\r\nCategorize the issue, e.g. API, VR, VPN, UI, etc.\r\n-->\r\n~~~\r\nManagement server, API\r\n~~~\r\n\r\n##### CLOUDSTACK VERSION\r\n<!--\r\nNew line separated list of affected versions, commit ID for issues on master branch.\r\n-->\r\n~~~\r\n4.11.1\r\n~~~\r\n\r\n##### CONFIGURATION\r\n<!--\r\nInformation about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise\r\n-->\r\nAdvanced networking, LDAP integration\r\n\r\n##### OS / ENVIRONMENT\r\n<!--\r\nInformation about the environment if relevant, N/A otherwise\r\n-->\r\nCentOS Linux release 7.4.1708\r\n\r\n##### SUMMARY\r\n<!-- Explain the problem/feature briefly -->\r\nDuring LDAP user login java.lang.NullPointerException appeared.\r\n\r\n##### STEPS TO REPRODUCE\r\n<!--\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.\r\n\r\nFor new features, show how the feature would be used.\r\n-->\r\n\r\n- Create domain\r\n- Set LDAP configuration for this domain (not for ROOT domain and not in GLOBAL SETTINGS)\r\n- Import LDAP Accounts through \"Add LDAP account\" button\r\n- Accounts are imported and enabled\r\n-  Try to login with LDAP user\r\n\r\n##### EXPECTED RESULTS\r\n<!-- What did you expect to happen when running the steps above? -->\r\n\r\n~~~\r\nLogin is successfull\r\n~~~\r\n\r\n##### ACTUAL RESULTS\r\n<!-- What actually happened? -->\r\n\r\n<!-- Paste verbatim command output between quotes below -->\r\n\r\nLDAP connection was checked by ldapsearch command from management server with the same credentials.\r\nUser can bind and search.\r\n\r\n~~~\r\n2018-09-19 12:11:01,442 INFO  [o.a.c.f.j.i.AsyncJobManagerImpl] (AsyncJobMgr-Heartbeat-1:ctx-cead411b) (logid:89449541) End cleanup expired async-jobs\r\n2018-09-19 12:11:06,280 INFO  [o.a.c.l.LdapContextFactory] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) LDAP SSL enabled.\r\n2018-09-19 12:11:06,283 DEBUG [o.a.c.l.LdapContextFactory] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) initializing ldap with provider url: ldaps://ldap.srv:636\r\n2018-09-19 12:11:06,536 DEBUG [o.a.c.l.OpenLdapUserManagerImpl] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) adding search filter for 'CN=demosso,OU=AADDC Users,DC=org,DC=com', using memberof\r\n2018-09-19 12:11:06,597 INFO  [o.a.c.l.LdapContextFactory] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) LDAP SSL enabled.\r\n2018-09-19 12:11:06,599 DEBUG [o.a.c.l.LdapContextFactory] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) initializing ldap with provider url: ldaps://ldap.srv:636\r\n2018-09-19 12:11:06,788 ERROR [c.c.a.ApiServlet] (qtp1595953398-17:ctx-4bbda8d3) (logid:68a8575d) unknown exception writing api response\r\njava.lang.NullPointerException\r\n        at com.cloud.user.AccountManagerImpl.checkIfNotMovingAcrossDomains(AccountManagerImpl.java:1768)\r\n        at com.cloud.user.AccountManagerImpl.moveUser(AccountManagerImpl.java:1721)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\r\n        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n        at com.sun.proxy.$Proxy39.moveUser(Unknown Source)\r\n        at org.apache.cloudstack.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:138)\r\n        at org.apache.cloudstack.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:78)\r\n        at com.cloud.user.AccountManagerImpl.getUserAccount(AccountManagerImpl.java:2266)\r\n        at com.cloud.user.AccountManagerImpl.authenticateUser(AccountManagerImpl.java:2107)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\r\n        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n        at com.sun.proxy.$Proxy39.authenticateUser(Unknown Source)\r\n        at com.cloud.api.ApiServer.loginUser(ApiServer.java:1048)\r\n        at com.cloud.api.auth.DefaultLoginAPIAuthenticatorCmd.authenticate(DefaultLoginAPIAuthenticatorCmd.java:172)\r\n        at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:214)\r\n        at com.cloud.api.ApiServlet$1.run(ApiServlet.java:130)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)\r\n        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:127)\r\n        at com.cloud.api.ApiServlet.doPost(ApiServlet.java:94)\r\n        at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)\r\n        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)\r\n        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)\r\n        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\r\n        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\r\n        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\r\n        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\r\n        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\r\n        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527)\r\n        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n        at org.eclipse.jetty.server.Server.handle(Server.java:530)\r\n        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)\r\n        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)\r\n        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\r\n        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)\r\n        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\r\n        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\r\n        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\r\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\r\n        at java.lang.Thread.run(Thread.java:748)\r\n2018-09-19 12:11:06,902 INFO  [o.a.c.l.LdapContextFactory] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) LDAP SSL enabled.\r\n2018-09-19 12:11:06,904 DEBUG [o.a.c.l.LdapContextFactory] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) initializing ldap with provider url: ldaps://ldap.srv:636\r\n2018-09-19 12:11:07,093 DEBUG [o.a.c.l.OpenLdapUserManagerImpl] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) adding search filter for 'CN=demosso,OU=AADDC Users,DC=org,DC=com', using memberof\r\n2018-09-19 12:11:07,136 INFO  [o.a.c.l.LdapContextFactory] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) LDAP SSL enabled.\r\n2018-09-19 12:11:07,139 DEBUG [o.a.c.l.LdapContextFactory] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) initializing ldap with provider url: ldaps://ldap.srv:636\r\n2018-09-19 12:11:07,323 ERROR [c.c.a.ApiServlet] (qtp1595953398-16:ctx-6b1fb2a2) (logid:7ff125ca) unknown exception writing api response\r\njava.lang.NullPointerException\r\n        at com.cloud.user.AccountManagerImpl.checkIfNotMovingAcrossDomains(AccountManagerImpl.java:1768)\r\n        at com.cloud.user.AccountManagerImpl.moveUser(AccountManagerImpl.java:1721)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\r\n        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n        at com.sun.proxy.$Proxy39.moveUser(Unknown Source)\r\n        at org.apache.cloudstack.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:138)\r\n        at org.apache.cloudstack.ldap.LdapAuthenticator.authenticate(LdapAuthenticator.java:78)\r\n        at com.cloud.user.AccountManagerImpl.getUserAccount(AccountManagerImpl.java:2266)\r\n        at com.cloud.user.AccountManagerImpl.authenticateUser(AccountManagerImpl.java:2107)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)\r\n        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\r\n        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n        at com.sun.proxy.$Proxy39.authenticateUser(Unknown Source)\r\n        at com.cloud.api.ApiServer.loginUser(ApiServer.java:1048)\r\n        at com.cloud.api.auth.DefaultLoginAPIAuthenticatorCmd.authenticate(DefaultLoginAPIAuthenticatorCmd.java:172)\r\n        at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:214)\r\n        at com.cloud.api.ApiServlet$1.run(ApiServlet.java:130)\r\n        at com.cloud.api.ApiServlet$1.run(ApiServlet.java:130)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)\r\n        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)\r\n        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:127)\r\n        at com.cloud.api.ApiServlet.doPost(ApiServlet.java:94)\r\n        at javax.servlet.http.HttpServlet.service(HttpServlet.java:706)\r\n        at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)\r\n        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852)\r\n        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\r\n        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\r\n        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\r\n        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\r\n        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\r\n        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\r\n        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n        at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527)\r\n        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\r\n        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n        at org.eclipse.jetty.server.Server.handle(Server.java:530)\r\n        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)\r\n        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)\r\n        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\r\n        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)\r\n        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\r\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\r\n        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\r\n        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\r\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\r\n        at java.lang.Thread.run(Thread.java:748)\r\n2018-09-19 12:11:10,012 DEBUG [o.a.c.m.PrometheusExporterServerImpl] (Thread-26:null) (logid:) Prometheus exporter received client request from: 127.0.0.1\r\n~~~\r\n"},"comment":{"url":"https://api.github.com/repos/apache/cloudstack/issues/comments/423666109","html_url":"https://github.com/apache/cloudstack/issues/2853#issuecomment-423666109","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/2853","id":423666109,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzY2NjEwOQ==","user":{"login":"rhtyd","id":95203,"node_id":"MDQ6VXNlcjk1MjAz","avatar_url":"https://avatars0.githubusercontent.com/u/95203?v=4","gravatar_id":"","url":"https://api.github.com/users/rhtyd","html_url":"https://github.com/rhtyd","followers_url":"https://api.github.com/users/rhtyd/followers","following_url":"https://api.github.com/users/rhtyd/following{/other_user}","gists_url":"https://api.github.com/users/rhtyd/gists{/gist_id}","starred_url":"https://api.github.com/users/rhtyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhtyd/subscriptions","organizations_url":"https://api.github.com/users/rhtyd/orgs","repos_url":"https://api.github.com/users/rhtyd/repos","events_url":"https://api.github.com/users/rhtyd/events{/privacy}","received_events_url":"https://api.github.com/users/rhtyd/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T20:48:01Z","updated_at":"2018-09-21T20:48:01Z","author_association":"MEMBER","body":"/cc @DaanHoogland can you comment?"}}
{"actor":{"display_login":"rhtyd"}}