Error when LDAP enabled

38 views
Skip to first unread message

Matt McKinnon

unread,
Jul 25, 2013, 5:46:48 PM7/25/13
to xnat_di...@googlegroups.com
I have a similar issue as reported here https://groups.google.com/forum/#!topic/xnat_discussion/34q42mm4PdE

The difference is that I cannot resolve it except by disabling LDAP.  Enabling LDAP in services.properties causes this error when starting XNAT:

org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet xnat threw exception
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:159)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    at java.lang.Thread.run(Thread.java:722)

My services.properties file:

datasource.name=xnat
datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://localhost/xnat
datasource.username=xnat01
datasource.password=****

mailserver.host=****
mailserver.port=25
mailserver.username=
mailserver.password=
mailserver.protocol=smtp
mailserver.admin=****
mailserver.prefix=XNAT

#Number of failed login attempts before accounts are temporarily locked (-1 disables feature).
security.max_failed_logins=-1
#Number of milliseconds to lock user accounts that have exceeded the max_failed_logins count (3600000 for 1 hour, 86400000 for 24 hours).
security.max_failed_logins_lockout_duration=86400000
#Number of seconds of inactivity before an account is disabled (31556926 for 1 year).
security.inactivity_before_lockout=31556926

# Interval for timing out alias tokens. Uses PostgreSQL interval notation: http://www.postgresql.org/docs/9.0/static/functions-datetime.html
security.token_timeout=2 days

#Java regular expression that new passwords must match. For no complexity checks, set this to ^.*$
security.password_complexity=^.*$
#Message that explains the password complexity requirements. This is displayed when user chooses a new password that fails to meet them.
security.password_complexity_message=Password is not sufficiently complex.

#Interval for expiring unchanged passwords (-1 disables feature). Uses PostgreSQL interval notation: http://www.postgresql.org/docs/9.0/static/functions-datetime.html
security.password_expiration=365 days

#Number of days for which a password cannot be reused.
security.password_history=365

#The maximum number of permitted sessions a user can have open simultaneously.
security.sessions.concurrent_max=1000

# The following parameters are used to allow/force users to enter change justifications when modifying data.
audit.require_change_justification=false
audit.show_change_justification=false
   
#Comma-separated list of the providers that users will be able to use to authenticate.
#provider.providers.enabled=db

# have tried reversing these two

provider.providers.enabled=ldap1, db

provider.db.name=XNAT
provider.db.id=localdb
provider.db.type=db

# Add "ldap1" to the enabled provider list above and fill in the missing fields to enable LDAP authentication.
provider.ldap1.name=LDAP
provider.ldap1.id=ldap1
provider.ldap1.type=ldap
provider.ldap1.address=ldaps://***/dc=***,dc=***,dc=***
provider.ldap1.userdn=uid=xnat,ou=People,dc=***,dc=***,dc=***
provider.ldap1.password=***
provider.ldap1.search.base=ou=People
provider.ldap1.search.filter=(uid={0})

Herrick, Rick

unread,
Jul 26, 2013, 11:41:24 AM7/26/13
to xnat_di...@googlegroups.com

Matt,

 

Is that message in your Tomcat logs? Can you look in other logs in Tomcat and the logs folder under your XNAT web app to see if there are other messages that might be relevant?

 

This message is an indicator that something else has gone wrong in your configuration, so it’s not really informative on its own. Somewhere else there will be some error message about not being able to parse something, not being able to find an object, not being able to instantiate something, and so on. That will be your root cause error that needs to be fixed.

 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 827-4250

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Matt McKinnon

unread,
Jul 26, 2013, 5:57:39 PM7/26/13
to xnat_di...@googlegroups.com
Rick,

It's working now.

I think some confusion happened during step 6 of the upgrade process:

6. If you have any project customizations in the projects/project folder, copy the old projects directory into the new release.

I didn't do any customizations, but I did see the services.properties file in there and moved it into the new release under the projects directory.  This breaks XNAT when updating.  Removing that, and modifying plugin-resources/conf/services.properties is giving the correct results.

-Matt

Herrick, Rick

unread,
Jul 26, 2013, 5:59:41 PM7/26/13
to xnat_di...@googlegroups.com

Yeah, that would do it! Not needing to maintain the projects folder, which mixes your customizations with XNAT template code, is one of the best features of modules (and yes, I’m saying that if you do any customizations, you should do them in modules J).

Reply all
Reply to author
Forward
0 new messages