scp-action icon indicating copy to clipboard operation
scp-action copied to clipboard

IO Timeout Regression since 2023-04-03

Open dcaslin opened this issue 3 years ago • 21 comments

As of today Actions using https://github.com/dcaslin/d2-checklist/actions with

uses: appleboy/scp-action@master

Have been failing with an IO timeout after uploading the tarball (see https://github.com/dcaslin/d2-checklist/actions/runs/4652652207 for a live case)

tar all files into /tmp/AMsdjMEvbv.tar.gz
scp file to server.
create folder /home/***/d2checklist/
untar file AMsdjMEvbv.tar.gz
remove file AMsdjMEvbv.tar.gz
drone-scp error:  dial tcp ***:***: i/o timeout
drone-scp rollback: remove all target tmp file
remove file AMsdjMEvbv.tar.gz
2023/04/09 ***:04:05 dial tcp ***:***: i/o timeout

By pinning to a previous version

uses: appleboy/scp-action@98930d398ce425af0148ea8a0e3295cd04fe2b7a

The issue goes away

dcaslin avatar Apr 09 '23 22:04 dcaslin

Can you show your config and remote OS version?

appleboy avatar Apr 10 '23 03:04 appleboy

According to your config

Run appleboy/scp-action@master
  with:
    source: ./dist/
    target: /home/***/d[2](https://github.com/dcaslin/d2-checklist/actions/runs/4652652207/jobs/8233035792#step:11:2)checklist/
    strip_components: 2
    port: ***
    timeout: [3](https://github.com/dcaslin/d2-checklist/actions/runs/4652652207/jobs/8233035792#step:11:3)0s
    command_timeout: 10m
    use_insecure_cipher: false
    rm: false
    debug: false
    overwrite: false
    tar_dereference: false
    tar_exec: tar
    proxy_port: ***
    proxy_timeout: 30s
    proxy_use_insecure_cipher: false
  env:
    HOST: ***
    USERNAME: ***
    PORT: ***
    KEY: ***

appleboy avatar Apr 10 '23 03:04 appleboy

@dcaslin Can you help to try the two versions?

  1. appleboy/[email protected] (working?)
  2. appleboy/[email protected] (not working?)
  3. appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35 (?)

Thanks.

appleboy avatar Apr 10 '23 06:04 appleboy

image

Confirmed, 0.1.3 works, 0.1.4 fails

dcaslin avatar Apr 10 '23 15:04 dcaslin

Btw in terms of target OS:

NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.04"

dcaslin avatar Apr 10 '23 16:04 dcaslin

I'm having the same issue, reverting my workflow to 0.1.3 works for now, but basically every workflow in my org is broken cause of this update, I'm hoping for a fix soon cause we have a lot of projects and changing every single one by hand kind of sucks.

cacacaio avatar Apr 10 '23 19:04 cacacaio

@cacacaio @dcaslin please help to try the following version

- appleboy/[email protected]
+ appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35

appleboy avatar Apr 11 '23 01:04 appleboy

You will see the following log

image

remote server os type is uix

appleboy avatar Apr 11 '23 01:04 appleboy

@cacacaio Don't use the master version in your production.

appleboy avatar Apr 11 '23 02:04 appleboy

I have the same issue pinning the package to version appleboy/scp-action@98930d398ce425af0148ea8a0e3295cd04fe2b7a fixed it.

Thanks! 🙏

csalmeida avatar Apr 14 '23 15:04 csalmeida

@csalmeida You should try v0.1.4

appleboy avatar Apr 14 '23 17:04 appleboy

@cacacaio @dcaslin please help to try the following version

- appleboy/[email protected]
+ appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35

Tested here: https://github.com/dcaslin/d2-checklist/actions/runs/4704329113/jobs/8343852155

dcaslin avatar Apr 15 '23 18:04 dcaslin

@dcaslin

Find

      env:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.UID }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSH }}
      with:
        source: "./dist/"
        target: "/home/${{ secrets.UID }}/d2checklist/"
        strip_components: 2 # this is important

