3
  • OS: Gentoo, CentOS
  • Version: 2.1.0

Follow the quick start guide, I got the below error when running 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.

What port Cloudify is using to check that agent is running?

PS: it's working fine when running on Windows.


UPDATE: Wed May 30 22:37:30 ICT 2012

Reply to @tamirkorem and @Itai Frenkel:

I'm pretty sure because this is the first time I run that command on 2 servers. More clearly, here're the output:

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. 

and this one is the detailed result:

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

Reply to @Eliran Malka:

there is no such process listening on port 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       
quanta
  • 51,413
  • 19
  • 159
  • 217
  • the Lookup Service on cloudify is listening on port 4172. – Eliran Malka May 30 '12 at 12:15
  • 1
    Are you sure you're not running two `bootstrap-localcloud` processes on the same machine? If not, please run the following command and tell us what the log files say: `bootstrap-localcloud –verbose` –  May 30 '12 at 11:57
  • @tamirkorem: I'm sure. See my updated question. EliranMalka: there is no process that is listening on this port. – quanta May 30 '12 at 15:52

2 Answers2

3

You are probably already running a localcloud on your machine. There are several options:

  1. Try connecting to the existing localcloud with connect localhost
  2. Run teardown-localcloud prior to bootstrap-localcloud

For more debugging information use the --verbose option (for example bootstrap-localcloud --verbose)

Itai Frenkel
  • 203
  • 1
  • 8
  • This is the first time I run this command (on both machines). `teardown-localcloud` said that there is no running agent on my machine. Updated the question. – quanta May 30 '12 at 15:54
2

Found the problem.

When I manually run this command:

/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

(change /dev/null to a log file)

I'll see something like this in the log file:

2012-05-30 23:03:14,617 GSA WARNING [com.gigaspaces.grid.gsa] - [gsm_lus][1/]: Failed to start, exiting; Caused by: java.io.IOException: Cannot run program "/usr/local/src/gigaspaces-cloudify-2.1.0-ga//bin/gsm.sh" (in directory "/usr/local/src/gigaspaces-cloudify-2.1.0-ga/bin"): java.io.IOException: error=13, Permission denied

So, as I did for the cloudify.sh, I have to give the execute permission to those shell scripts:

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

and it's working fine now:

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.

The Cloudify developer should check the execute permission and give us a clearly warning instead of a message that is too vague like above.

quanta
  • 51,413
  • 19
  • 159
  • 217
  • Thanks! I've opened an issue https://cloudifysource.atlassian.net/browse/CLOUDIFY-842 and we will fix this as soon as possible. – Itai Frenkel May 31 '12 at 09:16