How can I Resolve Issues Configuring a Secure Gateway in #WatsonAnalytics on Linux?

Blog Home > How can I Resolve Issues Configuring a Secure Gateway in #WatsonAnalytics on Linux?

How can I Resolve Issues Configuring a Secure Gateway in #WatsonAnalytics on Linux?

wa-support-logo

Question:

I am receiving an error when attempting to start the IBM Secure Gateway client after installation on a Linux OS. How do I resolve this issue?

Error: Cannot find module 'log4js'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/opt/ibm/securegateway/client/lib/utils/logging.js:26:18)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)

Solution:

A user will see the error above, or one similar to it, when required dependencies are not present on the Linux machine when attempting to start the Secure Gateway Client.  To resolve the issue, the missing dependency will need to be installed on to the server/machine for the Secure Gateway Client to work correctly.

Here is a list of common dependencies that could potentially be missing.  Please note, there may be other dependencies that could be required that are not on this list.

  • log4js
  • request
  • async
  • ws
  • validator
  • optimist
  • password-hash-and-salt
  • rangen
  • express
  • compression

To install these dependencies, you will first need to navigate to the main Secure Gateway installation directory by following the path below:

cd /opt/ibm/securegateway/client

Once at the Secure Gateway directory, use the npm install command for the missing dependency.

Example: npm install log4js –save –only=dev

With the dependency now installed, we expect that the secure gateway will function as expected, and may be used to connect Watson Analytics to an on premises data source.

More information:

For a more in depth discussion, please see the following documentation on Secure Gateways and Secure Gateway issues specific to Linux.