Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO Timeout Regression since 2023-04-03 #106

Open
dcaslin opened this issue Apr 9, 2023 · 21 comments
Open

IO Timeout Regression since 2023-04-03 #106

dcaslin opened this issue Apr 9, 2023 · 21 comments

Comments

@dcaslin
Copy link

dcaslin commented Apr 9, 2023

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

@appleboy
Copy link
Owner

appleboy commented Apr 10, 2023

Can you show your config and remote OS version?

@appleboy
Copy link
Owner

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
Copy link
Owner

appleboy commented Apr 10, 2023

@dcaslin Can you help to try the two versions?

  1. appleboy/scp-action@v0.1.3 (working?)
  2. appleboy/scp-action@v0.1.4 (not working?)
  3. appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35 (?)

Thanks.

@dcaslin
Copy link
Author

dcaslin commented Apr 10, 2023

image

Confirmed, 0.1.3 works, 0.1.4 fails

@dcaslin
Copy link
Author

dcaslin commented Apr 10, 2023

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"

@cacacaio
Copy link

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.

@appleboy
Copy link
Owner

@cacacaio @dcaslin please help to try the following version

- appleboy/scp-action@v0.1.3
+ appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35

@appleboy
Copy link
Owner

You will see the following log

image

remote server os type is uix

@appleboy
Copy link
Owner

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

@csalmeida
Copy link

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

Thanks! 🙏

@appleboy
Copy link
Owner

@csalmeida You should try v0.1.4

@dcaslin
Copy link
Author

dcaslin commented Apr 15, 2023

@cacacaio @dcaslin please help to try the following version

- appleboy/scp-action@v0.1.3
+ appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35

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

@appleboy
Copy link
Owner

@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

@csalmeida
Copy link

@csalmeida You should try v0.1.4

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

@alepiumetti
Copy link

@dcaslin Can you help to try the two versions?

  1. appleboy/scp-action@v0.1.3 (working?)
  2. appleboy/scp-action@v0.1.4 (not working?)
  3. appleboy/scp-action@209e8c05e0492f6ed6fe8a22dfcaefb083c4cf35 (?)

Thanks.

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

@martinmine
Copy link

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.

@ghost
Copy link

ghost commented May 31, 2023

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/scp-action@v0.1.3
      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"

@appleboy
Copy link
Owner

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

@ezio-melotti
Copy link

ezio-melotti commented Jul 7, 2023

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.

@relevic
Copy link

relevic commented Jul 19, 2023

  • name: Copy package.json via SCP
    uses: appleboy/scp-action@v0.1.3
    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

@appleboy
Copy link
Owner

appleboy commented Jun 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants