Error: Error executing script returned: 65280

Moderator: leecollings

Post Reply
hanor
Posts: 7
Joined: Wednesday 01 October 2014 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Error: Error executing script returned: 65280

Post 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 ?
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Error: Error executing script returned: 65280

Post 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.
I am not active on this forum anymore.
hanor
Posts: 7
Joined: Wednesday 01 October 2014 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Error: Error executing script returned: 65280

Post 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
plutonium
Posts: 18
Joined: Tuesday 06 August 2013 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7253
Location: Sweden
Contact:

Re: Error: Error executing script returned: 65280

Post by plutonium »

Have the same problem, so did you find any solution to this problem?
plutonium
Posts: 18
Joined: Tuesday 06 August 2013 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7253
Location: Sweden
Contact:

Re: Error: Error executing script returned: 65280

Post by plutonium »

Found it...
Seems that domoticz ssh tru root so just made a new ssh key with root instead.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Error: Error executing script returned: 65280

Post 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
Debian buster on NUC and three RPi with buster.
plutonium
Posts: 18
Joined: Tuesday 06 August 2013 19:06
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7253
Location: Sweden
Contact:

Re: Error: Error executing script returned: 65280

Post 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
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Error: Error executing script returned: 65280

Post 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
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Error: Error executing script returned: 65280

Post by Number8 »

This is working now.
Debian buster on NUC and three RPi with buster.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Error: Error executing script returned: 65280

Post 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
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Error: Error executing script returned: 65280

Post 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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests