Penguin, small TECH.BARWICK.DE
Java
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

Tuesday, October 30, 2007

Alfresco: Enabling CIFS in FreeBSD

Alfresco is a Java-based enterprise content management system, and as such it should run on any reasonable platform which supports Java. So, my client wants it installed on a FreeBSD server - no problems, methinks. After all, the Alfresco specifications page lists "Unix" as a supported platform.

And true enough - after various miscellaneous tribulations related to getting Java set up on a remote server in a country on the other side of the globe with a somewhat bandwidth-challenged connection to the outside world, I got the Alfresco working as expected. Except for one annoying problem: how to enable the built-in CIFS support, which was one of the "killer features" the client was after.

CIFS support is turned on by default and is controlled by an entry in WEB-INF/classes/alfresco/file-servers.xml (and which can be overridden by a custom configuration file in tomcat/shared/classes/alfresco/extension/file-servers-custom.xml; configuration information). However, the log file was coming up with this error:

14:34:16,211 ERROR [org.alfresco.smb.protocol] CIFS server configuration error, NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled
org.alfresco.error.AlfrescoRuntimeException: NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled

The relevant secton in the file-servers.xml file looks like this:

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

and it would be reasonable to assume the platforms attribute would need an entry freebsd or similar so Alfresco will enable TCP/IP SMB. Unfortunately (as of the time of writing) the valid settings don't seem to be documented, and no-one else seems to have encountered the same problem (or at least reported it online). Various trial-and-error settings such as freebsd, unix and bsd had no effect, and eventually I had to put the problem on the back burner.

Looking at the problem afresh (and not getting any answer from various forums), I decided to take a look at the section of the source code responsible for parsing the file-servers.xml, and that revealed that the only acceptable values for platforms are linux, macosx, solaris and windows. Which isn't very encouraging, but a further look reveals that if the platforms attribute isn't set at all, no OS checks are made and the TCP/IP SMB service will be started.

So to get Alfresco's CIFS service running under FreeBSD, simply change the tcpipSMB and netBIOSSMB settings in file-servers.xml (or preferably file-servers-custom.xml) to this:

    <!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
      <tcpipSMB/>
      <netBIOSSMB/>

Posted at 4:59 PM |Comments (5)

Comments
Hello.

Thanks for this great tip I'll never have been able to find by myself in a finite time or even infinite.

Are you still using it and having an alfresco install running ?

I am trying to get alfresco 3.2 community to work on freebsd 8 and the last thing I have to enable if CIFS to no avail at the moment.

I was wondering is you had success keeping this tip alive and working, thus implying I was not good enough to use it properly, or if something had changed in the platform checking code that would prevent it to work now .....

thanks a lot for sharing your knowledge.

X.
Posted by: Annakan | 2009-12-01 22:32
Unfortunately I have not had a chance to upgrade this setup, though it might be on the cards in the next couple of months.
Posted by: Ian Barwick | 2009-12-03 15:42
Hello I managed to solve the problem by taking your knowledge to the brand new spot and configuration file where it now applies :)
I posted about it in the alfresco forum there : http://forums.alfresco.com/en/viewtopic.php?f=9&t=23683&p=77583#p77583

To sum it up in the 3.2 community release the configuration file that is taken into account is \Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\fileServers\default\file-servers-context.xml. The format is a bit different but the trick is the same : remove the platform enumeration in the cifs configuration "sub"-beans.

Hope it helps when you'll upgrade :)
Posted by: Annakan | 2009-12-07 15:04
Thanks for the update, I'm sure that will save me a bit of heartache!
Posted by: Ian Barwick | 2009-12-07 23:55
Hello,

Any specific docs to follow to install Alfresco on Freebsd 7?

Regards,

Ayam
Posted by: ayam666 | 2010-02-04 04:40