cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with connecting Activiti to Active Directory (AD)

bizilux
Champ on-the-rise
Champ on-the-rise
Hello all,

im finally giving up and reaching for help, it's been god knows how many days of constant struggle to get AD working with Activiti…

2 weeks ago i successfully did "Share connector demo" so Alfresco and Activiti were connected. Then i've setup AD on Alfresco, works OK. Then i wanted to setup AD on Activiti… wont work and i tried basically everything.

Right now I even tried replacing my ad file with example-activiti-ldap-for-ad.properties (the one that you guys created as example)… and it wont work.

I also enabled debugging for LDAP for activiti by typing log4j.logger.com.activti.idm.ldap=debug  into log4j properties… but it gives very little information in CMD console… is there any other debugging option to help me out?
6 REPLIES 6

bizilux
Champ on-the-rise
Champ on-the-rise
this is localhost.log file… using official example ad properties file. (i trimmed this log a bit because it was too long.)
<code>
15-Jan-2016 10:01:42.835 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [apiDispatcher] in context with path [/activiti-app] threw exception
org.springframework.ldap.CommunicationException: 172.30.40.61:389; nested exception is javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:108)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.bindAsUser(ActiveDirectoryLdapAuthenticationProvider.java:240)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.doAuthentication(ActiveDirectoryLdapAuthenticationProvider.java:181)
at com.activti.idm.ldap.auth.ActivitiActiveDirectoryAuthenticationProvider.authenticate(ActivitiActiveDirectoryAuthenticationProvider.java:79)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:167)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:192)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:177)
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)

Caused by: javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]
at com.sun.jndi.ldap.Connection.<init>(Connection.java:226)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1613)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:319)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:210)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:153)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider$ContextFactory.createContext(ActiveDirectoryLdapAuthenticationProvider.java:420)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.bindAsUser(ActiveDirectoryLdapAuthenticationProvider.java:234)
… 38 more
Caused by: java.net.ConnectException: Connection refused: connect


15-Jan-2016 10:01:43.067 SEVERE [http-nio-8080-exec-7] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [apiDispatcher] in context with path [/activiti-app] threw exception
org.springframework.ldap.CommunicationException: 172.30.40.61:389; nested exception is javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:108)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.bindAsUser(ActiveDirectoryLdapAuthenticationProvider.java:240)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.doAuthentication(ActiveDirectoryLdapAuthenticationProvider.java:181)
at com.activti.idm.ldap.auth.ActivitiActiveDirectoryAuthenticationProvider.authenticate(ActivitiActiveDirectoryAuthenticationProvider.java:79)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:177)
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)

Caused by: javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]
com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider$ContextFactory.createContext(ActiveDirectoryLdapAuthenticationProvider.java:420)
at com.activti.idm.ldap.auth.spring.ActiveDirectoryLdapAuthenticationProvider.bindAsUser(ActiveDirectoryLdapAuthenticationProvider.java:234)
… 38 more
Caused by: java.net.ConnectException: Connection refused: connect


</code>

bizilux
Champ on-the-rise
Champ on-the-rise
this is localhost.log file… using official example ad properties file. (i trimmed this log a bit because it was too long.)
<code>
15-Jan-2016 10:01:42.835 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [apiDispatcher] in context with path [/activiti-app] threw exception
org.springframework.ldap.CommunicationException: 172.30.40.61:389; nested exception is javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]

Caused by: javax.naming.CommunicationException: 172.30.40.61:389 [Root exception is java.net.ConnectException: Connection refused: connect]

Caused by: java.net.ConnectException: Connection refused: connect

</code>

I also enabled debugging for LDAP for activiti by typing log4j.logger.com.activti.idm.ldap=debug  into log4j properties… but it gives very little information in CMD console… is there any other debugging option to help me out?

bizilux
Champ on-the-rise
Champ on-the-rise
Any help? I am stuck right now… this is the thing that i need to resolve before i move on with my project…

Anyone knows what are default usernames and passwords for users created with this example AD properties? or rather… does anyone know if that example AD properties file was even meant to be used?

bizilux
Champ on-the-rise
Champ on-the-rise
Now i downloaded 1.4 activiti… to see if its any better… still the same problem, the only thing that is working is LDAP settings that make those 5 users, kirk, admin, jluc, william and wesley.

Example AD doesnt work, and my AD doesnt work. It appears it doesnt import users in Activiti… otherwise I would have seen them under users tab and I could reset passwords…

As you can see for example AD settings, i get some kind of errors that domain URL is not correct…

however, for my AD settings, i get no error whatsoever. Nothing. So atleast domain url is correct… which ofcourse it is, since AD is already working on Alfresco and i use same settings…

Problem is, i cant figure out what is wrong with it, because no error is reported… It just boggles my mind how same AD settings cant be used for Alfresco and Activiti

trademak
Star Contributor
Star Contributor
The exception is saying there's a ConnectException, so Activiti is not able to create a connection to the LDAP server you defined. Are you sure this is correct? 172.30.40.61:389

Best regards,

bizilux
Champ on-the-rise
Champ on-the-rise
Hello,

That is when using example AD file that comes with activiti installation. So my assumption is that they removed their AD server or that it was never there.

Problem is when i try to use our AD server, that its not working. And i get zero errors. Just in cmd i get password not  correct, but that is for user… Bear in mind, AD is working on alfresco… So how come it doesnt work on activiti with same settings is really weird.