Page MenuHomePhabricator

Stretch grid problem: NodeJs not installed
Closed, InvalidPublic


While migrating (my tool) to the Stretch job grid I ran into this problem: NodeJs appears not to be installed.

When I tried to call NodeJs from PHP, it returned exit code -127 ("command not found"):

exec("node ${myDir}${myFile}");

I got a similar result in the interactive shell.

tools.magog@tools-sgebastion-06:~/log$ webservice shell
tools.magog@interactive:~$ node --version
bash: node: command not found

Could someone kindly install NodeJs on Kubernetes, or provide me the path so I can call it?

Event Timeline

bd808 subscribed.

The binary is called nodejs on Debian distributions.

$ which nodejs



I apologize but I still can't access it. Can you show me what I'm doing wrong?

tools.magog@tools-sgebastion-06:~$ webservice shell
tools.magog@interactive:~$ /usr/bin/nodejs js/exe/get-gallery-names.js 
bash: /usr/bin/nodejs: No such file or directory
tools.magog@interactive:~$ which nodejs

@Magog_the_Ogre I think part of the issue here is confusion about the environment you are attempting to use. The task title and description mention the Stretch grid, but on more careful reading it looks like you are actually trying to use the Kubernetes php5.5 runtime environment (webservice shell).

We have a nodejs Kubernetes environment (webservice --backend=kubernetes nodejs [start|stop|restart|shell]) which does have nodejs installed. The Kubernetes php5.5 environment does not install a nodejs runtime. More generally, our Kubernetes containers are designed to support a single runtime (php, python3, python2, nodejs, etc) rather than to have all language runtimes in the same environment like the job grids.

If you want to build a webservice that uses both PHP and NodeJS at runtime the current solution is to use webservice --backend=gridengine lighttpd [start|stop|restart].