cancel
Showing results for 
Search instead for 
Did you mean: 

CIFS in 1.4.0 and debugging mysteries

simon
Champ in-the-making
Champ in-the-making
Alfresco,

I'm upgrading from 1.3.2 Enterprise to 1.4.0 Enterprise on a RedHat 4 Enterprise Linux server. I choose for the full package so a complete new Tomcat installation (not only deploying the new WAR file). CIFS worked fine in 1.3.2 in our setup where we used passthru with Active Directory.

Now, in 1.4.0 I tried to copy the settings I had in my file-servers-custom.xml file in 1.3.2 to enable CIFS with AD passthru:
   <config evaluator="string-compare" condition="CIFS Server">
      <host name="alfrescotest" domain="comp"/>
      <comment>Alfresco Alhambra CIFS Server</comment>

      <!– Set to the broadcast mask for the subnet –>
      <broadcast>132.158.55.255</broadcast>

      <!– Use Java socket based NetBIOS over TCP/IP and native SMB on linux –>
      <tcpipSMB platforms="linux,solaris,macosx"/>
      <netBIOSSMB platforms="linux,solaris,macosx"/>
      <hostAnnounce interval="5"/>

      <!– Use Win32 NetBIOS interface on Windows –>
      <Win32NetBIOS/>
      <Win32Announce interval="5"/>

      <sessionDebug flags="Negotiate,Socket"/>
   </config>
   … some other settings …
   <config evaluator="string-compare" condition="Filesystem Security">
      <authenticator type="passthru">
         <Server>ldapserv</Server>
      </authenticator>
   </config>
This doesn't work. I get the following error when I try to connect with Windows and the client says "Network resource no longer available" after I gave the correct credentials (it keeps asking my username and password when I enter the wrong credentials so it seems authorization works).
12:06:24,609 ERROR [org.alfresco.smb.protocol] Closing session due to exception
java.lang.NullPointerException
        at org.alfresco.repo.security.authentication.AbstractAuthenticationComponent.
setCurrentAuthentication(AbstractAuthenticationComponent.java:137)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy16.setCurrentAuthentication(Unknown Source)
        at org.alfresco.filesys.server.auth.CifsAuthenticator.setCurrentUser(CifsAuthenticator.java:955)
        at org.alfresco.filesys.smb.server.SMBSrvSession.findVirtualCircuit(SMBSrvSession.java:287)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procChainedTreeConnectAndX(NTProtocolHandler.java:584)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procAndXCommands(NTProtocolHandler.java:505)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procAndXCommands(NTProtocolHandler.java:458)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.procSessionSetup(NTProtocolHandler.java:418)
        at org.alfresco.filesys.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:213)
        at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1334)
        at java.lang.Thread.run(Thread.java:595)
And now comes the magic… When I enable one or both of the following options in the log4j file CIFS works!
log4j.logger.org.alfresco.smb.protocol=debug
log4j.logger.org.alfresco.smb.protocol.auth=debug
I don't know why or how but with debugging turned on it goes fine?! Any idea how to solve this?
8 REPLIES 8

gary_spencer
Champ in-the-making
Champ in-the-making
Hi,

Do you have an alfresco/extension/file-servers-custom.xml file ?. Could you email me your alfresco.log file.

Thanks

Gary

lme
Champ in-the-making
Champ in-the-making
Hi,

I have the same problem here after a migration from Alfresco 1.3.1E to 1.4.0E.

Simon or Gary, did you find a solution ?


Laurent

lme
Champ in-the-making
Champ in-the-making
Here is a solution that worked for me.

Now, I use NTLM authentication insteed of the passthru authentication.

- Alfresco 1.4.0E (upgraded from Alfresco 1.3.1E) on a Debian/Sarge
- Samba 3.0.14a from Debian/Sarge
- Alfresco and Samba share the same LDAP backend
- Alfresco and Samba are on different hosts

- tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml :
no modification

- tomcat/shared/classes/alfresco/extension/ntlm-authentication-context.xml :
<beans>
    <bean id="authenticationDao" class="org.alfresco.repo.security.authentication.ntlm.NullMutableAuthenticationDao" />
    <bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.ntlm.NTLMAuthenticationComponentImpl">
        <property name="servers">
            <value>samba-server.domain.tld</value>
        </property>
        <property name="personService">
            <ref bean="personService" />
        </property>
        <property name="nodeService">
            <ref bean="nodeService" />
        </property>
        <property name="guestAccess">
            <value>false</value>
        </property>
    </bean>
</beans>

- tomcat/shared/classes/alfresco/extension/file-servers-custom.xml :
<alfresco-config area="file-servers">

   <config evaluator="string-compare" condition="CIFS Server">
      <host name="${localname}_A" domain="DOMAIN"/>
      <broadcast>192.168.1.255</broadcast>
   </config>

   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>
         <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>
            <offlineFiles/>
         </filesystem>
      </filesystems>
   </config>

</alfresco-config>

simon
Champ in-the-making
Champ in-the-making
@ Ime: Thanks for the reply. Glad you solved it but NTLM is a no go for us. I need the passthru authentication.

@ Gary: Did you get the log file I sent you on 2006.12.19?

pparkinson
Champ in-the-making
Champ in-the-making
Hey Simon,

Did you find a solution for this problem?  I get the same error under the same circumstances.

gary_spencer
Champ in-the-making
Champ in-the-making
Hi,

There have been a few updates to the passthru authenticator in the latest code to fix these problems.

Cheers

Gary

pparkinson
Champ in-the-making
Champ in-the-making
Hi Gary,

We're attempting to upgrade to 1.4.1. and I'm using the 1.4.1 jboss bundle Alfresco provides.  You mentioned latest code I thought 1.4.1 was the latest released code? Are you speaking of unreleased code?  If so, how can I resolve the problem now so that I can finish our upgrade?

pparkinson
Champ in-the-making
Champ in-the-making
Thanks Gary and Simon the fix worked!