rsync-deployments: burnett01/rsync-deployments@7.0.1 hangs transferring specific files

Actual Behavior

Rsync action fails when attempting to use a path of “*.sh”

Expected Behavior

Rsync would treat the path as it would be treated in any rsync command, in this case to synchronize all shell scripts in the root directory of the repository.

Details

I have five rsync steps in my GitHub action, four of which work without a hitch, and are of this general form:

   - name: Deploy backend to ${{vars.TARGET}} ...
        uses: burnett01/rsync-deployments@7.0.1
        with:
          switches: -avzr --delete
          path: backend/
          remote_path: ${{vars.TARGET}}
          remote_host: ${{vars.HOST}}
          remote_port: ${{vars.PORT}}
          remote_user: ${{vars.USER}}
          remote_key: ${{secrets.KEY}}

but the fifth attempts to copy a pattern from the base directory of the repository:

 - name: Deploy installation scripts to ${{vars.TARGET}} ...
      uses: burnett01/rsync-deployments@7.0.1
      with:
        switches: -avz --delete
        path: "*.sh"
        remote_path: ${{vars.TARGET}}
        remote_host: ${{vars.HOST}}
        remote_port: ${{vars.PORT}}
        remote_user: ${{vars.USER}}
        remote_key: ${{secrets.KEY}}

The result of this operation is:

Connection reset by [redacted] port [redacted]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(231) [sender=3.2.7]

All the other successful steps use the same parameters.

Since all the other paths are relative I assume that “*.sh” would be the correct path specification to match all shell files in the root directory of the repository.

Based on logs at the receiving end, the first four rsyncs connect and work as expected, but the fifth to copy *.sh does not appear to connect at all.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

PS - This also explains an earlier issue I had with appleboy/scp-action@v0.1.7 (which I initially tried because I was only copying a specific file). It failed in the same way.

So I guess this is not a problem with rsync-deployments but with the GitHub-managed runner networking.

To the level which I brought it? Editorialization about“ professional“ came from you.

Also do not project: I have not demanded anything from you, I have posted a problem, responded to request for information, and have spent many hours of my own time trying to debug this. You can certainly choose to ignore it entirely, or you can choose to act on the information, or you can park the issue until more details are available.

I agree with the other contributor that we ought not be arguing with one another so for my part I will stick with the facts going forward.

Sent from my iPhone

On Aug 22, 2024, at 13:17, Steven Agyekum @.***> wrote:

Hello guys, please do not fight 😃 We are all developers trying to help one another ❤️

@nils-kt I don’t think it’s unprofessional posting the logs here, unless they contain sensitive information, but so far I didn’t see this 😃 While I agree that it’s hard to read the logs.


Let’s get back to the root cause of the issue - the rsync connection not being established.

As you mentioned @arobthearab, the connection is not being made which may be indeed a connection issue from the action runner on Github. Can you try changing the remote path to use the same as for the working ones. Let’s try that.

— Reply to this email directly, view it on GitHub https://github.com/Burnett01/rsync-deployments/issues/64#issuecomment-2305263030 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4PYEK3U533W4ACQZPAITLZSYMIZAVCNFSM6AAAAABM4KW46CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVGI3DGMBTGA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AG4PYEIV22D2K5XIRKL5NR3ZSYMIZA5CNFSM6AAAAABM4KW46CWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJM6C3M.gif Message ID: @.***>

Hello guys, please do not fight 😃 We are all developers trying to help one another ❤️

@nils-kt I don’t think it’s unprofessional posting the logs here, unless they contain sensitive information, but so far I didn’t see this 😃 While I agree that it’s hard to read the logs.


Let’s get back to the root cause of the issue - the rsync connection not being established.

As you mentioned @arobthearab, the connection is not being made which may be indeed a connection issue from the action runner on Github. Can you try changing the remote path to use the same as for the working ones. Let’s try that.

Requesting the logs in another format is fine but I suggest you keep the editorial comments to yourself. Broadcasting them in a public forum is ABSOLUTELY not professional.

In summary, neither my firewall or my host are ever receiving the fifth connection for the specific files *.sh. I haven’t run a pcap to see if I’m getting a half-open. But I can run between 2 and 6 rsync steps in other repositories without problems as long as the “path” is a directory - it’s only when I try to sync specific files in the root of the repo that this occurs, and I have tried:

/*.sh .sh ./.sh install.sh