Debugging a Location
Debugging a location
Due to the wide variety of environments on which Cloudsoft AMP can provision machines, there can be quite varied problems which occur when configuring a location. This section should be used as a high-level reference to with links to extended documentation.
Firstly we need to find out the cause of any failure we are seeing.
br application
Id Name Status Location
qcmo4h0e99 location test ERROR t7czpg42b7
Here we can see that our application from Creating Your First Location failed to deploy.
br application qcmo4h0e99
Id: qcmo4h0e99
Name: location test
Status: ERROR
ServiceUp: false
Type: org.apache.brooklyn.entity.stock.BasicApplication
CatalogItemId:
LocationId: t7czpg42b7
LocationName: AWS Virginia
LocationSpec: jclouds:aws-ec2
LocationType: org.apache.brooklyn.location.jclouds.JcloudsLocation
This gives us a bit more detail about our application but no information on the failure. The first place to look is at the activities associated with our deployment.
br application qcmo4h0e99 activity
Id Task Submitted Status Streams
GYJAb6Kk start Thu Jul 7 16:20:55 BST 2016 Failed
rjgrakVK invoking start[locations] on 1 node Thu Jul 7 16:20:55 BST 2016 Failed
We can see two activities, both of which have failed.
br application qcmo4h0e99 activity rjgrakVK
Id: rjgrakVK
DisplayName: invoking start[locations] on 1 node
Description:
EntityId: qcmo4h0e99
EntityDisplayName: location test
Submitted: Thu Jul 7 16:20:55 BST 2016
Started: Thu Jul 7 16:20:55 BST 2016
Ended: Thu Jul 7 16:20:58 BST 2016
CurrentStatus: Failed
IsError: true
IsCancelled: false
SubmittedByTask: GYJAb6Kk
Streams:
DetailedStatus: "Failed after 2.32s: Error invoking start at EmptySoftwareProcessImpl{id=mgwwc98b49}: Not authorized to access cloud jclouds:aws-ec2 (us-east-1); check ident
ity, credentials, and endpoint (identity='ABCDEFGHIJKLMNOPQRST', credential length 39): AuthorizationException: POST https://ec2.us-east-1.amazonaws.com/ HTTP/1.1 -> HTTP/1.1 401
Unauthorized
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at EmptySoftwareProcessImpl{id=mgwwc98b49}: Not authorized to access cloud jclouds:aws-ec2 (u
s-east-1); check identity, credentials, and endpoint (identity='ABCDEFGHIJKLMNOPQRST', credential length 39): AuthorizationException: POST https://ec2.us-east-1.amazonaws.com/ HT
TP/1.1 -> HTTP/1.1 401 Unauthorized
Provisioning Failures
We can see that the application failed to start due to a problem with the credentials that we supplied for the
AWS location. Another common error that is seen with provisioning is Unable to match required VM template constraints
which AMP was unable to find an image that matched the requirements set on the location e.g. no image existing with
the requested OS version.
Further details on how to solve provisioning errors can be found here VM provisioning Failues
Connectivity
Often Cloudsoft AMP is running on a different network from the target network. This can mean that there are a number of possible issues that may prevent AMP from provisioning or deploying. These issues often resolve as a timeout waiting for service up error.
Details on solving these sorts of issues can be found her VM Connectivity Issues
Remote Execution Failures
After obtaining a machine, AMP can execute commands over SSH or WinRM.
Parsing stdout
Some blueprints attempt to parse the stdout of these commands.
It is strongly recommended that VMs are configured so that no additional stdout is written when executing remote SSH (or WinRM) commands. Such stdout risks interfering with the response parsing in some blueprints.
For example, if configuring the VM to write out “Last login” information, this should be done for only “interactive” shells (see http://stackoverflow.com/a/415444/1393883 for more details).