在 Mac 上安装 Secure Gateway 失败
Installation of Secure Gateway on Mac fails
运行 来自 Finder 的 secgw.command 并出现许多 NPM 错误
warnings/errors开始:
结束
找不到日志文件:
我安装了 log4js (npm install log4js -g),仍然出现错误。
npm cache clean
没有帮助。
已将 ibm 目录复制到其他地方并使用 sudo
MacBook-Pro:ibm jps$ cd Desk*
MacBook-Pro:ibm jps$ cd ibm
MacBook-Pro:ibm jps$ sudo ./secgw.command
增加日志级别的输出:
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 到德国:已连接,但未提示输入用户
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 '^]'.
再次尝试 secgw.command:
[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
可能意味着软件包没有正确下载,因此无法解压 (see this npm issue)。尝试 运行 npm cache clean
(可能需要 sudo),然后再次 运行 secgw.command 脚本。
确保您可以远程登录区域服务器(基于您的 Bluemix 区域)sgmanager.<region>.bluemix.net
以下是其中一项:
- 美国南部:
ng
- 英国:
eu-gb
- 德国:
eu-de
- 悉尼:
au-syd
例如,如果您使用的是德国地区,则成功的 telnet 连接应如下所示:
$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.24.140...
Connected to eu-de.bluemix.net.
对于您尝试连接的网关,它将在网关信息面板的安全网关仪表板上指定一个节点。确保您也可以在端口 9000 上远程登录到该服务器名称。例如,节点为 cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com
的网关将有一个成功的 telnet:
$ 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.
托管 Secure Gateway 客户端的计算机必须能够访问区域服务器和托管您的网关的服务器才能成功连接。
尝试连接 Secure Gateway 客户端时,ENOTFOUND
暗示网络问题导致主机 运行 客户端无法解析 sgmanager.<region>.bluemix.net
或特定的网关节点,并会导致上述 telnet 命令中的一个或两个失败。
运行 来自 Finder 的 secgw.command 并出现许多 NPM 错误
warnings/errors开始:
结束
找不到日志文件:
我安装了 log4js (npm install log4js -g),仍然出现错误。
npm cache clean
没有帮助。
已将 ibm 目录复制到其他地方并使用 sudo
MacBook-Pro:ibm jps$ cd Desk*
MacBook-Pro:ibm jps$ cd ibm
MacBook-Pro:ibm jps$ sudo ./secgw.command
增加日志级别的输出:
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 到德国:已连接,但未提示输入用户
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 '^]'.
再次尝试 secgw.command:
[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
可能意味着软件包没有正确下载,因此无法解压 (see this npm issue)。尝试 运行 npm cache clean
(可能需要 sudo),然后再次 运行 secgw.command 脚本。
确保您可以远程登录区域服务器(基于您的 Bluemix 区域)sgmanager.<region>.bluemix.net
以下是其中一项:
- 美国南部:
ng
- 英国:
eu-gb
- 德国:
eu-de
- 悉尼:
au-syd
例如,如果您使用的是德国地区,则成功的 telnet 连接应如下所示:
$ telnet sgmanager.eu-de.bluemix.net 443
Trying 169.50.24.140...
Connected to eu-de.bluemix.net.
对于您尝试连接的网关,它将在网关信息面板的安全网关仪表板上指定一个节点。确保您也可以在端口 9000 上远程登录到该服务器名称。例如,节点为 cap-eu-de-prd-sg-bm-01.integration.ibmcloud.com
的网关将有一个成功的 telnet:
$ 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.
托管 Secure Gateway 客户端的计算机必须能够访问区域服务器和托管您的网关的服务器才能成功连接。
尝试连接 Secure Gateway 客户端时,ENOTFOUND
暗示网络问题导致主机 运行 客户端无法解析 sgmanager.<region>.bluemix.net
或特定的网关节点,并会导致上述 telnet 命令中的一个或两个失败。