cancel
Showing results for 
Search instead for 
Did you mean: 

cifs nullpointer exception on startup (getlocaldomainname)

bjornl
Champ in-the-making
Champ in-the-making
I have setup alfresco enterprise 2.0.1 on my local (ubuntu linux) machine, and managed to mount a cifs drive to access the AVM content, that worked out-of-the-box a few days ago, by the following command:


sudo mount -t cifs //127.0.0.1/AVM /media/alfresco/cifs/v/ -o user,noauto,username=admin,password=admin

Now when I try to repeat this procedure I get the following error on startup of alfresco:


13:34:40,026 ERROR [alfresco.smb.protocol] CIFS server configuration error, null
java.lang.NullPointerException
        at org.alfresco.filesys.server.config.ServerConfiguration.getLocalDomainName(ServerConfiguration.java:3177)


I also get this problem when setting alfresco up on another machine (same alfresco version, running a Fedora linux). I am not sure what this message tells me. Especially not since I have managed to get it working like a charm on my local machine a while back.

Some more info might maybe be helful to troubleshoot this:
When I try to mount the folder, I get the following


Connection refused

and dmesg tells me:


[17179967.924000]  CIFS VFS: Error connecting to IPv4 socket. Aborting operation
[17179967.924000]  CIFS VFS: cifs_mount failed w/return code = -111

Does anyone know what the reason for these messages are? Very grateful for some hints on this.

Regards,
Björn
1 REPLY 1

bjornl
Champ in-the-making
Champ in-the-making
So I managed to resolve this problem as described below. I guess if it's working or not depends on the network you are on and what is setup there. That would explain why I have experienced different behaviour from time to time.

http://wiki.alfresco.com/wiki/File_Server_Configuration

I edited the file <alfresco-install-dir>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-server.xml to include a specification for the domain in the <host> tag, like so:

<host name="${localname}_A" domain="WORKGROUP"/>

Also useful for debugging is to modify the tag <sessionDebug> to add a few more logging options for CIFS, like so:

<sessionDebug flags="Negotiate,Socket,Tree,Errors,NetBIOS"/>

I also modified the <alfresco-install-dir>/tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties to enable log output for classes related to CIFS (see the  comments in that file to locate it, it is easy to find).

/Björn
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.