按照快速入门指南 ,运行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上运行时工作正常。
更新:5月30日星期三22:37:30 ICT 2012
回复@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
您可能已经在您的计算机上运行了localcloud。 有几个选项:
connect localhost连接到现有的localcloud bootstrap-localcloud之前运行teardown-localcloud bootstrap-localcloud 有关更多debugging信息,请使用--verbose选项(例如bootstrap-localcloud --verbose )
发现问题。
当我手动运行这个命令时:
/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更改为日志文件)
我会在日志文件中看到类似这样的内容:
GSA WARNING [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,权限被拒绝
所以,就像我为cloudify.sh所做的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开发者应该检查执行权限,并给我们一个清晰的警告,而不是像上面这样太模糊的信息。