cancel
Showing results for 
Search instead for 
Did you mean: 

LDAP configuration ERROR (PARSE TIME)

sue
Champ in-the-making
Champ in-the-making
Hello,

I keep getting the following error:

2016-06-20 12:20:16,641 ERROR [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization aborted due to error
org.alfresco.error.AlfrescoRuntimeException: 05200001 Failed to parse timestamp.
……..
Caused by: java.text.ParseException: Unparseable date: "20160620105843.819Z"
   at java.text.DateFormat.parse(Unknown Source)
   at org.alfresco.repo.security.sync.ldap.LDAPUserRegistry.mapToNode(LDAPUserRegistry.java:1115)



I tried too, but it didnt work, it keeps posting same error Smiley Sad

ldap.synchronization.timestampFormat=yyyyMMddHHmmss'.0Z'


I use alfresco 5.1 and APACHE DIRECTORY STUDIO as LDAP on WINDOWS

this is the configuration of ldap:


###############################################################################
# The default authentication chain
# To configure external authentication subsystems see:
# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems
#————-

######AUTHENTIFICATION CHAIN####
authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap

######SUBSYSTEM AUTHENTIFICATION####

### SIMPLE AUTHENTIFICATION ###
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.userNameFormat=uid=%s,ou=users,ou=system

ldap.authentication.active=true
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://localhost:10389
ldap.authentication.allowGuestLogin=true

#####################################
###### SUBSYSTEM SYNCHRONISATION ####
#####################################

ldap.synchronization.active=true

ldap.synchronization.java.naming.security.principal=uid=admin,ou=system
ldap.synchronization.java.naming.security.credentials=secret
ldap.synchronization.queryBatchSize=1000

ldap.synchronization.groupQuery=(objectclass=groupOfNames)
ldap.synchronization.groupDifferentialQuery=(&(objectclass=groupOfNames)(!(modifyTimestamp<\={0})))

ldap.synchronization.personQuery=(objectclass=inetOrgPerson)
ldap.synchronization.personDifferentialQuery=(&(objectclass=inetOrgPerson)(!(modifyTimestamp<\={0})))

ldap.synchronization.groupSearchBase=ou=groups,ou=system
ldap.synchronization.userSearchBase=ou=users,ou=system

ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z'

################# ATTRIBUTE MAPPING #############
#### mapping to unique username in username attribute###
ldap.synchronization.userIdAttributeName=uid
#ldap.synchronization.userLastNameAttributeName=cn
#ldap.synchronization.userEmailAttributeName=mail
#ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.groupIdAttributeName=cn
#ldap.synchronization.groupType=
#ldap.synchronization.personType=
ldap.synchronization.groupMemberAttributeName=member
#ldap.synchronization.userOrganizationalIdAttributeName=company

ldap.synchronization.enableProgressEstimation=true
####################################
###### SYNCHRONISATION SETTINGS ####
####################################

synchronization.autoCreatePeopleOnLogin=false
#synchronization.import.group.clearAllChildren=true
# full sync or only changes?
synchronization.synchronizeChangesOnly=false

# to sync on each alfresco startup
synchronization.syncOnStartup=true
synchronization.syncWhenMissingPeopleLogIn=false

### DONT USE UNIX CRON EXPRESSION- USE QUARTZ CRON EXPRESSIONS!!!
### look here http://www.quartz-scheduler.org/docs/tutorials/crontrigger.html
### synchronisation starts every 15 minutes!
synchronization.import.cron=0 0/15 * * * ?

2 REPLIES 2

steven_okennedy
Star Contributor
Star Contributor
Hi Sue,

It looks like your LDAP server is giving you back timestamps to millisecond precision ("20160620105843.819Z") and your timestamp pattern isn't expecting it to, it's expecting something like either "20160620105843Z" or "20160620105843.0Z" depending on whether you're using yyyyMMddHHmmss'Z' or yyyyMMddHHmmss'.0Z'

Since Alfresco is just feeding this property into a standard Java SimpleDateFormat object behind the scenes, you can just choose a pattern that matches what you're LDAP server is giving you, e.g. yyyyMMddHHmmss'.'SSS'Z'  - i.e. standard date format to the second followed by a literal ".", then milliseconds (3 digits) followed by a literal "Z"

Hopefully that will work for you, otherwise you could configure your LDAP to not include millisecond precision in their

Regards

Steven

sue
Champ in-the-making
Champ in-the-making
Hi, I solved it , I dont know if it makes any sence but it worked:
The error comes from this line:
ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z'


I simply removed the 'Z' like this:
ldap.synchronization.timestampFormat=yyyyMMddHHmmss