Cloud-Computing

Cloudify:bootstrap-localcloud:操作失敗?

  • May 31, 2012
  • 作業系統:Gentoo、CentOS
  • 版本:2.1.0

按照快速入門指南,執行時出現以下錯誤bootstrap-localcloud

cloudify@default> bootstrap-localcloud
STARTING CLOUDIFY MANAGEMENT
2012-05-30 14:55:50,396  WARNING [org.cloudifysource.shell.commands.AbstractGSCommand] - ; \
Caused by: org.cloudifysource.shell.commands.CLIException: \
Error while starting agent. \
Please make sure that another agent is not already running.
Operation failed.

Cloudify 使用哪個埠來檢查代理是否正在執行?

PS:在 Windows 上執行時執行良好。


更新:2012 年 5 月 30 日星期三 22:37:30 ICT

回复@tamirkorem 和@Itai Frenkel:

我很確定,因為這是我第一次在 2 台伺服器上執行該命令。更清楚的是,這裡是輸出:

cloudify@default> teardown-localcloud 
Teardown will uninstall all of the deployed services. Do you want to continue  [y/n]?
2012-05-30 22:43:33,145  WARNING [org.cloudifysource.shell.commands.AbstractGSCommand] - Teardown failed. Failed to fetch the currently deployed applications list. For force teardown use the -force flag.
Operation failed.

cloudify@default> teardown-localcloud -force
Teardown will uninstall all of the deployed services. Do you want to continue  [y/n]?
Failed to fetch the currently deployed applications list. Continuing teardown-localcloud.
.2012-05-30 22:46:39,040  WARNING [org.cloudifysource.shell.commands.AbstractGSCommand] - Teardown aborted, an agent was not found on the local machine.
Operation failed. 

這是詳細的結果:

cloudify@default> bootstrap-localcloud --verbose
NIC Address=127.0.0.1
Lookup Locators=127.0.0.1:4172
Lookup Groups=localcloud
Starting agent and management processes:
gs-agent.sh gsa.global.lus 0 gsa.lus 0 gsa.gsc 0 gsa.global.gsm 0 gsa.gsm_lus 1 gsa.global.esm 0 gsa.esm 1 >/dev/null 2>&1
STARTING CLOUDIFY MANAGEMENT
2012-05-30 22:36:12,870  WARNING [org.cloudifysource.shell.commands.AbstractGSCommand] - ; Caused by: org.cloudifysource.shell.commands.CLIException: Error while starting agent. Please make sure that another agent is not already running. Command executed: /usr/local/src/gigaspaces-cloudify-2.1.0-ga/bin/gs-agent.sh gsa.global.lus 0 gsa.lus 0 gsa.gsc 0 gsa.global.gsm 0 gsa.gsm_lus 1 gsa.global.esm 0 gsa.esm 1 >/dev/null 2>&1

回复@Eliran Malka:

4172埠上沒有這樣的程序監聽:

# netstat --protocol=inet -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN      2363/tor            
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      2331/mysqld         
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2293/cupsd       

發現了問題。

當我手動執行此命令時:

/usr/local/src/gigaspaces-cloudify-2.1.0-ga/bin/gs-agent.sh gsa.global.lus 0 gsa.lus 0 gsa.gsc 0 gsa.global.gsm 0 gsa.gsm_lus 1 gsa.global.esm 0 gsa.esm 1 > /var/log/cloudify.log 2>&1

(更改/dev/null為日誌文件)

我會在日誌文件中看到類似的內容:

2012-05-30 23:03:14,617 GSA 警告

$$ com.gigaspaces.grid.gsa $$- $$ gsm_lus $$$$ 1/ $$: 啟動失敗,退出;引起:java.io.IOException:無法執行程序 “/usr/local/src/gigaspaces-cloudify-2.1.0-ga//bin/gsm.sh”(在目錄“/usr/local/src/gigaspaces- cloudify-2.1.0-ga/bin"): java.io.IOException: error=13, Permission denied

所以,就像我為 做的那樣cloudify.sh,我必須授予這些 shell 腳本的執行權限:

# find . -name '*.sh' -print0 | xargs -0 chmod +x

現在工作正常:

cloudify@default> bootstrap-localcloud 
STARTING CLOUDIFY MANAGEMENT
.
STARTING CLOUDIFY WEBUI
.
STARTING CLOUDIFY REST
CLOUDIFY LOCAL-CLOUD STARTED

LOCAL-CLOUD INFO :
       CLOUDIFY MANAGEMENT http://127.0.0.1:8099/
       CLOUDIFY GATEWAY    http://127.0.0.1:8100/
Local-cloud started successfully. Use the teardown-localcloud command to shutdown all processes.

Cloudify 開發人員應該檢查執行權限,並給我們一個明確的警告,而不是像上面那樣過於模糊的消息。

您可能已經在您的機器上執行 localcloud。有幾種選擇:

  1. 嘗試連接到現有的本地雲connect localhost
  2. 執行teardown-localcloudbootstrap-localcloud

有關更多調試資訊,請使用該--verbose選項(例如bootstrap-localcloud --verbose

引用自:https://serverfault.com/questions/393898