cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration order and CIFS '11030000 NetBIOS SMB..' error

annakan
Champ in-the-making
Champ in-the-making
Hello all.

I am trying to get Alfresco running in a FreeBSD jail with linux compat.
I say that for reference but my question is much more general  with a precise implication.

I have everything working fine, except I had to use the "text installer" and do the @@—@@ replace by myself. I was never able to figure out what requirement the installer has for starting graphically, It never did under the few X11 client I started, even under KDE, always defaulting to the console one.

Now the last thing I need to get working is CIFS.

Problem description

Each time I lauch Alfresco the log report this (both in alfresco.log and catalina.out):
tomcat/logs/catalina.out-39-org.alfresco.error.AlfrescoRuntimeException: 11030000 NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled
16:59:29,845 ERROR [org.alfresco.fileserver] CIFS server configuration error, 11030000 NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled
org.alfresco.error.AlfrescoRuntimeException: 11030000 NetBIOS SMB, TCP/IP SMB or Win32 NetBIOS must be enabled
        at org.alfresco.filesys.config.ServerConfigurationBean.processCIFSServerConfig(ServerConfigurationBean.java:906)
        at org.alfresco.filesys.AbstractServerConfigurationBean.init(AbstractServerConfigurationBean.java:475)
        at org.alfresco.filesys.AbstractServerConfigurationBean.onApplicationEvent(AbstractServerConfigurationBean.java:824)
        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:246)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:637)
        at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:454)
        at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:377)
        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:246)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        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.deployDescriptor(HostConfig.java:627)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        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:578)
        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:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

I did my homework and found this http://tech.barwick.de/java/alfresco-enabling-cifs-in-freebsd.html that explains that CIFS needs a platform information to determine if it must use the jni implementation or the pure jlan one.
The code is good enough to default to the jlan one when no platform is specified in
<tcpipSMB platforms="linux,solaris,macosx"/>
<netBIOSSMB platforms="linux,solaris,macosx"/>

in the WEB-INF/classes/alfresco/file-servers.xml file…
I checked it is still the case in the sources line 658-680 of source\java\org\alfresco\filesys\ServerConfigurationBean.java.

But removing the platforms="linux,solaris,macosx" attribute seems to do nothing.
In fact changing anything in the file WEB-INF/classes/alfresco/file-servers.xml seems to do nothing.
Even REMOVING the file WEB-INF/classes/alfresco/file-servers.configuration file from the whole Alfresco directory tree seems to change nothing either.

Questions

Where does the default configuration values come from ?

Am I right to deduce from the fact that removing the file-servers.xml is without consequence on the startup sequence (CIFS fail, FTP is enabled etc ..) means the default are coming from somewhere else (another file perhaps) ? Or are those defaults hard-coded in the java source and the same as the one in the file-servers.xml file ?

What is the configuration strategy ?
Alfresco seems to move from the multiple file everywhere configuration structure to a more centralized one in alfresco-global.properties , at least for common values. I can only applaud this since, for now, even basic configuration is daunting for newbies , and we really lack a map of the maze Smiley Happy.  Plus I really don't appreciate the -custom override strategy where I have to DUPLICATE a whole file to change ONE parameter.. somehow it smells wrong : duplication IS evil right ? Smiley Happy
Anyhow my question is : Where can I find the valid parameters for the alfresco-global.properties file ?
Can I put in there any value from any $(xxx.yyy) (like ${cifs.broadcast}) stance I find in a .xml configuration file with xxx.yyy=value in the alfresco-global.properties file, and it will be picked up by the configuration machinery ? Or is it true only for specific values that have a "special treatment" ?
I tried to had
cifs.enabled=true
cifs.serverName=${localname}
cifs.domain="Alfresco"
cifs.hostannounce=true
cifs.broadcast=10.255.255.255
cifs.ipv6.enabled=false

cifs.tcpipSMB.port=6301
cifs.netBIOSSMB.namePort=6001
cifs.netBIOSSMB.datagramPort=6101
cifs.netBIOSSMB.sessionPort=6201
into the alfresco-global.properties file but it changed nothing.

CIFS requirement
More specifically, has anybody a pointer about the enabled / disabled cifs determination strategy that could explain why it refuses to start in my case ?
Has anyone succeeded activating it under freeBSD with the 3.2 community release ?


Thanks a lot for your time and answers.

Cheers.
2 REPLIES 2

annakan
Champ in-the-making
Champ in-the-making
I reply with a partial answer.

Tests showed that the  alfresco-global.properties parameter where having an influence on the server start up configuration BUT neither the WEB-INF/classes/alfresco/file-servers.xml NOR the tomcat/shared/classes/alfresco/extension/file-servers-custom.xml did have an influence or played a role.

