Home

Alfresco 3.2 + passthru exception

You are here

9 posts / 0 new
Last post
Alfresco 3.2 + passthru exception

Hi,

I was configured alfresco 3.2 with passthru authentication chain.

When I access the fileserver \\serverA in the catalina.out appear this exception and fileserver request username/password.

12:27:14,306 ERROR [smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
at org.alfresco.jlan.util.IPAddress.asInteger(IPAddress.java:137)
at org.alfresco.jlan.server.auth.CifsAuthenticator.mapClientAddressToDom
ain(CifsAuthenticator.java:958)
at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.getAuthConte
xt(PassthruCifsAuthenticator.java:389)
at org.alfresco.jlan.server.auth.CifsAuthenticator.generateNegotiateResp
onse(CifsAuthenticator.java:378)
at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.generateNego
tiateResponse(PassthruCifsAuthenticator.java:448)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory
$1.invoke(ChainingSubsystemProxyFactory.java:109)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:204)
at $Proxy186.generateNegotiateResponse(Unknown Source)
at org.alfresco.jlan.smb.server.SMBSrvSession.procSMBNegotiate(SMBSrvSes
sion.java:1199)
at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSessio
n.java:1452)
at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadR
equest.java:57)
at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(Th
readRequestPool.java:141)
at java.lang.Thread.run(Thread.java:595)
12:27:14,322 DEBUG [smb.protocol.auth] Using Write transaction
12:27:14,322 DEBUG [smb.protocol.auth] No PassthruDetails for WSNB2
12:27:14,322 DEBUG [smb.protocol.auth] Using Write transaction
12:27:14,322 DEBUG [smb.protocol.auth] No PassthruDetails for WSNB2

I don't know If I have problems in the configuratuion files, classpath, etc etc

Thanks for all replies.

Re: Alfresco 3.2 + passthru exception

Does the fileserver work with a manual login box, without passthru?

While it looks like https://issues.alfresco.com/jira/browse/JLAN-46 it should be fixed
https://issues.alfresco.com/jira/browse/ALFCOM-2165.
Maybe a password encoding issue on the side of your AD server - do you use simple or MD-5 hashes?

Re: Alfresco 3.2 + passthru exception

Quote:
Does the fileserver work with a manual login box, without passthru?

Yes, the fileserver work fine if the user was created in alfresco core database. The issue is that a user can't access to fileserver with passthru authentication. Passthru work fine when access by web browser to alfresco home,but not when accessing a CIF server.

I read the post but not solved my problem.

Quote:
Maybe a password encoding issue on the side of your AD server - do you use simple or MD-5 hashes?

I think that Windwos Server 2003 make a hash encode with MD5 algoritm in SAM files. I don't know how can I modified this configuration, but I think that there is not problem with my AD. I'm not sure I understand your question, I'm sorry.

Thanks for your support and I hope this issue will encourage everyone to solve :P

Re: Alfresco 3.2 + passthru exception

So it's clear, that this is an issue with CIFS and only when authenticating via passthru - so you narrowed it down a lot!
Your AD seems to be Windows Server 2003, right? And your client? Is it Vista or XP (VIsta is using a newer SMB protocol version as standard but that can be changed)?
If you have the time to try, you could use a nightly build of Alfresco Community, which may integrate some CIFS bugfixes, too:
http://dev.alfresco.com/downloads/nightly/dist/. The configuration stayed the same and an upgrade is mostly flawlessly (although this should be done on a test server, of course).
Since October 13th there is even a 3.2 refresh: http://wiki.alfresco.com/wiki/Download_Community_Edition.

Unfortunately, I'm not an expert with password encodings. Glad that it is working on my side :-)

Re: Alfresco 3.2 + passthru exception

Hello _sax, thanks for your dedication time and replies

Yes, my AD is a Windows Server 2003r, the alfresco is deployed in a tomcat container on Windows XP and the client is another Windows XP.

I was proved a nightly dist and alfresco 3.2r community but I have the same problem, the CIF authentication with passthru not work. :? The same error.

If a chain in alfresco-global.properties is:

authentication.chain=passthru1:passthru

I have the next exception when a windows user tries to access the CIF server:

11:01:44,023 ERROR [smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
at org.alfresco.jlan.util.IPAddress.asInteger(IPAddress.java:137)
at org.alfresco.jlan.server.auth.CifsAuthenticator.mapClientAddressToDom
ain(CifsAuthenticator.java:1020)
at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.getAuthConte
xt(PassthruCifsAuthenticator.java:425)
at org.alfresco.jlan.server.auth.CifsAuthenticator.generateNegotiateResp
onse(CifsAuthenticator.java:424)
at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.generateNego
tiateResponse(PassthruCifsAuthenticator.java:484)
at org.alfresco.jlan.smb.server.SMBSrvSession.procSMBNegotiate(SMBSrvSes
sion.java:1177)
at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSessio
n.java:1431)
at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadR
equest.java:57)
at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(Th
readRequestPool.java:141)
at java.lang.Thread.run(Thread.java:595)

If the chain authentication in alfresco-global.properties is:

