0

For some reason all my fabric actions executed on the remote server are failing with the error:

Fatal error: X encountered an error (return code 1) while executing 'Y'.

In this case 'X' are all kinds of fabric actions (run, sudo, etc.) as well as 'Y' (all commands).

I tried to put env.warn_only = True in the fabric-file and then the log says all commands are executed (with the errors as warnings instead), but when I look at the remote server afterwards, still nothing happened.

What is causing this error?

jroeleveld
  • 456
  • 4
  • 12
  • 22
  • have you tried turning on debug output using fabric.context_managers.show? – iruvar Oct 14 '12 at 14:38
  • I added `with show('debug'):` after the 'def'-line (sorry, I'm new; I don't know all these definitions), but this doesn't give more output. – jroeleveld Oct 14 '12 at 14:56
  • Is there a way to test the connection with the remote server in a certain way? All my remote actions failed until now... – jroeleveld Oct 15 '12 at 13:43
  • debug mode will cause the actual shell commands executed on the remote server to print, for example, [hostname] run: /bin/bash -l -c "ls \"/home/username/Folder Name With Spaces\"". Now wrap the command with ssh and see if you are able to execute it...for example, ssh user@server '/bin/bash -l -c "ls \"/home/username/Folder Name With Spaces\""' – iruvar Oct 15 '12 at 15:20

0 Answers0