Troubleshooting

Integrated Cryptographic Service Facility not started - hang

If the node process hangs without any output check, you can run the following command to confirm whether /dev/random is functional:
cat /dev/random | od | head

If /dev/random is not available, ensure that Integrated Cryptographic Service Facility (ICSF) is started.

Installation error

During the compiler installation, you might see an error message that is similar to the following example:
An error occurred while receiving temporary dataset ... to dataset ... at ./unpack.pl line 147.
cannot receive ... to ... at ./unpack.pl line 61.

To resolve this problem, you should set the MSGCLASS parameter correctly. The default MSGCLASS parameter is “S”. To change this default, you need to set the COMPILER_INSTALL_HELD_MSGCLASS environment variable.

Suppose you have a "Hello world" program to run. You install the datasets under a HLQ “NODEUSR” and your user profile lists "H" as the default MSGCLASS. Then you can proceed to install and run Node.js with the following set of commands:
pax -rf <path_to_pax_archive_installable_file> -x pax
cd <path_to_pax_archive_installable_file>
export COMPILER_INSTALL_HLQ=NODEUSR
export COMPILER_INSTALL_HELD_MSGCLASS=H    #To set the COMPILER_INSTALL_HELD_MSGCLASS environment variable
./unpack.pl
export PATH=`pwd`/bin:$PATH
./node
>console.log("Hello World")
If the installation completes successfully, you will see a “Hello World” pop up on your screen. If an error occurs during the installation, it is typically because the MSGCLASS parameter is not set correctly. You can query the MSGCLASS parameter on TSO with the following command:
LISTUSER NODEUSR TSO NORACF
If your user ID does not have the appropriate permission to view this information, contact your system administrator.

For more information about exporting the COMPILER_INSTALL_HELD_MSGCLASS environment variable, see Installing and configuring IBM SDK for Node.js - z/OS.

Forceful termination

If the node process needs to be killed forcefully, you can try sending an abort signal by using the following command:
kill -6 <process_id_of_node_process>

The process ID can be obtained using the ps command.

Module CXXRT64 was not found.

To resolve this issue, install the LE PTFs as described in Installing and configuring IBM SDK for Node.js - z/OS.

unpack.pl expects SDSF

unpack.pl installs the C/C++ runtime and compiler that come with IBM SDK for Node.js - z/OS. The current unpack.pl installation requires the availability of SDSF on the system and proper access to use SDSF. The script uses SDSF to submit JES2 jobs and check status of jobs. To work around this requirement, try the SMP/E edition, which uses the SMP/E process for installation.

use: ./unpack.pl 3: FSUM7351 not found

The whole error message looks like this:
use: ./unpack.pl 3: FSUM7351 not found
use: ./unpack.pl 4: FSUM7351 not found
./unpack.pl 5: FSUM7332 syntax error: got (, expecting Newline_

The cause might be that the path /usr/bin/env is missing on your system. To set up this path for the env command, see Verifying the env command path.

Installing npm on a GitHub repository is not successful.

Use the following syntax to install npm and make sure you have Git version 2.14.4_zos_b09 installed:
npm install <github_repo_url>#branch

Error when running node --version

When you run node --version, you might see an error message that is similar to the following example:
msgget: EDC5133I No space left on device. (errno2=0x07050305)
CEE5207E The signal SIGABRT was received.
Ý1¨ + Done(131) node --version
 83951929      Abort   /ZOWE/node/node-v8.16.0-os390-s390x/bin/node

This indicates that you hit the message queue limit, and you need to set the __IPC_CLEANUP=1 environment variable for now to remove the existing message queues and run node --version again. Message queues are left when the previous node processes do not end normally. If the node processes end normally, the message queues are cleaned and won't be left.