Linux SCP File transfer No space left on device?

2,320

Solution 1

Just another guess: Is the SCP server running on the Windows machine a 64-bit software? If that's a 32-bit executable it will probably not support files over 4 GB (okay, GiB, so 4 x 1024 x 1024 x 1024 bytes).

Quick check: if you see "*32" in the Task Manager after the filename then that's a 32-bit executable. (See more: https://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows )

But if it's a 64-bit executable that still does not guarantee it can handle files over 4 GB...

Have you tried to transfer files about 4 GB? If a file below 4 GB (for example 3800 MB) is transferred without any problems but larger than 4 GB fails then the best guess is that SCP server can't handle this big files.

Another guess: there might be low disk space in the temp directory (opening %TEMP% will lead you there).

Solution 2

I was investiagted the same: it could be if you was trying to upload big files and just not done it (i.e in the Midnight Commander (mc)) it will saved in the /tmp and it could be over 1Gb, thats why it could notify "No space left on device".. Try to check the free space on the LOCAL machine and check the "/tmp":

 # df -Th
 ...
 tmpfs          tmpfs    1001M 1001M     0 100% /tmp
 ...

In this case you need to remove files (seems from previous transfers) like this:

 # rm /tmp/mc-root/*
Share:
2,320
user1144596
Author by

user1144596

Updated on September 18, 2022

Comments

  • user1144596
    user1144596 over 1 year

    I am using .NET 4.5.2 for a web application and I have a HTTP handler that returns a processed image. I am making async calls to the process handler using jQuery and i have started getting the following error:

    An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>. This exception may also indicate an attempt to call an "async void" method, which is generally unsupported within ASP.NET request processing. Instead, the asynchronous method should return a Task, and the caller should await it.

    This is the handler code:

           public void ProcessRequest(HttpContext context)
        {
            string CaseID = context.Request.QueryString["CaseID"].ToString();
            int RotationAngle = Convert.ToInt16(context.Request.QueryString["RotationAngle"].ToString());
            string ImagePath = context.Request.QueryString["ImagePath"].ToString();
    
            applyAngle = RotationAngle;
    
            string ImageServer = ConfigurationManager.AppSettings["ImageServerURL"].ToString();
            string FullImagePath = string.Format("{0}{1}", ImageServer, ImagePath);
    
            WebClient wc = new WebClient();
            wc.DownloadDataCompleted += wc_DownloadDataCompleted;
            wc.DownloadDataAsync(new Uri(FullImagePath));
        }
    
        private void wc_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
        {
            Stream BitmapStream = new MemoryStream(e.Result);
    
            Bitmap b = new Bitmap(BitmapStream);
            ImageFormat ImageFormat = b.RawFormat;
    
            b = RotateImage(b, applyAngle, true);
    
            using (MemoryStream ms = new MemoryStream())
            {
                if (ImageFormat.Equals(ImageFormat.Png))
                {
                    HttpContext.Current.Response.ContentType = "image/png";
                    b.Save(ms, ImageFormat.Png);
                }
    
                if (ImageFormat.Equals(ImageFormat.Jpeg))
                {
                    HttpContext.Current.Response.ContentType = "image/jpg";
                    b.Save(ms, ImageFormat.Jpeg);
                }
                ms.WriteTo(HttpContext.Current.Response.OutputStream);
            }
        }
    

    Any idea what this means and I could do to overcome this?

    Thanks in advance.

    • Panagiotis Kanavos
      Panagiotis Kanavos over 7 years
      Overcome what? Where is the code? What did you try to do that caused this?
    • Panagiotis Kanavos
      Panagiotis Kanavos over 7 years
      Your handler code. jQuery has nothing to do with HTTP handlers, it only runs on the browser.
    • user1144596
      user1144596 over 7 years
      Added code, please review.
    • Panagiotis Kanavos
      Panagiotis Kanavos over 7 years
      And the full exception please. Where does the error occur? On which line? Have you tried debugging this? You can get the full exception and call stack with Exception.ToString(). If you don't have logging, add it. I suspect that you'll find the problem yourself once you find which line throws
    • Panagiotis Kanavos
      Panagiotis Kanavos over 7 years
      Are you trying to use a local Webclient with events on server side code? This variable will be disposed as soon as ProcessRequest finishes! Anyway, even WebClient has true asynchronous methods, ie DownloadDataTaskAsync. You should never use events for asynchronous operations, that's a leftover from .NET 2
    • Gert van den Berg
      Gert van den Berg almost 6 years
      The details on the SSH / SCP server implementation on the Windows side is missing. (Windows 10 / 2016 added a server, but this post long predates that)
  • Tyler
    Tyler almost 12 years
    CentOS scp -v /backup/site/file.gz admin@IPADDRESS:/folder I beleive it is winscp on the windows box
  • Lucas Kauffman
    Lucas Kauffman almost 12 years
    And what daemon is running on windows to accept this?
  • Tyler
    Tyler almost 12 years
    Yes, that drive has over 100gig free. The file I am transferring is around 5gig
  • mnmnc
    mnmnc almost 12 years
    did you checked if correct NTFS permission has been set? Is the deamon which is handling the transfer has the write/modify/delete permissions? Is this a windows server? If yes - is there a quota implemented per user?
  • Lucas Kauffman
    Lucas Kauffman almost 12 years
    Also, why not just go on the windows machine and pull it with winscp?
  • Magellan
    Magellan almost 12 years
    I'm pretty sure that Windows doesn't have a native SCP implementation. That's a rather key piece of information, to be honest. If you aren't running an SSH service with SCP, you're stuck until you sort that out.
  • user1144596
    user1144596 over 7 years
    Thanks Panagiotis Kanavos
  • emk2203
    emk2203 over 6 years
    Not exactly the answer to the question, but certainly the answer to my problem!
  • Gert van den Berg
    Gert van den Berg almost 6 years
    It depends on the application. Some 32 bit applications can deal with large files and some 64-bit applications can't. The easiest way to know is to read the client (and server's) documentation.