authentication.chain=passthru1:passthru,alfrescoNtlm1:alfrescoNtlm

I have the exception posted previously :(

Re: Alfresco 3.2 + passthru exception

Actually I'm running out of ideas to solve it.
But to sum it up, you have passthru working with the browser's webclient and CIFS with local Alfresco users but not the combination CIFS with passthru.

When turning on the passthru authentication, the log says
11:01:44,023 ERROR [smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
when the authentication chain consists of only passthru and
12:27:14,306 ERROR [smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
+
12:27:14,322 DEBUG [smb.protocol.auth] Using Write transaction
12:27:14,322 DEBUG [smb.protocol.auth] No PassthruDetails for WSNB2
when the authentication chain consists of passthru and ntlm.

Did you change the order of passthru and ntlm? But since passthru isn't even working when being the only member of the chain, this will probably not bring you further.

Maybe you can post this to JIRA (issues.alfresco.com), because with all the new versions not changing anything this is likely to be a special configuration that maybe wasn't tested thoroughly before. To put some light on it, it would be practical to use some tracing tools, but I don't know which and how.

Re: Alfresco 3.2 + passthru exception

Hi _sax,

I have proved to change the order authenticators in Alfresco's chain but not solved the issue.

I made a new entry in JIRA issues. I let the link:

https://issues.alfresco.com/jira/browse/ALFCOM-3481

I hope that one of Alfresco developers finds a solution.

Thanks for all replies and support received.

Re: Alfresco 3.2 + passthru exception

I'm getting this with Alfresco 3.1sp1 Enterprise.

Server 2003 with tomcat6 and a win xp client with a win server 2008 active directory. The passthru works fine for the webclient but fails for cifs passthru.

Here's my full chain from logs:

17:28:40,602 DEBUG [org.alfresco.fileserver] [SMB] Winsock NetBIOS session request received, caller=[PROXY:WorkStation,Unique,]
17:28:40,633 DEBUG [org.alfresco.fileserver] [SMB] Waiting for Win32 NetBIOS session request (Winsock) ...
17:28:40,633 DEBUG [org.alfresco.fileserver] [WSNB0] Server session started
17:28:40,665 DEBUG [org.alfresco.fileserver] [WSNB0] Negotiated SMB dialect - NT LM 0.12
17:28:40,774 DEBUG [org.alfresco.fileserver] [WSNB0] Assigned protocol handler - org.alfresco.jlan.smb.server.NTProtocolHandler
17:28:40,790 ERROR [org.alfresco.smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
	at org.alfresco.jlan.util.IPAddress.asInteger(IPAddress.java:137)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.mapClientAddressToDomain(CifsAuthenticator.java:1020)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.getAuthContext(PassthruCifsAuthenticator.java:425)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.generateNegotiateResponse(CifsAuthenticator.java:424)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.generateNegotiateResponse(PassthruCifsAuthenticator.java:484)
	at org.alfresco.jlan.smb.server.SMBSrvSession.procSMBNegotiate(SMBSrvSession.java:1177)
	at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1431)
	at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadRequest.java:57)
	at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
	at java.lang.Thread.run(Unknown Source)
17:28:40,852 DEBUG [org.alfresco.fileserver] [SMB] NT Session setup from user=Administrator, password=FUZZED, ANSIpwd=FUZZED, domain=MYDOMAIN, os=Windows Server 2003 R2 3790 Service Pack 2, VC=0, maxBuf=61440, maxMpx=4, authCtx=null
17:28:40,852 DEBUG [org.alfresco.fileserver] [SMB]  MID=8, UID=0, PID=65279
17:28:40,852 DEBUG [org.alfresco.smb.protocol.auth] Using Write transaction
17:28:40,883 DEBUG [org.alfresco.smb.protocol.auth]   No PassthruDetails for WSNB0
17:28:40,883 DEBUG [org.alfresco.fileserver] [SMB] User Administrator, access denied
17:28:40,946 DEBUG [org.alfresco.fileserver] [SMB] Winsock NetBIOS session request received, caller=[PROXY:WorkStation,Unique,]
17:28:40,962 DEBUG [org.alfresco.fileserver] [SMB] Waiting for Win32 NetBIOS session request (Winsock) ...
17:28:40,962 DEBUG [org.alfresco.fileserver] [WSNB1] Server session started
17:28:40,962 DEBUG [org.alfresco.fileserver] [WSNB1] Negotiated SMB dialect - NT LM 0.12
17:28:40,962 DEBUG [org.alfresco.fileserver] [WSNB1] Assigned protocol handler - org.alfresco.jlan.smb.server.NTProtocolHandler
17:28:40,993 ERROR [org.alfresco.smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
	at org.alfresco.jlan.util.IPAddress.asInteger(IPAddress.java:137)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.mapClientAddressToDomain(CifsAuthenticator.java:1020)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.getAuthContext(PassthruCifsAuthenticator.java:425)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.generateNegotiateResponse(CifsAuthenticator.java:424)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.generateNegotiateResponse(PassthruCifsAuthenticator.java:484)
	at org.alfresco.jlan.smb.server.SMBSrvSession.procSMBNegotiate(SMBSrvSession.java:1177)
	at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1431)
	at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadRequest.java:57)
	at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
	at java.lang.Thread.run(Unknown Source)
17:28:41,008 DEBUG [org.alfresco.fileserver] [SMB] NT Session setup from user=Administrator, password=FUZZED, ANSIpwd=FUZZED, domain=MYDOMAIN, os=Windows Server 2003 R2 3790 Service Pack 2, VC=0, maxBuf=61440, maxMpx=4, authCtx=null
17:28:41,024 DEBUG [org.alfresco.fileserver] [SMB]  MID=8, UID=0, PID=65279
17:28:41,024 DEBUG [org.alfresco.smb.protocol.auth] Using Write transaction
17:28:41,024 DEBUG [org.alfresco.smb.protocol.auth]   No PassthruDetails for WSNB1
17:28:41,024 DEBUG [org.alfresco.fileserver] [SMB] User Administrator, access denied
17:28:41,055 DEBUG [org.alfresco.fileserver] [SMB] Winsock NetBIOS session request received, caller=[PROXY:WorkStation,Unique,]
17:28:41,055 DEBUG [org.alfresco.fileserver] [SMB] Waiting for Win32 NetBIOS session request (Winsock) ...
17:28:41,055 DEBUG [org.alfresco.fileserver] [WSNB2] Server session started
17:28:41,055 DEBUG [org.alfresco.fileserver] [WSNB2] Negotiated SMB dialect - NT LM 0.12
17:28:41,055 DEBUG [org.alfresco.fileserver] [WSNB2] Assigned protocol handler - org.alfresco.jlan.smb.server.NTProtocolHandler
17:28:41,055 ERROR [org.alfresco.smb.protocol.auth] Passthru error getting challenge
java.lang.NullPointerException
	at org.alfresco.jlan.util.IPAddress.asInteger(IPAddress.java:137)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.mapClientAddressToDomain(CifsAuthenticator.java:1020)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.getAuthContext(PassthruCifsAuthenticator.java:425)
	at org.alfresco.jlan.server.auth.CifsAuthenticator.generateNegotiateResponse(CifsAuthenticator.java:424)
	at org.alfresco.filesys.auth.cifs.PassthruCifsAuthenticator.generateNegotiateResponse(PassthruCifsAuthenticator.java:484)
	at org.alfresco.jlan.smb.server.SMBSrvSession.procSMBNegotiate(SMBSrvSession.java:1177)
	at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1431)
	at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadRequest.java:57)
	at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
	at java.lang.Thread.run(Unknown Source)
