[jcifs] SMB Error 0xC0000205 (STATUS_INSUFF_SERVER_RESOURCES)

Michael B Allen ioplex at gmail.com
Sun Mar 18 00:20:38 MDT 2012


On Thu, Mar 15, 2012 at 4:26 PM, John McCarthy <jmsignup at gmail.com> wrote:
> Hi everyone,
> First off, let me say thank you for developing jCIFS.  It has been very helpful,
> and I appreciate your hard work and help.
>
> I'm having an issue on a Windows Server 2008 R2 64-bit system where sometimes I
> get SMB Error 0xC0000205 returned when instantiating an SmbFileOutputStream with
> an SmbFile.  Here's the relevant portion of the stack trace using jcifs-
> 1.3.17.jar,
>        Caused by: jcifs.smb.SmbException: 0xC0000205
>        at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
>        at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
>        at jcifs.smb.SmbSession.send(SmbSession.java:238)
>        at jcifs.smb.SmbTree.send(SmbTree.java:119)
>        at jcifs.smb.SmbFile.send(SmbFile.java:775)
>        at jcifs.smb.SmbFile.open0(SmbFile.java:989)
>        at jcifs.smb.SmbFile.open(SmbFile.java:1006)
>        at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
>        at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
>        at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:67)
>
> Now, I'm pretty convinced this is a Windows error because I have captured and
> analyzed network packets when this occurs.  I posted the following to
> Microsoft's forums,
>  http://social.msdn.microsoft.com/Forums/en-
> US/windowsgeneraldevelopmentissues/thread/35d375b8-7f2e-482b-9e2b-295c5a9699ed/
> As you can see, they redirected me here.  I'm fairly certain this isn't a jCIFS
> issue, but I would appreciate any help and insight you can offer.
>
> Here's the content of the MSDN post,
>
> I'm using the Java library jCIFS to transfer files to a share on a Windows 2008
> R2 64-bit server with authentication.  I'm running into an intermittent issue
> where the server responses with SMB error code 0xC0000205, which is
> STATUS_INSUFF_SERVER_RESOURCES: "Insufficient server memory to perform the
> requested operation" (from SMB Error Classes and Codes).  This error is coming
> back in response to a SMB_COM_NT_CREATE_ANDX command.
>
> These servers have plenty of free physical memory (>4GB free, >=8GB on the
> system typically), and there are no corresponding events in the Windows Event
> Viewer.  Immediate retries of the same operation sometimes succeed and sometimes
> fail for the same reason.
>
> I've tried the workaround described in the KB307257 regarding the XactMemSize
> parameter, but the problem keeps coming up.  I'm looking for any more
> information here and haven't found much searching around.  Is there a way to
> enable more SMB logging or events?  This is through the LanmanServer process,
> right?  I've browsed the LanmanServer configuration parameters without finding
> anything.

Hi John,

Yeah, this is almost certainly not a JCIFS issue. Your server is quite
simply choking. Although this type of error is a little unusual. I
think even a wimpy server should be able to handle 5-10 NT_CREATE_ANDX
per second. Look at a capture and see how many SMB_COM_NT_CREATE_ANDX
commands you're sending per second. I wonder if something is not
cleaning up after itself. And that something could be your code. Make
sure you're calling SmbFileOutputStream.close properly and in a timely
manner. Look at the open file handles in server manager (right click
on Computer, click Manage, ...).

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list