Hi guys,
I am using alfresco-community-war-3.2r2 with tomcat6 on Centos5.4. Alfresco is working fine as war file on tomcat but when I try to integrate it with our existing ldap server its not working.
I need to ask two things?
1. I cant find any alfresco.log fine. Should it be created by default ?
2. May be my configuration files are not in right place. When I was installing alfresco I had to move "alfresco-global.properties"
/opt/tomcat/shared/classes/alfresco/extension/alfresco-global.properties to /opt/tomcat/lib/alfresco-global.properties
When I moved into /opt/tomcat/lib it worked.
I read from few forums and again I created a soft link of /opt/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems in /opt/tomcat/shared/classes/alfresco/extension/subsystems
# ll /opt/tomcat/shared/classes/alfresco/extension/subsystems
lrwxrwxrwx 1 alfresco alfresco 64 Feb 22 11:05 /opt/tomcat/shared/classes/alfresco/extension/subsystems -> /opt/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems
Here is my ldap-authentication.properties configuration
# cat /opt/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap-authentication.properties
ldap.authentication.active=true
ldap.authentication.userNameFormat=%s
## cn=redinet, ou=producer, ou=oxford circus, dc=dare, dc=local
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://192.168.8.10:389
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.authentication.defaultAdministratorUserNames=SVC_ALF
## I created a new user SVC_ALF in ldap and trying to login with that user I have tried (SVC_ALF, and ) but both dont work.
ldap.synchronization.active=false
ldap.synchronization.java.naming.security.principal=SVC_ALF # I dont know whether this line needed or not
ldap.synchronization.java.naming.security.credentials=abc123 # I dont know whether this line needed or not
Note: this file "ldap-authentication.properties" had other lines for ldap.synchronization which I commented.
###############
Now tomcat comes up with alfresco but I can see these errors in catalina.out and I cant login to ldap server.
12:05:38,374 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
12:05:38,400 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
12:05:38,515 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
12:05:43,653 ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
12:05:43,653 ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect setting)
12:05:43,697 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
12:05:43,697 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
12:05:43,708 ERROR [org.alfresco.fileserver] [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
12:05:43,709 ERROR [org.alfresco.fileserver] org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
12:05:43,709 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.nio.NIOCifsConnectionsHandler.initializeHandler(NIOCifsConnectionsHandler.java:265)
12:05:43,710 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.SMBServer.run(SMBServer.java:478)
12:05:43,710 ERROR [org.alfresco.fileserver] at java.lang.Thread.run(Thread.java:619)
12:05:43,730 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
12:05:43,763 ERROR [org.alfresco.fileserver] [FTP] FTP Socket error : java.net.BindException: Permission denied
12:05:43,795 ERROR [org.alfresco.fileserver] java.net.BindException: Permission denied
12:05:43,795 ERROR [org.alfresco.fileserver] at java.net.PlainSocketImpl.socketBind(Native Method)
12:05:43,795 ERROR [org.alfresco.fileserver] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
12:05:43,795 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.bind(ServerSocket.java:319)
12:05:43,795 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.(ServerSocket.java:185)
12:05:43,795 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.(ServerSocket.java:141)
12:05:43,795 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.ftp.FTPServer.run(FTPServer.java:561)
12:05:43,795 ERROR [org.alfresco.fileserver] at java.lang.Thread.run(Thread.java:619)
I will really appreciate for any suggestions please.
Many thanks.
Soh
gsdenys
- Posts
- 36
- Achievements
- 2
- Member for
- 3 years 9 months
- From
- São Paulo / SP / Brazil
Stats
You're using the security authentication as "simple"
and the authentication user Name Format as "%s"
look this comment present in config file
# How to map the user id entered by the user to taht passed through to LDAP
# - simple
# - this must be a DN and would be something like
# uid=%s,ou=People,dc=company,dc=com
# - digest
# - usually pass through what is entered
# %s
look this example to an LDAP ou=alfresco,dc=intranet
below has one complete configuration file.
Denys G santos
Consultor ECM/BPM - Konsultex Informática
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
Hi Gsdenys,
Thanks for replying mate. I changed my ldap-authentication.properties and it is pasted here
Note: I have changed the company name to example.local (company-name.local) rest every thing is same
The catalina.out is as (its when tomcat starts)
I have tried on alfresco panel by SVC_ALF, svc_alf, but no luck..... :(
Please mention if you need to know any thing.
Thanks alot.
Soh
gsdenys
- Posts
- 36
- Achievements
- 2
- Member for
- 3 years 9 months
- From
- São Paulo / SP / Brazil
Stats
smkhawaja,
in first post you write
when you do it, the configuration file will be present just in WEB-INF. It's not a good idea. So, if you redeploy it, you loose your configs.
below i'm write singles steps to you try to config alfresco with LDAP.
1) create the folder directory hierarchy
when ldap1 is just a name. you can change it.
2) create the file ldap-authentication.properties inside ldap1
3) open the alfresco-global.properties configuration file and locate the line
#authentication.chain=alfrescoNtlm1:alfrescoNtlm4) uncomment and change it to
authentication.chain=ldap1:ldap,alfrescoNtlm1:alfrescoNtlmNote that the ldap1:ldap is authentication folder : authentication type, so it provide many configurations from many LDAPs doing chain. In this configuration alfresco will try to authenticate in ldap if it is not possible the authentication will be done in alfrescoNtlm (default alfresco users)
try it and give us your feed back.
Denys G santos
Consultor ECM/BPM - Konsultex Informática
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
Hi,
Bundle of thanks for your reply.
I followed the steps as you mentioned. I can see in catalina.out that [/opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties]
is being read at the time of tomcat start. but there are couple of errors now and I am still unable to authenticate users.
here is the log
10:37:52,904 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
10:37:55,566 User:System INFO [management.subsystems.ChildApplicationContextFactory] Starting 'thirdparty' subsystem, ID: [thirdparty, default]
10:37:55,583 User:System INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:37:55,843 User:System ERROR [transform.magick.AbstractImageMagickContentTransformerWorker] ImageMagickContentTransformerWorker not available: 01240000 Failed to perform ImageMagick transformation:
Execution result:
os: Linux
command: [./ImageMagick/bin/convert, /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_source_8895283087681038871.gif[0], /opt/alfresco/tomcat/temp/Alfresco/ImageMagickContentTransformerWorker_init_target_7439847256049859947.png]
succeeded: false
exit code: 1
out:
err: Cannot run program "./ImageMagick/bin/convert": java.io.IOException: error=2, No such file or directory
10:37:56,288 User:System ERROR [content.transform.RuntimeExecutableContentTransformerWorker] Failed to start a runtime executable content transformer:
Execution result:
os: Linux
command: [./bin/pdf2swf, -V]
succeeded: false
exit code: 1
out:
err: Cannot run program "./bin/pdf2swf": java.io.IOException: error=2, No such file or directory
10:37:56,502 User:System ERROR [util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
os: Linux
command: [soffice, -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager, -env:UserInstallation=file:///opt/alfresco/alf_data/oouser, -nologo, -headless, -nofirststartwizard, -nocrashrep, -norestore]
succeeded: false
exit code: 2
out:
err: Cannot run program "soffice": java.io.IOException: error=2, No such file or directory
10:37:57,730 User:System WARN [alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
10:37:57,731 User:System INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'thirdparty' subsystem, ID: [thirdparty, default] complete
10:37:57,825 INFO [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: /opt/alfresco/alf_data
10:37:57,904 INFO [admin.patch.PatchExecuter] Checking for patches to apply ...
10:37:58,203 INFO [admin.patch.PatchExecuter] No patches were required.
10:37:58,208 User:System INFO [repo.module.ModuleServiceImpl] Found 0 module(s).
10:37:58,226 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
10:37:58,244 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:37:58,503 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, ldap1]
10:37:58,522 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:37:58,745 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, ldap1] complete
10:37:58,745 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
10:37:58,768 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:37:58,880 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
10:38:04,053 ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
10:38:04,053 ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect setting)
10:38:04,090 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'fileServers' subsystem, ID: [fileServers, default] complete
10:38:04,090 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
10:38:04,112 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
10:38:04,149 ERROR [org.alfresco.fileserver] [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
10:38:04,182 ERROR [org.alfresco.fileserver] org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
10:38:04,182 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.nio.NIOCifsConnectionsHandler.initializeHandler(NIOCifsConnectionsHandler.java:265)
10:38:04,182 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.SMBServer.run(SMBServer.java:478)
10:38:04,182 ERROR [org.alfresco.fileserver] at java.lang.Thread.run(Thread.java:619)
10:38:04,142 ERROR [org.alfresco.fileserver] [FTP] FTP Socket error : java.net.BindException: Permission denied
10:38:04,183 ERROR [org.alfresco.fileserver] java.net.BindException: Permission denied
10:38:04,183 ERROR [org.alfresco.fileserver] at java.net.PlainSocketImpl.socketBind(Native Method)
10:38:04,183 ERROR [org.alfresco.fileserver] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
10:38:04,183 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.bind(ServerSocket.java:319)
10:38:04,183 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.(ServerSocket.java:185)
10:38:04,183 ERROR [org.alfresco.fileserver] at java.net.ServerSocket.(ServerSocket.java:141)
10:38:04,183 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.ftp.FTPServer.run(FTPServer.java:561)
10:38:04,183 ERROR [org.alfresco.fileserver] at java.lang.Thread.run(Thread.java:619)
10:38:04,181 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'imap' subsystem, ID: [imap, default] complete
10:38:04,200 INFO [repo.usage.UserUsageTrackingComponent] Enabled - calculate missing user usages ...
10:38:04,216 INFO [repo.usage.UserUsageTrackingComponent] Found 0 users to recalculate
10:38:04,217 INFO [repo.usage.UserUsageTrackingComponent] ... calculated missing usages for 0 users
10:38:04,217 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Synchronization' subsystem, ID: [Synchronization, default]
10:38:04,231 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
The itlatic+bold area in log i know the modules are missing, for the time being can I comment them not to be load at startup?
Secondly the Auth and Syn errors are very cleared in log.
Any idea how to solve this issue?
Many thanks.
Soh
gsdenys
- Posts
- 36
- Achievements
- 2
- Member for
- 3 years 9 months
- From
- São Paulo / SP / Brazil
Stats
So,
Verify the LDAP log while during alfresco initiation and when you try to authenticate, maybe alfresco is doing any search. If alfresco did the research but did not return result, then the error is in the string of search. if it's right you can try use a terminal to verify if the better way to return resoult from an ldap search. To do it you can use the ldapsearch command
If none resount are registered in ldap log, then verify if your machine have access to ldap server.
any doubt ask
Denys G santos
Consultor ECM/BPM - Konsultex Informática
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
Thanks gsdenys,
Doesn't this show that authentication was ok?
16:14:28,058 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'fileServers' subsystem, ID: [fileServers, default]
16:14:28,077 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:14:28,342 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, ldap1]
16:14:28,363 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:14:28,592 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, ldap1] complete
16:14:28,592 INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
16:14:28,613 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
16:14:28,724 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
16:14:33,893 ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
16:14:33,893 ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect setting)
is there any application log like alfresco.log where i can get a proper error? Do you think the problem is with "ldap.authentication.userNameFormat=uid\=%s,ou\=alfresco,dc\=companyname,dc\=local"
I have tried with this
ldap.authentication.userNameFormat=uid\=%s@companyname.local
All I am digging if this is the point? As its mentioned failed to get local domain/group name, using default workgroup ....
16:14:33,893 ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
16:14:33,893 ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect setting)
Can we do this in parts? like first authentication, once this goes fine then synchronization? what do you say?
I have seen no issue with connecting to port 389 to the ldap server
opt]# telnet 192.168.8.10 389
Trying 192.168.8.10...
Connected to svr-file-04.dare.local (192.168.8.10).
Escape character is '^]'.
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
Hi gsdenys,
I am able to connect from that server to ldap server with the following command
# ldapsearch -x -b "dc=companyname,dc=local" -D "cn=SVC_ALF,ou=alfresco,dc=companyname,dc=local" -h 192.168.8.10 -p 389 -W > test.txt
Enter LDAP Password:
I double checked it from LDAP server - user was authenticated.
Does this make any sense?
Please let me know if we can dig it out and fix it :(
Thanks again.
Soh
gsdenys
- Posts
- 36
- Achievements
- 2
- Member for
- 3 years 9 months
- From
- São Paulo / SP / Brazil
Stats
it's error is not part of LDAP, but CIFIS error, you can disable CIFIS inserting the line
in your alfresco-global.properties]
or config it in /webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers/default/file-servers.properties, again, you'll be setting inside webapps, so try to copy the directory hierarchy into /tomcat/shared/classes/alfresco/extension/ as done in LDAP config.
about ldapsearch command, don't worry, I just wonder if your LDAP was correct.
Denys G santos
Consultor ECM/BPM - Konsultex Informática
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
What should i do next to make it working?
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
Lets take in this way to troubleshoot where exactly the issue is ??
I have disabled the following in "/opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties" file
ldap.synchronization.active=false
For me I think when tomcat restart it loads the same file and get the Authentication complete messages.
11:47:13,020 INFO [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [/opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties]
11:47:24,653 INFO [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
11:47:31,892 User:System INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, ldap1]
11:47:31,915 User:System INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
11:47:31,974 User:System INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, ldap1] complete
11:47:31,974 User:System INFO [management.subsystems.ChildApplicationContextFactory] Starting 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
11:47:31,995 User:System INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
11:47:32,098 User:System INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1] complete
11:47:32,105 INFO [management.subsystems.ChildApplicationContextFactory] Startup of 'Synchronization' subsystem, ID: [Synchronization, default] complete
11:47:32,278 INFO [service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_18-b07; maximum heap size 1979.750MB
11:47:32,278 INFO [service.descriptor.DescriptorService] Alfresco started (Community): Current version 3.2.0 (r2 2440) schema 3300 - Originally installed version 3.2.0 (r2 2440) schema 3300
When I stop tomcat I see the following messages in log
12:02:19,160 INFO [management.subsystems.ChildApplicationContextFactory] Stopping 'Authentication' subsystem, ID: [Authentication, managed, ldap1]
12:02:19,160 INFO [management.subsystems.ChildApplicationContextFactory] Stopped 'Authentication' subsystem, ID: [Authentication, managed, ldap1]
Is there a way I can get debug log like when i enter user-name/password in alfresco home page what happens exactly? Can we configure a log like that? I have seen many comments on alfresco.log but in my system I can't find alfresco.log. Any help with this?
Any idea to solve this issue will highly be appreciated.
Soh
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
After reading different question/answers on alfresco forums so far I have tried the following options but no luck :-(
#ldap.authentication.userNameFormat=uid\=%s
#ldap.authentication.userNameFormat=uid\=%s@companyname.local
#ldap.authentication.userNameFormat=uid\=%s,ou\=alfresco,dc\=companyname,dc\=local
ldap.authentication.userNameFormat=CN=tlr\%s,ou\=alfresco,dc\=companyname,dc\=local
Any help??
smkhawaja
- Posts
- 18
- Achievements
- 1
- Member for
- 3 years 4 months
Stats
I have fixed it with
ldap.authentication.userNameFormat=CN=%s,ou=alfresco,dc=dare,dc=local
Thanks to all