cancel
Showing results for 
Search instead for 
Did you mean: 

org.alfresco.smb.protocol not loading properly

alauppe
Champ in-the-making
Champ in-the-making
I've installed Alfresco 2.1 on a CentOS 5 machine as per http://wiki.alfresco.com/wiki/Installing_Alfresco_Community_WAR_on_Centos_5 and am getting the following error(s) in alfresco.log

I really want to be able to use smb/cifs to access the alfresco repository. Is anyone able to point me in the right direction?

Andy

16:14:50,179 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
16:14:55,329 ERROR [org.alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
16:14:55,329 ERROR [org.alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
16:14:55,360 ERROR [org.alfresco.smb.protocol.netbios] NetBIOSNameServer setup error:
java.net.BindException: Permission denied
   at java.net.PlainDatagramSocketImpl.bind0(Native Method)
   at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
   at java.net.DatagramSocket.bind(DatagramSocket.java:368)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1085)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.run(NetBIOSNameServer.java:1611)
   at java.lang.Thread.run(Thread.java:619)
16:14:55,389 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_07-b06; maximum heap size 499.625MB
16:14:55,389 WARN  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - WARNING - maximum heap size 499.625MB is less than recommended 512MB
16:14:55,390 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
16:14:55,390 ERROR [org.alfresco.smb.protocol] Server error :
java.net.BindException: Permission denied
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:141)
   at org.alfresco.filesys.smb.server.SessionSocketHandler.initialize(SessionSocketHandler.java:257)
   at org.alfresco.filesys.smb.server.NetBIOSSessionSocketHandler.createSessionHandlers(NetBIOSSessionSocketHandler.java:165)
   at org.alfresco.filesys.smb.server.SMBServer.run(SMBServer.java:495)
   at java.lang.Thread.run(Thread.java:619)
16:14:55,391 ERROR [org.alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Permission denied
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:141)
   at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:407)
   at java.lang.Thread.run(Thread.java:619)
16:28:21,133 WARN  [org.springframework.util.FileCopyUtils] Could not close OutputStream
ClientAbortException:  java.net.SocketException: Broken pipe
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
   at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)
   at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:278)
   at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:104)
   at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:132)
   at org.alfresco.repo.content.AbstractContentReader.getContent(AbstractContentReader.java:352)
   at org.alfresco.repo.webdav.GetMethod.executeImpl(GetMethod.java:218)
   at org.alfresco.repo.webdav.WebDAVMethod$1.execute(WebDAVMethod.java:144)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:174)
   at org.alfresco.repo.webdav.WebDAVMethod.execute(WebDAVMethod.java:152)
   at org.alfresco.repo.webdav.WebDAVServlet.service(WebDAVServlet.java:129)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Broken pipe
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
   at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
   at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)
   at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
   at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)
   at org.apache.coyote.Response.doWrite(Response.java:560)
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)
   … 30 more
16:28:21,135 ERROR [org.alfresco.webdav.protocol] Internal Server Error:
org.alfresco.service.cmr.repository.ContentIOException: Failed to copy content to output stream:
   accessor: ContentAccessor[ contentUrl=store://2008/10/14/15/47/00d74f94-9a29-11dd-89a5-6ff3e84729e1.bin, mimetype=application/pdf, size=4351571, encoding=null, locale=en_US]
   at org.alfresco.repo.content.AbstractContentReader.getContent(AbstractContentReader.java:357)
   at org.alfresco.repo.webdav.GetMethod.executeImpl(GetMethod.java:218)
   at org.alfresco.repo.webdav.WebDAVMethod$1.execute(WebDAVMethod.java:144)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:174)
   at org.alfresco.repo.webdav.WebDAVMethod.execute(WebDAVMethod.java:152)
   at org.alfresco.repo.webdav.WebDAVServlet.service(WebDAVServlet.java:129)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:619)
Caused by: ClientAbortException:  java.net.SocketException: Broken pipe
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
   at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)
   at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
   at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
   at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:118)
   at org.alfresco.repo.content.AbstractContentReader.getContent(AbstractContentReader.java:352)
   … 24 more
Caused by: java.net.SocketException: Broken pipe
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
   at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)
   at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)
   at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)
   at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)
   at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
   at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)
   at org.apache.coyote.Response.doWrite(Response.java:560)
   at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)
   … 31 more
2 REPLIES 2

subemontes
Champ in-the-making
Champ in-the-making
Are u running the Server with enough Privileges ?

mliedtke
Champ in-the-making
Champ in-the-making
I ran into this issue earlier this year, and couldn't find any way around it other then to start my AppServer with sudo so that it runs as root, and can bind to port numbers lower then 1024. 

Yesterday I found a workaround to allow alfresco to bind to unrestricted ports.  You'll need to edit <alfresco-war>/WEB-INF/classes/alfresco/file-servers.xml, and uncomment these two lines

<tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
<netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>

Then you will need to forward the ports with iptables…These are the ports I forwarded.

su - root
iptables -t nat -A PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080
iptables -t nat -A PREROUTING -p tcp –dport 137 -j REDIRECT –to-port 1137
iptables -t nat -A PREROUTING -p tcp –dport 138 -j REDIRECT –to-port 1138
iptables -t nat -A PREROUTING -p tcp –dport 139 -j REDIRECT –to-port 1139
iptables -t nat -A PREROUTING -p tcp –dport 445 -j REDIRECT –to-port 1445

After doing this the server stared up, and CIFS is working.  The one goofy thing is now my CIFS server name changed form servernameA to just servername…Not sure why, but I'm ok with it.

One issue I'm still running into is with the FTP port.  I haven't found where to change the bind port for FTP.  When I start up I still get this error:

09:52:46,495 INFO  [STDOUT] 09:52:46,475 ERROR [alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:141)
        at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:407)
        at java.lang.Thread.run(Thread.java:619)