cancel
Showing results for 
Search instead for 
Did you mean: 

CIFS Server not starting

ds-crcpress
Champ in-the-making
Champ in-the-making
I am having some trouble getting CIFS working.  I have Aflresco Community hosted on a FreeBSD system.  The following is my configuration:


<alfresco-config area="file-servers">
   <config evaluator="string-compare" condition="Filesystems" replace="true">
      <filesystems>
         <filesystem name="CIFS Server">
            <serverEnable enabled="true"/>
            <host name="${localname}A"/>
            <comment>Alfresco CIFS Server</comment>
            <broadcast>255.255.255.0</broadcast>
            <tcpipSMB platforms="linux,solaris,macosx"/>
            <netBIOSSMB platforms="linux,solaris,macosx"/>
            <hostAnnounce interval="5"/>
            <sessionDebug flags="Negotiate,Socket"/>
         </filesystem>
      </filesystems>
   </config>
</alfresco-config>

Here is the stack trace on startup:

16:30:24,639 ERROR [server.repo.ContentDiskDriver] Error during create context
org.alfresco.filesys.server.core.DeviceContextException: Device missing init value: store
        at org.alfresco.filesys.smb.server.repo.ContentDiskDriver.createContext(ContentDiskDriver.java:328)
        at org.alfresco.filesys.server.config.ServerConfiguration.processFilesystemsConfig(ServerConfiguration.java:2086)
        at org.alfresco.filesys.server.config.ServerConfiguration.init(ServerConfiguration.java:611)
        at org.alfresco.filesys.server.config.ServerConfiguration.onBootstrap(ServerConfiguration.java:4122)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
16:30:24,642 ERROR [alfresco.smb.protocol] File server configuration error, null
java.lang.NullPointerException
        at org.alfresco.filesys.smb.server.repo.ContentDiskDriver.createContext(ContentDiskDriver.java:505)
        at org.alfresco.filesys.server.config.ServerConfiguration.processFilesystemsConfig(ServerConfiguration.java:2086)
        at org.alfresco.filesys.server.config.ServerConfiguration.init(ServerConfiguration.java:611)
        at org.alfresco.filesys.server.config.ServerConfiguration.onBootstrap(ServerConfiguration.java:4122)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
16:30:24,643 ERROR [alfresco.smb.protocol] CIFS and FTP servers not started due to filesystem initialization error
Exception in thread "SMB Server" java.lang.NullPointerException
        at org.alfresco.filesys.smb.server.SMBServer.run(SMBServer.java:425)
        at java.lang.Thread.run(Thread.java:595)

I tried taking a look at the current HEAD of the Alfresco source code, but I don't even have org.alfresco.filesys.smb.server.SMBServer (although there is a SMBServer in the jlan project–but still not close enough).  I figure it is probably a configuration issue.

Anybody know of what I'm doing wrong?

Thanks,

David
12 REPLIES 12

jottley
Confirmed Champ
Confirmed Champ
a couple of ideas here:  Firewalls,  are there ports open on the BSD machine to allow connections on 139 and 445?  And can you look and see if there are any errors in the log file when you try to connect?

ds-crcpress
Champ in-the-making
Champ in-the-making
I enabled logging for SMB/CIFS, per your suggestion about checking for errors.  I got the following error message:
CIFS server configuration error, NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled

I did a quick search on google and found this: http://tech.barwick.de/java/alfresco-enabling-cifs-in-freebsd.html which I tried and now it is working perfectly.

The gist of the article is that you remove the platforms attribute for <tcpipSMB /> and <netBIOSSMB />, and that seems to prevent platform checking and starts services anyway.

I should have enabled logging on SMB from the start.  Smiley Surprisedops:

Thank you very much for your assistance.

-David

jottley
Confirmed Champ
Confirmed Champ
Nice find! I'm going to have to file that one away.