2017-09-30 78 views
0

從Finder中冉secgw.command並得到了許多NPM錯誤安裝安全網關在Mac上的失敗

開始警告/錯誤的: enter image description here

enter image description here

找不到日誌文件: enter image description here

我安裝了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 

enter image description here

enter image description here

增加日誌級別輸出:

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 

回答

1

tar.unpack untar error可能意味着包沒有正確下載,因此不能解壓縮(see this npm issue)。嘗試運行npm cache clean(可能需要sudo),然後再次運行secgw.com和腳本。

確保您可以遠程登錄的區域服務器(基於您Bluemix區)sgmanager.<region>.bluemix.net哪裏是下列之一:

  • 美國南部:ng
  • 英國:eu-gb
  • 德國:eu-de
  • Sydney:au-syd

例如,如果您使用的是德國地區,一個成功的telnet連接應該是這樣的:

$ telnet sgmanager.eu-de.bluemix.net 443 
Trying 169.50.24.140... 
Connected to eu-de.bluemix.net. 

您正在試圖連接到網關,它會在安全網關儀表板指定的節點網關信息面板。確保您可以在端口9000上telnet到該服務器名稱。例如,與節點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. 

託管安全網關客戶端的計算機必須能夠訪問這兩個區域服務器和網關託管在服務器能夠連接成功。

當試圖建立連接的安全網關的客戶端,ENOTFOUND意味着致使與主機上運行的客戶端網絡問題是無法解決無論是sgmanager.<region>.bluemix.net或特定網關節點的地址,並會導致一個或兩個上面的telnet命令失敗。

+0

嘗試npm緩存清理:相同的錯誤。複製ibm目錄somwhere else並運行sudo ./secgw.command:沒有untar錯誤,但發生secgw錯誤:ERROR](客戶端ID 36322)響應是代碼:ENOTFOUND,message:getaddrinfo。該網關在Bluemix中啓用,但標有紅色環(我認爲應爲綠色)。 – jpsstack

+0

ENOTFOUND意味着您的機器無法解析SG服務器的主機名。你能'telnet sgmanager。 .bluemix.net 443'其中分別是美國南部,英國,悉尼和法蘭克福的Bluemix地區'ng','eu-gb','au-syd'或'eu-de'。將日誌級別增加到DEBUG或TRACE也會記錄它正在調用哪一個。 –

+0

增加了telnet和ping的結果,請。建議如何提高日誌級別 – jpsstack