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
You've got a lot mixed and matched here.

Take a look at the file-servers.xml file in tomcat/webapps/alfresco/WEB-INF/classes/alfresco or file-servers-custom.xml in tomcat/shared/classes/alfresco/extension (make sure you make your changes in the extension directory – In fact you _should_ make your custom configuration changes in file-servers-custom.xml). Use those as you templates.  But basically you should have a section that defines the filesystems (ie what you want exposed from the repository) and another section that defines your CIFS server.

Example (not complete config element):
 <config evaluator="string-compare" condition="Filesystems">
          <filesystems>
                 
                 <!– Alfresco repository access shared filesystem –>
         <filesystem name="Alfresco">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>

Example (not complete config element):
<config evaluator="string-compare" condition="CIFS Server">
          <serverEnable enabled="true"/>
      <host name="${localname}A"/>
      <comment>Alfresco CIFS Server</comment>

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

ds-crcpress
Champ in-the-making
Champ in-the-making
The first code that I posted was my shared/classes/alfresco/extension/file-servers-custom.xml contents.  When I choose replace="true" that only replaces the configuration that matches the name correct?  In other words, this won't neglect the default FTP Server, AVM server, and Filesystem configuration right?

To get this started I just copied the configuration from the webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml file and customized it in the extension directory.

-David

jottley
Confirmed Champ
Confirmed Champ
Correct, replacing just the one section will not affect the other defaults. But what you have in there belongs in the CIFS Server config element, not in the Filesystems config element.

ds-crcpress
Champ in-the-making
Champ in-the-making
Ah, yes I just noticed that a few minutes ago when I compared the two files side by side and realized it was defined in the filesystems block.  Smiley Surprisedops:

Restarting now to test…

ds-crcpress
Champ in-the-making
Champ in-the-making
Okay, it seems to be working… sort of.

I try to connect via Windows Explorer to \\{ipofhost}\alfresco but every username/pass I type fails.  I defined the domain as ALFRESCO.  So when windows prompts me, I try ALFRESCO\{username} as well as just {username}, hostnameA\{username}, etc.  Nothing seems to work.

I tried accessing it from a machine in the same network location and no luck at all.  So I tried putting Alfresco in the same workgroup as the remote machine and its viewable (I can get a login prompt) but it still doesn't let me in.

Any idea?

Thanks,

David

jottley
Confirmed Champ
Confirmed Champ
Are you using an LDAP backend?

ds-crcpress
Champ in-the-making
Champ in-the-making
No LDAP, it is using the default authentication mechanism provided by Alfresco.

Thanks,

David

jottley
Confirmed Champ
Confirmed Champ
What version of Windows?

ds-crcpress
Champ in-the-making
Champ in-the-making
I am trying to access the share from a Windows XP Pro machine, and a Windows 2003 Terminal Server.  Alfresco itself is running on FreeBSD 6.3-STABLE.

-David