Unexplained rsync disconnect

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I'm rsyncing in to a shared web host from a Yosemite client.



I've set up my authorized keys and can ssh in just fine, and scp files over no problem.



When I rsync with the -n (dry-run) option, it lists changed files, no error.



But when I use the same exact command without -n, I get this:



building file list ... done
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]


No idea why - I've searched the web for an hour, no clue without any other error message to go by.



Any thoughts?










share|improve this question




























    2















    I'm rsyncing in to a shared web host from a Yosemite client.



    I've set up my authorized keys and can ssh in just fine, and scp files over no problem.



    When I rsync with the -n (dry-run) option, it lists changed files, no error.



    But when I use the same exact command without -n, I get this:



    building file list ... done
    rsync: connection unexpectedly closed (8 bytes received so far) [sender]
    rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]


    No idea why - I've searched the web for an hour, no clue without any other error message to go by.



    Any thoughts?










    share|improve this question
























      2












      2








      2


      1






      I'm rsyncing in to a shared web host from a Yosemite client.



      I've set up my authorized keys and can ssh in just fine, and scp files over no problem.



      When I rsync with the -n (dry-run) option, it lists changed files, no error.



      But when I use the same exact command without -n, I get this:



      building file list ... done
      rsync: connection unexpectedly closed (8 bytes received so far) [sender]
      rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]


      No idea why - I've searched the web for an hour, no clue without any other error message to go by.



      Any thoughts?










      share|improve this question














      I'm rsyncing in to a shared web host from a Yosemite client.



      I've set up my authorized keys and can ssh in just fine, and scp files over no problem.



      When I rsync with the -n (dry-run) option, it lists changed files, no error.



      But when I use the same exact command without -n, I get this:



      building file list ... done
      rsync: connection unexpectedly closed (8 bytes received so far) [sender]
      rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-45/rsync/io.c(453) [sender=2.6.9]


      No idea why - I've searched the web for an hour, no clue without any other error message to go by.



      Any thoughts?







      rsync






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 4 '15 at 19:25









      jfacemyerjfacemyer

      11315




      11315




















          4 Answers
          4






          active

          oldest

          votes


















          1














          The server may be returning an @ERROR message, but the client may be misreporting it as a premature EOF instead.



          The first step is to figure out what the underlying error is. I suggest you run rsync with simpler flags to see if it works. It's possible that rsync is failing to load libz but it doesn't notice until it's time to compress something.



          The second step is to get the Yosemite-side client to tell you something about those 8 bytes it received. If adding enough -v flags doesn't do the trick, I suggest building a newer rsync (e.g. using Homebrew and the homebrew/dups keg). It may tell you something useful that the relatively-old rsync in stock OSX doesn't.



          If you don't mind going to the trouble of setting it up, you could set up an rsync daemon on your Yosemite machine, use ssh -R to enable port forwarding back to it, and run the rsync manually on the web host shell, so that it connects to the rsync daemon on your machine. Then its error message will be plain to see.






          share|improve this answer























          • I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

            – jfacemyer
            Feb 6 '15 at 3:24











          • FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

            – jfacemyer
            Feb 6 '15 at 3:25


















          1














          This question has been asked some time ago but it may help someone.



          I just run into the same error msg when syncing to the server. In my case there was an folder missing server side where I wanted to sync to. Creating the folder solved the problem.






          share|improve this answer






























            1














            I find this happens mostly when copying massive trees. The Mac version connects to the server and then builds the file list. If that takes too long, the server on the other side closes the connection because it is inactive for too long.



            The new versions of rsync build the file list incrementally, so start copying almost instantly and the connection never goes idle. The two advantages are:



            • No disconnects after waiting for an age for rsync to count millions of files.

            • You make progress each time you run the command, even if the network connection is unreliable and disconnects from time-to-time.

            Fix this problem on Mac OS X by installing a more up-to-date version of rsync, like with brew: brew install rsync. Upgrading from the Mac OS X default version of 2.6.9 to 3.1.3 fixed that problem.






            share|improve this answer
































              0














              Make sure the target directory exists on the remote server. rsync can compensate for one level of missing directories, but if more than two levels of directories are missing it will throw the error that you're seeing.






              share|improve this answer























                Your Answer








                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "106"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                draft saved

                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182964%2funexplained-rsync-disconnect%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                1














                The server may be returning an @ERROR message, but the client may be misreporting it as a premature EOF instead.



                The first step is to figure out what the underlying error is. I suggest you run rsync with simpler flags to see if it works. It's possible that rsync is failing to load libz but it doesn't notice until it's time to compress something.



                The second step is to get the Yosemite-side client to tell you something about those 8 bytes it received. If adding enough -v flags doesn't do the trick, I suggest building a newer rsync (e.g. using Homebrew and the homebrew/dups keg). It may tell you something useful that the relatively-old rsync in stock OSX doesn't.



                If you don't mind going to the trouble of setting it up, you could set up an rsync daemon on your Yosemite machine, use ssh -R to enable port forwarding back to it, and run the rsync manually on the web host shell, so that it connects to the rsync daemon on your machine. Then its error message will be plain to see.






                share|improve this answer























                • I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                  – jfacemyer
                  Feb 6 '15 at 3:24











                • FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                  – jfacemyer
                  Feb 6 '15 at 3:25















                1














                The server may be returning an @ERROR message, but the client may be misreporting it as a premature EOF instead.



                The first step is to figure out what the underlying error is. I suggest you run rsync with simpler flags to see if it works. It's possible that rsync is failing to load libz but it doesn't notice until it's time to compress something.



                The second step is to get the Yosemite-side client to tell you something about those 8 bytes it received. If adding enough -v flags doesn't do the trick, I suggest building a newer rsync (e.g. using Homebrew and the homebrew/dups keg). It may tell you something useful that the relatively-old rsync in stock OSX doesn't.



                If you don't mind going to the trouble of setting it up, you could set up an rsync daemon on your Yosemite machine, use ssh -R to enable port forwarding back to it, and run the rsync manually on the web host shell, so that it connects to the rsync daemon on your machine. Then its error message will be plain to see.






                share|improve this answer























                • I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                  – jfacemyer
                  Feb 6 '15 at 3:24











                • FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                  – jfacemyer
                  Feb 6 '15 at 3:25













                1












                1








                1







                The server may be returning an @ERROR message, but the client may be misreporting it as a premature EOF instead.



                The first step is to figure out what the underlying error is. I suggest you run rsync with simpler flags to see if it works. It's possible that rsync is failing to load libz but it doesn't notice until it's time to compress something.



                The second step is to get the Yosemite-side client to tell you something about those 8 bytes it received. If adding enough -v flags doesn't do the trick, I suggest building a newer rsync (e.g. using Homebrew and the homebrew/dups keg). It may tell you something useful that the relatively-old rsync in stock OSX doesn't.



                If you don't mind going to the trouble of setting it up, you could set up an rsync daemon on your Yosemite machine, use ssh -R to enable port forwarding back to it, and run the rsync manually on the web host shell, so that it connects to the rsync daemon on your machine. Then its error message will be plain to see.






                share|improve this answer













                The server may be returning an @ERROR message, but the client may be misreporting it as a premature EOF instead.



                The first step is to figure out what the underlying error is. I suggest you run rsync with simpler flags to see if it works. It's possible that rsync is failing to load libz but it doesn't notice until it's time to compress something.



                The second step is to get the Yosemite-side client to tell you something about those 8 bytes it received. If adding enough -v flags doesn't do the trick, I suggest building a newer rsync (e.g. using Homebrew and the homebrew/dups keg). It may tell you something useful that the relatively-old rsync in stock OSX doesn't.



                If you don't mind going to the trouble of setting it up, you could set up an rsync daemon on your Yosemite machine, use ssh -R to enable port forwarding back to it, and run the rsync manually on the web host shell, so that it connects to the rsync daemon on your machine. Then its error message will be plain to see.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 5 '15 at 1:19









                aecolleyaecolley

                1,732811




                1,732811












                • I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                  – jfacemyer
                  Feb 6 '15 at 3:24











                • FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                  – jfacemyer
                  Feb 6 '15 at 3:25

















                • I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                  – jfacemyer
                  Feb 6 '15 at 3:24











                • FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                  – jfacemyer
                  Feb 6 '15 at 3:25
















                I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                – jfacemyer
                Feb 6 '15 at 3:24





                I should note that I rsync with half a dozen other servers regularly, shared, VPS and hardware hosts from the same Yosemite client with no issues. I'm guessing it's an issue with a crappy shared host setup. Honestly, it's only one site that I have to update about 2x a year, so it's more trouble than it's worth to do some of this stuff, though I may try the homebrew option just to see, since I've already got it installed.

                – jfacemyer
                Feb 6 '15 at 3:24













                FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                – jfacemyer
                Feb 6 '15 at 3:25





                FYI, the error above is all I got using -v, so it would probably require some more hard-core wrangling than is worthwhile - I'm not just throwing the towel in without a fight ;)

                – jfacemyer
                Feb 6 '15 at 3:25













                1














                This question has been asked some time ago but it may help someone.



                I just run into the same error msg when syncing to the server. In my case there was an folder missing server side where I wanted to sync to. Creating the folder solved the problem.






                share|improve this answer



























                  1














                  This question has been asked some time ago but it may help someone.



                  I just run into the same error msg when syncing to the server. In my case there was an folder missing server side where I wanted to sync to. Creating the folder solved the problem.






                  share|improve this answer

























                    1












                    1








                    1







                    This question has been asked some time ago but it may help someone.



                    I just run into the same error msg when syncing to the server. In my case there was an folder missing server side where I wanted to sync to. Creating the folder solved the problem.






                    share|improve this answer













                    This question has been asked some time ago but it may help someone.



                    I just run into the same error msg when syncing to the server. In my case there was an folder missing server side where I wanted to sync to. Creating the folder solved the problem.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 15 '15 at 7:45









                    sepsep

                    111




                    111





















                        1














                        I find this happens mostly when copying massive trees. The Mac version connects to the server and then builds the file list. If that takes too long, the server on the other side closes the connection because it is inactive for too long.



                        The new versions of rsync build the file list incrementally, so start copying almost instantly and the connection never goes idle. The two advantages are:



                        • No disconnects after waiting for an age for rsync to count millions of files.

                        • You make progress each time you run the command, even if the network connection is unreliable and disconnects from time-to-time.

                        Fix this problem on Mac OS X by installing a more up-to-date version of rsync, like with brew: brew install rsync. Upgrading from the Mac OS X default version of 2.6.9 to 3.1.3 fixed that problem.






                        share|improve this answer





























                          1














                          I find this happens mostly when copying massive trees. The Mac version connects to the server and then builds the file list. If that takes too long, the server on the other side closes the connection because it is inactive for too long.



                          The new versions of rsync build the file list incrementally, so start copying almost instantly and the connection never goes idle. The two advantages are:



                          • No disconnects after waiting for an age for rsync to count millions of files.

                          • You make progress each time you run the command, even if the network connection is unreliable and disconnects from time-to-time.

                          Fix this problem on Mac OS X by installing a more up-to-date version of rsync, like with brew: brew install rsync. Upgrading from the Mac OS X default version of 2.6.9 to 3.1.3 fixed that problem.






                          share|improve this answer



























                            1












                            1








                            1







                            I find this happens mostly when copying massive trees. The Mac version connects to the server and then builds the file list. If that takes too long, the server on the other side closes the connection because it is inactive for too long.



                            The new versions of rsync build the file list incrementally, so start copying almost instantly and the connection never goes idle. The two advantages are:



                            • No disconnects after waiting for an age for rsync to count millions of files.

                            • You make progress each time you run the command, even if the network connection is unreliable and disconnects from time-to-time.

                            Fix this problem on Mac OS X by installing a more up-to-date version of rsync, like with brew: brew install rsync. Upgrading from the Mac OS X default version of 2.6.9 to 3.1.3 fixed that problem.






                            share|improve this answer















                            I find this happens mostly when copying massive trees. The Mac version connects to the server and then builds the file list. If that takes too long, the server on the other side closes the connection because it is inactive for too long.



                            The new versions of rsync build the file list incrementally, so start copying almost instantly and the connection never goes idle. The two advantages are:



                            • No disconnects after waiting for an age for rsync to count millions of files.

                            • You make progress each time you run the command, even if the network connection is unreliable and disconnects from time-to-time.

                            Fix this problem on Mac OS X by installing a more up-to-date version of rsync, like with brew: brew install rsync. Upgrading from the Mac OS X default version of 2.6.9 to 3.1.3 fixed that problem.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 14 at 11:01









                            Nitrodist

                            315159




                            315159










                            answered Jun 22 '16 at 14:09









                            brendonbrendon

                            111




                            111





















                                0














                                Make sure the target directory exists on the remote server. rsync can compensate for one level of missing directories, but if more than two levels of directories are missing it will throw the error that you're seeing.






                                share|improve this answer



























                                  0














                                  Make sure the target directory exists on the remote server. rsync can compensate for one level of missing directories, but if more than two levels of directories are missing it will throw the error that you're seeing.






                                  share|improve this answer

























                                    0












                                    0








                                    0







                                    Make sure the target directory exists on the remote server. rsync can compensate for one level of missing directories, but if more than two levels of directories are missing it will throw the error that you're seeing.






                                    share|improve this answer













                                    Make sure the target directory exists on the remote server. rsync can compensate for one level of missing directories, but if more than two levels of directories are missing it will throw the error that you're seeing.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Oct 21 '16 at 17:52









                                    LeonsLeons

                                    1012




                                    1012



























                                        draft saved

                                        draft discarded
















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182964%2funexplained-rsync-disconnect%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown






                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?