How to fix BeagleBone Black Service File Autostart Script Error, status=203/EXEC

84 views
Skip to first unread message

Albert

unread,
Sep 6, 2019, 2:15:43 PM9/6/19
to BeagleBoard

I want my BeagleBone machine to automatically start a script called server.js. It includes BoneScript (BeagleBone's unique function) and many functions including reading voltage and ampere from other machines.

I used this tutorial Executing a script on startup using BeagleBone Black

It kept showing status=203/EXEC error.

I tried the same tutorial for simple programs without Bonescript and Functions. Indeed, simple sending and receiving scripts are working without any issue.

How can I remove the error? I think it happens from importing BeagleScript and Functions. I'm not familiar with Linux environment.

Can anyone help to solve the issue?

Thanks,


Detail for Error:

https://stackoverflow.com/questions/57826763/how-to-fix-beaglebone-black-service-file-autostart-script-error-status-203-exec


error1.png
error2.PNG

Robert Nelson

unread,
Sep 6, 2019, 2:28:14 PM9/6/19
to Beagle Board, abt...@gmail.com
On Fri, Sep 6, 2019 at 1:15 PM Albert <abt...@gmail.com> wrote:
>
> I want my BeagleBone machine to automatically start a script called server.js. It includes BoneScript (BeagleBone's unique function) and many functions including reading voltage and ampere from other machines.
>
> I used this tutorial Executing a script on startup using BeagleBone Black
>
> It kept showing status=203/EXEC error.
>
> I tried the same tutorial for simple programs without Bonescript and Functions. Indeed, simple sending and receiving scripts are working without any issue.
>
> How can I remove the error? I think it happens from importing BeagleScript and Functions. I'm not familiar with Linux environment.
>
> Can anyone help to solve the issue?

ExecStart=/var/lib/cloud9/Projects echo ****** | sudo -S bash scriptname.sh

don't do that echo * | sudo stuff... it's already root...

ExecStart=/var/lib/cloud9/Projects/scriptname.sh

Regards,

--
Robert Nelson
https://rcn-ee.com/

Albert

unread,
Sep 6, 2019, 3:55:33 PM9/6/19
to BeagleBoard
Hi, Robert. Thanks for quick reply.
Indeed, after changing to ExecStart=/var/lib/cloud9/Projects/scriptname.sh
It still showing error.

Do you or anyone knows how to solve the problem? 


● scriptname.service
   Loaded: loaded (/etc/systemd/system/scriptname.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-09-06 19:52:26 UTC; 15s ago
 Main PID: 2595 (code=exited, status=1/FAILURE)

Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at Object.Module._extensions..js (module.js:586:10)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at Module.load (module.js:494:32)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at tryModuleLoad (module.js:453:12)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at Function.Module._load (module.js:445:3)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at Module.runMain (module.js:611:10)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at run (bootstrap_node.js:394:7)
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at startup (bootstrap_node.js:160:9)
Sep 06 19:52:26 beaglebone systemd[1]: scriptname.service: Main process exited, code=exited, status=1/FAILURE
Sep 06 19:52:26 beaglebone scriptname.sh[2595]:     at startup (bootstrap_node.js:160:9)
Sep 06 19:52:26 beaglebone systemd[1]: scriptname.service: Main process exited, code=exited, status=1/FAILURE
lines 1-13...skipping...
errorstill.PNG

evilwulfie

unread,
Sep 6, 2019, 4:01:17 PM9/6/19
to beagl...@googlegroups.com
On 9/6/2019 12:55 PM, Albert wrote:
Hi, Robert. Thanks for quick reply.
Indeed, after changing to ExecStart=/var/lib/cloud9/Projects/scriptname.sh

ExecStart=/var/lib/cloud9/Projects/server.js   <-- maybe ?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a494250e-48a4-417d-a8c7-c11f364d7090%40googlegroups.com.

Robert Nelson

unread,
Sep 6, 2019, 4:03:32 PM9/6/19
to Beagle Board, Albert
Looks like: NODE_PATH=/usr/lib/node_modules is not set..

Albert

unread,
Sep 6, 2019, 6:14:33 PM9/6/19
to BeagleBoard
Hi, thanks for reply.
I tried ExecStart=/var/lib/cloud9/Projects/server.js, but still not working.

Albert

unread,
Sep 6, 2019, 6:16:41 PM9/6/19
to BeagleBoard
Hi, RobertCNelson. 
Thanks for your answer.

I added this line in service file
Environment=NODE_PATH=/usr/lib/node_modules

[Unit]
After=network-online.target
[Service]
Type=simple
Environment=NODE_PATH=/usr/lib/node_modules
ExecStart=/usr/bin/scriptname.sh
[Install]
WantedBy=multi-user.target

But it shows this error.

● scriptname.service
   Loaded: loaded (/etc/systemd/system/scriptname.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-09-06 21:00:29 UTC; 8s ago
 Main PID: 3613 (code=exited, status=1/FAILURE)

Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at Object.Module._extensions..js (module.js:586:10)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at Module.load (module.js:494:32)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at tryModuleLoad (module.js:453:12)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at Function.Module._load (module.js:445:3)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at Module.runMain (module.js:611:10)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at run (bootstrap_node.js:394:7)
Sep 06 21:00:29 beaglebone scriptname.sh[3613]:     at startup (bootstrap_node.js:160:9)
Sep 06 21:00:29 beaglebone systemd[1]: scriptname.service: Main process exited, code=exited, status=1/FAILURE
Sep 06 21:00:29 beaglebone systemd[1]: scriptname.service: Unit entered failed state.
Sep 06 21:00:29 beaglebone systemd[1]: scriptname.service: Failed with result 'exit-code'.


Do you know why this error shows up?
Thanks,


qqqq1.PNG
qqqq2.PNG
qqqq3.PNG

Robert Nelson

unread,
Sep 6, 2019, 6:27:52 PM9/6/19
to Beagle Board, Albert
On Fri, Sep 6, 2019 at 5:16 PM Albert <abt...@gmail.com> wrote:
>
> Hi, RobertCNelson.
> Thanks for your answer.
>
> I added this line in service file
> Environment=NODE_PATH=/usr/lib/node_modules
>
> [Unit]
> After=network-online.target
> [Service]
> Type=simple
> Environment=NODE_PATH=/usr/lib/node_modules
> ExecStart=/usr/bin/scriptname.sh
> [Install]
> WantedBy=multi-user.target

add the export inside your script file...

#!/bin/bash
cd /var/lib/cloud9/Projects
node server.js

Albert

unread,
Sep 6, 2019, 6:58:34 PM9/6/19
to BeagleBoard
Hi, Robert.
I tried to put these into code one-by-one.
Do you know why it still shows error?

export NODE_PATH='/usr/lib/node_modules'
export NODE_PATH=/usr/lib/node_modules
export NODE_PATH=/usr/lib/node_modules:$NODE_PATH

eee1.PNG


eee2.PNG




Thanks,

Mala Dies

unread,
Jan 8, 2020, 8:49:17 PM1/8/20
to BeagleBoard
Hello,

I just used StackOverflow to answer your question if you have not already figured it out.

Seth

P.S. I can help you on this subject as I have come across this issue many times. So, answer there or here. I will keep looking out.
Reply all
Reply to author
Forward
0 new messages