User Guide's EC2 deployment example getting error

User 913 | 11/6/2014, 7:52:07 AM

Using GraphLab V1.0.1, I'm following the User Guide's EC2 deployment example at: http://graphlab.com/learn/userguide/index.html#Deployment

Getting the error because 'conn' is None:

[INFO] Preparing using environment: ec2 [INFO] Beginning Job Validation.

[INFO] Validation complete. Job: 'ec2-exec' ready for execution

AttributeError Traceback (most recent call last) in () 1 # spin up an EC2 instance to run this work 2 jobec2 = gl.deploy.job.create(taskswith_bindings, name='ec2-exec', ----> 3 environment=ec2)

/Users/ttam/anaconda/lib/python2.7/site-packages/graphlab/deploy/job.pyc in create(tasks, name, environment, function, functionarguments, requiredpackages) 338 339 LOGGER.info("Validation complete. Job: '%s' ready for execution" % name) --> 340 job = env.run(session, clonedartifacts, name, environment) 341 _session.register(job) 342 job.save() # save the job once prior to returning.

/Users/ttam/anaconda/lib/python2.7/site-packages/graphlab/deploy/executionenvironment.pyc in run(self, session, tasks, name, environment) 66 """ 67 job = job.Job(name, tasks=tasks, environment=environment) ---> 68 return self.run_job(job, session) 69 70

/Users/ttam/anaconda/lib/python2.7/site-packages/graphlab/deploy/executionenvironment.pyc in runjob(self, job, session) 299 job.serialize(serializedjobfilepath) 300 --> 301 commander = Ec2ExecutionEnvironment.startcommanderhost(job.environment, credentials) 302 posturl = "http://%s:9004/submit" % commander.publicdnsname 303 __LOGGER.debug("Sending %s to %s" % (serializedjobfilepath, posturl))

/Users/ttam/anaconda/lib/python2.7/site-packages/graphlab/deploy/executionenvironment.pyc in startcommanderhost(environment, credentials) 266 securitygroupname = environment.securitygroup, 267 tags = environment.tags, userdata = user_data, --> 268 credentials = credentials) 269 return commander 270

/Users/ttam/anaconda/lib/python2.7/site-packages/graphlab/connect/aws/ec2.pyc in ec2factory(instancetype, region, CIDRrule, securitygroupname, tags, userdata, credentials, amiserviceparameters, numhosts) 419 # Does the security group already exist? 420 securitygroup = None --> 421 for sg in conn.getallsecuritygroups(): 422 if(securitygroupname == sg.name): 423 securitygroup = sg

AttributeError: 'NoneType' object has no attribute 'getallsecurity_groups'

Comments

User 10 | 11/11/2014, 7:05:11 AM

Hi netmobile:

Thanks for trying out GraphLab Create, specifically the Data Pipelines feature. From the stack trace I see you are using an Anaconda distribution of Python. How did you install GraphLab Create 1.0.1? Was it a pip installation after activating the conda environment? (I am confirming that the version of boto being used is the same one that GraphLab Create requires.) Can you run pip freeze from the conda environment, and pass along which version of boto is being used?

Also, does this reproduce regularly? Essentially at the time this error is raised GraphLab Create is trying to query all EC2 Security Groups associated with the account, to see if the Security Group named 'GraphLab' is present or not. It seems from the stack trace that the connection is not valid at this time.

Have you been able to launch EC2 instances using GraphLab Create (ex. calling <code class="CodeInline">graphlab.aws.launch_EC2())</code>?

The error being encountered is a new one, not one we've seen before, so hopefully with some more diagnostic information we will be able to root cause it and resolve the issue.

Thanks.