Ran the secgw.command from Finder and got many NPM errors
I installed log4js (npm install log4js -g), still getting errors.
npm cache clean
did not help.
Copied ibm directory to somewhere else and used sudo
MacBook-Pro:ibm jps$ cd Desk*
MacBook-Pro:ibm jps$ cd ibm
MacBook-Pro:ibm jps$ sudo ./secgw.command
Output with increased loglevel:
MacBook-Pro-3:client jps$ node lib/secgwclient.js <gateway> -t <token>
[2017-10-14 13:33:37.290] [INFO] (Client ID 22481) No password provided. The UI will not require a password for access
[2017-10-14 13:33:37.313] [WARN] (Client ID 22481) UI Server started. The UI is not currently password protected
[2017-10-14 13:33:37.313] [INFO] (Client ID 22481) Visit localhost:9003/dashboard to view the UI.
cli> [2017-10-14 13:33:37.750] [INFO] (Client ID 22482) Setting log level to TRACE
[2017-10-14 13:33:37.755] [DEBUG] (Client ID 22482) The Secure Gateway client will fetch its configuration from https://sgmanager.eu-de/.bluemix.net/sgconfig/QqiJp83bfu4_prod_eu-de/
[2017-10-14 13:33:37.862] [INFO] (Client ID 22483) Setting log level to INFO
[2017-10-14 13:33:37.870] [ERROR] (Client ID 22482) The response is code: ENOTFOUND, message: getaddrinfo
cli> [2017-10-14 13:33:37.872] [INFO] (Client ID 22482) Process exiting without errors due to user or server request
[2017-10-14 13:33:38.422] [ERROR] (Client ID 22483) The Secure Gateway tunnel connection had an error
cli> [2017-10-14 13:33:38.425] [INFO] (Client ID 22483) Process exiting without errors due to user or server request
cli>
Telnet to Germany: connected, but not prompted for user
Peters-MacBook-2784:~ jps$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.12.140...
Connected to eu-de.bluemix.net.
Escape character is '^]'.
Tried secgw.command again:
[2017-10-14 22:07:43.205] [INFO] (Client ID 27049) No password provided. The UI will not require a password for access
[2017-10-14 22:07:43.216] [ERROR] (Client ID 27049) Unable to establish UI on port 9003. Is this port already in use?
cli> [2017-10-14 22:07:43.497] [INFO] (Client ID 27050) Setting log level to INFO
[2017-10-14 22:07:43.537] [ERROR] (Client ID 27050) The response is code: ENOTFOUND, message: getaddrinfo
cli> [2017-10-14 22:07:43.539] [INFO] (Client ID 27050) Process exiting without errors due to user or server request
tar.unpack untar error
could mean that the the packages didn't download correctly and thus can't be unpacked (see this npm issue). Try running npm cache clean
(might need sudo) and then running the secgw.command script again.
Ensure you can telnet the regional server (based on your Bluemix region) sgmanager.<region>.bluemix.net
where is one of the following:
ng
eu-gb
eu-de
au-syd
For example, if you are using the Germany region, a successful telnet connection should look like:
$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.24.140...
Connected to eu-de.bluemix.net.
For the gateway you are attempting to connect to, it will have a Node specified on the Secure Gateway Dashboard in the Gateway Info Panel. Ensure you can telnet to that server name on port 9000, as well. For example, a gateway with Node cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com
would have a successful telnet of:
$ telnet cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com 9000
Trying 159.122.71.68...
Connected to cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com.
The machine hosting the Secure Gateway Client must be able to access both the regional server and the server your gateway is hosted on to be able to connect successfully.
When attempting to connect the Secure Gateway Client, ENOTFOUND
implies a networking issue resulting in the host running the client to be unable to resolve the address of either the sgmanager.<region>.bluemix.net
or the specific gateway node and would result in one or both of the above telnet commands failing.