Change to

      with:
        host: ${{ secrets.HOST }}
        username: ${{ secrets.UID }}
        port: ${{ secrets.PORT }}
        key: ${{ secrets.SSH }}
        source: "./dist/"
        target: "/home/${{ secrets.UID }}/d2checklist/"
        strip_components: 2 # this is important

Don't use env and please try the master branch appleboy/scp-action@master

appleboy avatar Apr 16 '23 01:04 appleboy

@csalmeida You should try v0.1.4

Thanks @appleboy, will give that a go when I find a moment. 🙏

csalmeida avatar Apr 17 '23 10:04 csalmeida

@dcaslin Can you help to try the two versions?

  1. appleboy/[email protected] (working?)
  2. appleboy/[email protected] (not working?)
  3. appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35 (?)

Thanks.

i tried this. v0.1.3 working for me v0.1.4 , 209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35 and master not

alepiumetti avatar May 01 '23 22:05 alepiumetti

Can confirm I also have the same issue on scp-action@master:

tar all files into /tmp/ksMjbzXtJD.tar.gz
remote server os type is unix
scp file to server.
create folder /var/www/itemsearch
untar file ksMjbzXtJD.tar.gz
drone-scp error:  dial tcp ***:***: i/o timeout
drone-scp rollback: remove all target tmp file
remove file ksMjbzXtJD.tar.gz

Here is my pipeline yaml for reference.

v0.1.4 and master is broken for me. v0.1.3 is working fine.

martinmine avatar May 07 '23 16:05 martinmine

The same issue for me on v0.1.4 and all works on v0.1.3. Here is my pipeline:

- name: copy docker-compose via ssh key
      uses: appleboy/[email protected]
      with:
        host: ${{ secrets.DROPLET_SSH_HOST }}
        username: ${{ secrets.DROPLET_SSH_USER }}
        port: 22
        key: ${{ secrets.DROPLET_SSH_PRIVATE_KEY }}
        source: "docker-compose.yml"
        target: "/subscriber-core"

ghost avatar May 31 '23 10:05 ghost

@dev-subscriber-world @martinmine Thanks for your feedback. I will check the difference between 0.1.4 and 0.1.3

appleboy avatar May 31 '23 11:05 appleboy

This might be caused by a rate limit on the server. You can use iptables -L -n and see in the Chain INPUT (policy ACCEPT) section if there are any TCP rate limits on the SSH port you are using (usually 22). To remove/edit the rule, you can use iptables-save > rules.txt; vim rules.txt; iptables-restore < rules.txt.

I had no issues using this action on one server, but when I tried a different one I started getting errors, first while trying to create the folder (while using master or v0.1.4), then while removing the .tar (v0.1.3). Note that I also have rm: true, which likely adds an additional request and causes the action to fail sooner.

I suspect that the number of requests sent by the action increased in version v0.1.4 and this caused the failure. If this is true, I'd recommend mentioning the rate limit in the README and, if possible, reduce the number of requests sent by >=v0.1.4.

ezio-melotti avatar Jul 07 '23 12:07 ezio-melotti

  • name: Copy package.json via SCP uses: appleboy/[email protected] with: host: ${{ secrets.AWS_HOST_IP }} username: ubuntu password: ${{ secrets.EC2_PRIVATE_KEY }} port: ${{ secrets.AWS_PORT }} source: "package.json" target: /var/www/rel-dashboard/rel-frontend/ timeout: "90s"

     I tried a lot but it has same timeout issue 
    
     tar all files into /tmp/3139378944/EYhTMrylyM.tar
    

scp file to server. 2023/07/19 13:23:47 error copy file to dest: ***, error message: dial tcp ***:0: i/o timeout drone-scp error: error copy file to dest: ***, error message: dial tcp ***:0: i/o timeout

relevic avatar Jul 19 '23 13:07 relevic

Somebody can provide the server host information which works in v0.1.3 version and does not work in v0.1.4 version. I will try it out.

appleboy avatar Jun 01 '24 02:06 appleboy