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

Debug mode not working #50

Open
jhasse opened this issue Mar 17, 2017 · 12 comments
Open

Debug mode not working #50

jhasse opened this issue Mar 17, 2017 · 12 comments
Assignees
Labels

Comments

@jhasse
Copy link

jhasse commented Mar 17, 2017

I'm getting

2017/03/17 10:22:43 host: scp file to server.
2017/03/17 10:22:47 host: create folder /path
drone-scp error:  Process exited with status 1

and tried to debug that by setting debug to true:

docker run --rm \
                              -e PLUGIN_HOST=host \
                              -e PLUGIN_USERNAME=user \
                              -e PLUGIN_PASSWORD=pw \
                              -e PLUGIN_SOURCE="file" \
                              -e PLUGIN_TARGET=/path \
                              -e PLUGIN_DEBUG=true \
                              -e DRONE_REPO_OWNER=appleboy \
                              -e DRONE_REPO_NAME=go-hello \
                              -e DRONE_COMMIT_SHA=e5e82b5eb3737205c25955dcc3dcacc839b7be52 \
                              -e DRONE_COMMIT_BRANCH=master \
                              -e DRONE_COMMIT_AUTHOR=appleboy \
                              -e DRONE_BUILD_NUMBER=1 \
                              -e DRONE_BUILD_STATUS=success \
                              -e DRONE_BUILD_LINK=http://github.com/appleboy/go-hello \
                              -v $PWD:$PWD \
                              -w $PWD \
                              appleboy/drone-scp

I've also tried setting it via a simple .drone.yml, but the output stays the same :/

@appleboy
Copy link
Owner

I have not implemented debug mode. I will take it asap.

@appleboy appleboy self-assigned this Mar 17, 2017
@lcnja
Copy link

lcnja commented Apr 19, 2017

2017/04/19 14:51:25 172.16.218.238: scp file to server.
drone-scp error: error copy file to dest: 172.16.218.238
drone-scp error: error copy file to dest: 172.16.218.238
error copy file to dest: 172.16.218.238
error copy file to dest: 172.16.218.238
1

how to debug?

@lcnja
Copy link

lcnja commented Apr 19, 2017

scp:
image: appleboy/drone-scp
host: 172.16.218.238
port: 22
username: root
password: ${passwd}
target: /vmfs/volumes/vms1/iso
source: ./*.iso
when:
status: success

@alexanderwink
Copy link

Any progress on this? It's very hard to find out whats going wrong e.g. when using wildcards in source list

@hkeio
Copy link

hkeio commented Dec 5, 2018

+1

@cyberb
Copy link

cyberb commented Dec 13, 2019

It would be great to have this feature, I get this (it was working fine):


tar all files into /tmp/658263401/y2AiHlI6cf.tar
scp file to server.
drone-scp error: ****
error copy file to dest: , error message: Process exited with status 1 
2019/12/13 10:22:08 error copy file to dest: ********, error message: Process exited with status 1

@darkguy2008
Copy link

darkguy2008 commented Jun 6, 2020

+1 to debugging, just trying to set this up and I have no idea why it says:

tar all files into /tmp/862925648/XDZfHeRQLN.tar
--
2 | tar: empty archive
3 | exit status 1

So I'm like, WTF?

EDIT:

For those who come here after me: I had to use the shared Drone path (/drone/src) which is shared between pipeline steps. drone-scp is a new step, therefore it can't transfer files that are not in its container files. Basic stuff I know, but it threw me off for an hour or so.

@digitalica
Copy link

debug would be nice. I'm stuck with an error trying to use appleboy/scp-action in a github action...

tar all files into /tmp/085014346/hmydY87Rd9.tar
$ tar -cf /tmp/085014346/hmydY87Rd9.tar build/
scp file to server.
Remove target folder: ***
drone-scp error:  Process exited with status 1
drone-scp rollback: remove all target tmp file
remove file hmydY87Rd9.tar
2020/08/19 19:00:05 Process exited with status 1

@Frickeldave
Copy link

+1
Sitting in front of "Process exited with status 1" since hours and try to find the error by staring at the monitor.

@StuartMorris0
Copy link

Also getting this error. As we are uploading a large .tar file I can see the file being pushed onto the server. However, when creating a new folder OR using an existing folder it just errors out Process exited with status 1

tar all files into /tmp/652906755/cQwb4NqbMg.tar
scp file to server.
create folder /test
drone-scp error:  Process exited with status 1
drone-scp rollback: remove all target tmp file
remove file cQwb4NqbMg.tar
2021/03/21 ***:11:59 Process exited with status 1

@Techassi
Copy link

Techassi commented Apr 28, 2021

I'm also encountering Process exited with status 1. It seems like this is the case when using rm and the plugin tries to remove the target folder with rm -rf <target>. This somehow fails and thus returns an error which in turn cancels the transmission.

I tried to adjust ownership of the folder(s) with chown and even changed privileges to 777 with chmod. To no success. When I manually remove the target folder by SSHing into the machine, the 'deletion' succeeds and tar file is succesfully transmitted.

I briefly looked at the source code but I could not find an obvious issue with error handling of commands executed via a SSH channel... Maybe @appleboy can look into this!

EDIT 1

I just tested this locally (git clone and go build) and it worked without any issues. I then tested it with my pipeline and it magically works now. Maybe @appleboy did some changes and released a new version. I'm not super sure about this, because the latest release was v1.6.2 and was released in June last year.

@appleboy
Copy link
Owner

appleboy commented Apr 9, 2023

I will take it.

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

No branches or pull requests