Stopping an restarting cloud9

I’d like to be able to stop and later restart cloud9. The following stopped cloud9

bone$ sudo systemctl stop cloud9

But the following didn’t restart it.

bone$ sudo systemctl start cloud9
bone$ systemctl status cloud9

● cloud9.service - Cloud9 IDE
Loaded: loaded (/lib/systemd/system/cloud9.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-01-04 19:45:12 UTC; 2s ago
Process: 5485 ExecStartPre=/opt/cloud9/cloud9-symlink (code=exited, status=0/SUCCESS)
Process: 5491 ExecStart=/opt/cloud9_support/bin/node server.js --packed -w /var/lib/cloud9 (code=exited, status=1/FAILURE)
Main PID: 5491 (code=exited, status=1/FAILURE)

Jan 04 19:45:12 ece312 cloud9ide[5491]: port: ‘3000’,
Jan 04 19:45:12 ece312 cloud9ide[5491]: host: ‘127.0.0.1’,
Jan 04 19:45:12 ece312 cloud9ide[5491]: websocket: true,
Jan 04 19:45:12 ece312 cloud9ide[5491]: showRealIP: true,
Jan 04 19:45:12 ece312 cloud9ide[5491]: secure: undefined,
Jan 04 19:45:12 ece312 cloud9ide[5491]: provides: [ ‘connect’, ‘http’ ],
Jan 04 19:45:12 ece312 cloud9ide[5491]: consumes: [],
Jan 04 19:45:12 ece312 cloud9ide[5491]: setup: [Function: startup] } } 'Error: No or too many file descriptors received.\n at Server.listen (/opt/cloud9/node_modules
Jan 04 19:45:12 ece312 systemd[1]: cloud9.service: Main process exited, code=exited, status=1/FAILURE
Jan 04 19:45:12 ece312 systemd[1]: cloud9.service: Failed with result ‘exit-code’.

bone$ cat /ID.txt

BeagleBoard.org Debian Image 2019-12-16
bone $ uname -a
Linux ece312 4.19.79-ti-r30 #1buster SMP PREEMPT Mon Nov 4 20:38:01 UTC 2019 armv7l GNU/Linux

Or is there a better way to turn off cloud9 access and restore it later?

–Mark

Rebooting caused cloud9 to restart.

Using iptables to block port 3000 might be the easiest thing to do.

–Mark

I believe there is also a cloud9.socket. After you stop it, does it restart on its own if you open the port?