Cloudify:bootstrap-localcloud:操作失败?

Cloudify:bootstrap-localcloud:操作失败?
  • 操作系统: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       

答案1

您可能已经在计算机上运行了 localcloud。有以下几种选择:

  1. 尝试使用以下方式连接到现有的本地云connect localhost
  2. 运行teardown-localcloud之前bootstrap-localcloud

要获取更多调试信息,请使用--verbose选项(例如bootstrap-localcloud --verbose

答案2

找到问题了。

当我手动运行此命令时:

/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:错误=13,权限被拒绝

因此,正如我对所做的那样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 开发人员应该检查执行权限并给我们一个明确的警告,而不是像上面那样给出太模糊的消息。

相关内容