Page 1 of 1

Error: Error executing script returned: 65280

Posted: Tuesday 02 June 2015 21:01
by hanor
Hi,

I 've got 2 RPI, one with domoticz (pi1), the other one with volumio (pi2).
I try to shutdwon by script pi2 from pi1.

I've got a script on pi1:
pi@raspberrypi ~/domoticz/scripts $ more stop-rpi2.sh
#!/bin/bash
# Script qui eteint le rpi volumio
ssh 192.168.1.116 "/home/pi/stop-volumio.sh"

on pi2 :
pi@RPI2:~$ more stop-volumio.sh
#!/bin/bash
# Script qui eteint le raspberry
sudo shutdown -h now

The copy off the ssh certificate is OK on pi2.

When I run stop-rpi2.sh from putty on pi1 the job is done.
When I run thz script using a switch on domoticz i've got this message :
Error: Error executing script command (/home/pi/domoticz/scripts/stop-rpi2.sh). returned: 65280

What can I do ?

Re: Error: Error executing script returned: 65280

Posted: Wednesday 03 June 2015 10:34
by ThinkPad
Maybe a permission problem.

With a tool like WinSCP (Windows) you can see who the owner of the file is and what the rights are (read/write/execute etc). Make sure it has the same owner/permissions like the scripts from Domoticz itself.

Re: Error: Error executing script returned: 65280

Posted: Wednesday 03 June 2015 22:10
by hanor
Hi,

Same owner, same permissions.

When I run the script in putty all is OK. The Pi2 is shutting down.

I call this script in domotics using à switch
I've got the error when I use this domoticz's switch. Error 65280 and no shutting down from pi2

Re: Error: Error executing script returned: 65280

Posted: Tuesday 29 December 2015 21:39
by plutonium
Have the same problem, so did you find any solution to this problem?

Re: Error: Error executing script returned: 65280

Posted: Tuesday 29 December 2015 22:35
by plutonium
Found it...
Seems that domoticz ssh tru root so just made a new ssh key with root instead.

Re: Error: Error executing script returned: 65280

Posted: Saturday 13 February 2016 12:38
by Number8
@plutonium
Seems that domoticz ssh tru root so just made a new ssh key with root instead.
I've got the same issue. Could you elaborate your answer I don't quite understand it.
Thank you

Re: Error: Error executing script returned: 65280

Posted: Saturday 13 February 2016 12:50
by plutonium
Did you make a ssh key so you don't need to use password for pi user?
Make one with root instead and your script will work.


Skickas från min iPhone via Tapatalk

Re: Error: Error executing script returned: 65280

Posted: Saturday 13 February 2016 12:54
by Number8
Thanks plutonium. Indeed I made a key, but I did it this pi user not root user, hence it is working when I run it from putty. Ok I just started to understand that domoticz runs scripts with root context
Cheers

Re: Error: Error executing script returned: 65280

Posted: Saturday 13 February 2016 14:30
by Number8
This is working now.

Re: Error: Error executing script returned: 65280

Posted: Monday 15 February 2016 13:46
by stlaha2007
Better 1: to call ssh with user parameter and move key into /root/.ssh etcetera..
Or check howto run domoticz as pi. Latest stable gives you the option to start domoticz as other user.

Grtz,
Stephan

Re: Error: Error executing script returned: 65280

Posted: Friday 25 March 2016 20:04
by juankar
I can not understand the fix for this error.
My script is
#!/bin/bash
net rpc shutdown -t 10 -f -C "Shuting down computer" -I 192.168.1.99 -U user%pass -d 1

The script Works and the main computer is shutdown but in domoticz log i get rhe message:
Error executing script command (/opt/domoticz/scripts/pcapagar.sh). returned: 65280

Why?