I did a global search on
 ${cifs.
and low and behold I got my hand on this file : \Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\fileServers\default\file-servers-context.xml where the parameters ARE set AND taken into account at start up (as defined int the bean of id cifsServerConfig).

I removed the platform values in the tcpipSMB and netBIOSSMB properties and the CIFS support started right away.

here is the bean parameters for references :
<bean id="cifsServerConfig" class="org.alfresco.filesys.config.CIFSConfigBean">
      <property name="serverEnabled">
         <value>${cifs.enabled}</value>
      </property>
      <property name="serverName">
         <value>${cifs.serverName}</value>
      </property>
      <property name="domainName">
         <value>${cifs.domain}</value>
      </property>
      <property name="serverComment">
         <value>Alfresco CIFS Server</value>
      </property>
      <!– Set to the broadcast mask for the subnet –>
      <property name="broadcastAddress">
         <value>${cifs.broadcast}</value>
      </property>
      <!– Set to the IP for the adapter for Java socket –>
      <property name="bindToAddress">
         <value>${cifs.bindto}</value>
      </property>
      <!– Use Java socket based NetBIOS over TCP/IP and native SMB on linux –>
      <property name="tcpipSMB">
         <bean class="org.alfresco.filesys.config.TcpipSMBConfigBean">
            <!–
               Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard
               ports
            –>
            <property name="port">
               <value>${cifs.tcpipSMB.port}</value>
            </property>
            <property name="platforms">
               <value></value>
            </property>
            <property name="ipv6Enabled">
               <value>${cifs.ipv6.enabled}</value>
            </property>
         </bean>
      </property>
      <property name="netBIOSSMB">
         <bean class="org.alfresco.filesys.config.NetBIOSSMBConfigBean">
            <property name="bindTo">
               <value>${cifs.bindto}</value>
            </property>
            <property name="sessionPort">
               <value>${cifs.netBIOSSMB.sessionPort}</value>
            </property>
            <property name="namePort">
               <value>${cifs.netBIOSSMB.namePort}</value>
            </property>
            <property name="datagramPort">
               <value>${cifs.netBIOSSMB.datagramPort}</value>
            </property>
            <property name="platforms">
               <value></value>
            </property>
         </bean>
      </property>

      <property name="hostAccouncerEnabled">
         <value>${cifs.hostannounce}</value>
      </property>
      <property name="hostAccounceInterval">
         <value>5</value>
      </property>

      <!– Use Win32 NetBIOS interface on Windows –>
      <property name="win32NetBIOS">
         <bean class="org.alfresco.filesys.config.Win32NetBIOSConfigBean" />
      </property>
      <property name="win32HostAnnouncerEnabled">
         <value>${cifs.hostannounce}</value>
      </property>
      <property name="win32HostAnnounceInterval">
         <value>5</value>
      </property>

      <!– CIFS authentication –>
      <property name="authenticator">
         <ref bean="CifsAuthenticator" />
      </property>

      <!– Disable the use of asynchronous sockets/NIO code –>
      <property name="disableNIO">
         <value>${cifs.disableNIO}</value>
      </property>

      <!– Disable the use of JNI code –>
      <!– Only currently affects Windows –>
      <property name="disableNativeCode">
         <value>${cifs.disableNativeCode}</value>
      </property>

      <!– Session timeout, in seconds –>
      <!– Defaults to 15 minutes, to match the default Windows client setting        –>
      <!– If no I/O is received within that time the session is closed by the server –>
      <property name="sessionTimeout">
         <value>${cifs.sessionTimeout}</value>
      </property>

      <!– Enable WINS if used for NetBIOS name lookups –>
      <property name="WINSConfig">
         <bean class="org.alfresco.filesys.config.WINSConfigBean">
            <property name="autoDetectEnabled">
               <value>${cifs.WINS.autoDetectEnabled}</value>
            </property>
            <property name="primary">
               <value>${cifs.WINS.primary}</value>
            </property>
            <property name="secondary">
               <value>${cifs.WINS.secondary}</value>
            </property>
         </bean>
      </property>

      <!–
      <property name="sessionDebugFlags"> <value>Negotiate,Socket</value> </property>
      –>
   </bean>

I suppose this file is part of the transition process to a more manageable configuration structure and is the sources of the alfresco-global.properties configurability.

I would still love to have a clear map of configuration layers and order of precedence, the configuration strategy, and some guide of the "who does what" … Smiley Happy


Hope it helps somebody.

dward
Champ on-the-rise
Champ on-the-rise
See http://wiki.alfresco.com/wiki/File_Server_Subsystem

file-servers.xml and file-servers-custom.xml are no longer used.