How to make a script execute like a cloud9 on Beaglebone

Hello,

I use this link http://mybeagleboneblackfindings.blogspot.com/2013/10/running-script-on-beaglebone-black-boot.html to make a script launch at startup but I want to make a script launch during the beaglebone works like cloud9, I want to access on 192.168.7.2:PORT at any time and it works.

How to make it please ?

On Tue, 24 Jul 2018 06:51:59 -0700 (PDT), Ichrak Mansour
<ichrakmansour.ing@gmail.com> declaimed the
following:

to make a script launch at startup but I want to make a script launch
during the beaglebone works like cloud9, I want to access on
192.168.7.2:PORT at any time and it works.

  "script launch during the beaglebone works like cloud9" is a confusing
statement.

  Cloud9 runs as a specialized web-server, probably using AJAX
<https://en.wikipedia.org/wiki/Ajax_(programming)>
<https://en.wikipedia.org/wiki/Cloud9_IDE>.

  Since you don't indicate what your script is supposed to do -- I can't
tell if you mean you want to write a full-up server style application
(which might be probable if you are specifying a port during the
connection) or just want a script to run when you ask for it via a normal
(port 80) HTTP request (http://beaglebone.local/myScript). For the latter,
you may have to configure Apache (or other web-server), and at the least
set up myScript as a CGI
<https://en.wikipedia.org/wiki/Common_Gateway_Interface> application.

  Note that basic CGI puts a bit of a load on the server, as it
starts/stops entire processes each time a script is requested -- if the
script is written in Python, that means having to load the Python
interpreter, then running the script, and then closing the Python
interpreter. Hence there are plug-ins for Apache that keep interpreters
loaded <https://en.wikipedia.org/wiki/Mod_python>
<https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface>
<https://en.wikipedia.org/wiki/Mod_wsgi>

I want to run my application developed on reactJS on frontend, nodejs on backend and MySQL about database, I want to make it works during I connect my Beaglebone with Pc, I try to write the bash script to make it running at startup and it works well, but after few minutes, I can’t access to 192.168.è.2:MyPort to run it. I get :

image.png

On Tue, 24 Jul 2018 16:23:35 +0100, Ichrak Mansour
<ichrakmansour.ing@gmail.com> declaimed the
following:

I want to run my application developed on reactJS on frontend, nodejs on
backend and MySQL about database, I want to make it works during I connect
my Beaglebone with Pc, I try to write the bash script to make it running at
startup and it works well, but after few minutes, I can't access to
192.168.è.2:MyPort to run it. I get :

  Does the rest of the BBB respond? That error message is unclear as to
whether it is the IP that has become unreachable, or only the port on the
IP.

  Does your application write to any log files? If not, I suggest you add
logging to it, or at least have stderr redirected to some log file --
perhaps the application is crashing; a log file might indicate why.

  Have you let the system sit for a 10-20 minutes to see if the
application becomes available. If it does, it could mean a problem with
reuse of sockets. Actually, staying unavailable could also be a problem of
sockets.

  If the entire BBB becomes unreachable -- I suggest trying via a router
with an Ethernet cable, and not using the USB connection.

how to connect beaglebone with ethernet cable between Pc and beaglebone ?

when I follow this link : http://mybeagleboneblackfindings.blogspot.com/2013/10/running-script-on-beaglebone-black-boot.html the script still working until the beaglebone is connected or just a boot please ?

On Tue, 24 Jul 2018 18:15:53 +0100, Ichrak Mansour
<ichrakmansour.ing@gmail.com> declaimed the
following:

how to connect beaglebone with ethernet cable between Pc and beaglebone ?

  This is basic LAN configuration stuff... It is presumed the computer is
connected to some router.. You run a cable from the BBB to the same router.
The router will provide the BBB with an IP address (you may need to look at
the router configuration pages for the list of active IP #s if it doesn't
act as a DNS translating "beaglebone" to the IP).

  You then use SSH to connect via that IP instead of 192.168.7.x.

  This type of connection will normally also mean you can run apt-get
update/apt-get upgrade to keep the installed OS up to date (without the
hassle of trying to get internet connection sharing to work on the
computer).

On Tue, 24 Jul 2018 18:18:26 +0100, Ichrak Mansour
<ichrakmansour.ing@gmail.com> declaimed the
following:

when I follow this link :
http://mybeagleboneblackfindings.blogspot.com/2013/10/running-script-on-beaglebone-black-boot.html
the script still working until the beaglebone is connected or just a boot
please ?

  Please note that the initial post there is five years old -- it likely
applied to the no-longer supported Angstrom Linux. One of the comments is
dated 2.5 years ago, and that one mentions Debian Wheezy. Since then we
have gone from Wheezy to Jessie to Stretch. I don't know what may have
changed in systemd during that time period (the last time I worked start-up
stuff in Linux was Mandrake 8 using SysV INIT, much before systemd came
out).

  Without logs, it is difficult to guess what may be happening.

https://unix.stackexchange.com/questions/225401/how-to-see-full-log-from-systemctl-status-service