17:28:41,071 DEBUG [org.alfresco.fileserver] [SMB] NT Session setup from user=Administrator, password=FUZZED, ANSIpwd=FUZZED, domain=MYDOMAIN, os=Windows Server 2003 R2 3790 Service Pack 2, VC=0, maxBuf=61440, maxMpx=4, authCtx=null
17:28:41,071 DEBUG [org.alfresco.fileserver] [SMB]  MID=8, UID=0, PID=65279
17:28:41,071 DEBUG [org.alfresco.smb.protocol.auth] Using Write transaction
17:28:41,071 DEBUG [org.alfresco.smb.protocol.auth]   No PassthruDetails for WSNB2
17:28:41,087 DEBUG [org.alfresco.fileserver] [SMB] User Administrator, access denied

Any help here appreciated

[SOLVED] Alfresco 3.2 + passthru exception

Hi, I've found a workaround...

I was experimenting the same NullPointerExceprion problem with my Alfresco 3.2 Comunity and I decided to go through the code. After some debugging I found waht the tproblem was. Alfresco can use 2 mechanisms to implement de SMB protocol used in the CIFS connections: tcpipSMB, netBIOSSMB. As I was runnig the applicattion in a Windows 2003 Server, the netBIOSSMB was the one that Alfresco used (I was no table to change this configuration to use the tcpipSMB native suport).

Well, the NullPointerException is due to an incorrect use of the remoteAdress property of the PacketHandler class. This property is only set by the classes that implement the tcpipSMB protocol but not by the netBIOS ones.

I've implemented a PATCH to solve this that consists of calling the PacketHandler setRemoteAddress with the value obtained trhough the HostName.

Class to modify: org.alfresco.jlan.smb.server.SMBSrvSession.java
Here is the code.

/**
	 * Class constructor.
	 * 
	 * @param handler Packet handler used to send/receive SMBs
	 * @param srv Server that this session is associated with.
	 */
	protected SMBSrvSession(PacketHandler handler, SMBServer srv) {
		super(-1, srv, handler.isProtocolName(), null);
 
		//PATCH: Calculem la RemoteAddress a partir del nom i la assignem al hanlder
		if (handler.getRemoteAddress() == null){
			try{
				handler.setRemoteAddress(InetAddress.getByName(handler.getClientName()));
			}catch(UnknownHostException ex){
				System.out.println("Error al PATCH a l'informar de l'adreça remota");
			}
		}

If someone else finds a better solution, please post it here.