# Knife rackspace plugin

**URL:** <https://discourse.chef.io/t/knife-rackspace-plugin/2576>\
**Category:** Chef Infra (archive)\
**Created:** [March 20, 2012, 1:10am UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576 "2012-03-20T01:10:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kimball\_Johnson](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Kimball\_Johnson](https://discourse.chef.io/u/Kimball_Johnson)\
**Post date:** [March 20, 2012, 1:10am UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/1 "2012-03-20T01:10:00Z")

</div>

Hi trying to use the rackspace plugin, getting the error below - any  
ideas? If there issue with the plugin not matching the current API  
that anyone knows of?

I have checked my username and regenerated the key.

$ knife rackspace image list  
ERROR: Excon::Errors::Unauthorized: Expected(204) \<=\> Actual(401 Unauthorized)  
request =\> {:path=\>"/v1.0", :scheme=\>“https”,  
:headers=\>{“X-Auth-User”=\>"", “Content-Length”=\>0,  
“X-Auth-Key”=\>"", “Host”=\>“[auth.api.rackspacecloud.com:443](http://auth.api.rackspacecloud.com:443)”},  
:host=\>“[auth.api.rackspacecloud.com](http://auth.api.rackspacecloud.com)”, :port=\>“443”, :method=\>“GET”,  
:mock=\>nil, :expects=\>204, :query=\>nil}  
response =\> #\<Excon::Response:0x1029ee708 @status=401,  
@headers={“Date”=\>“Tue, 20 Mar 2012 00:59:27 GMT”,  
“Content-Type”=\>“application/octet-stream”, “Content-Length”=\>“24”,  
“Server”=\>“Apache/2.2.3 (Red Hat)”,  
“vary”=\>“X-Auth-Token,X-Auth-Key,X-Storage-User,X-Storage-Pass”,  
“Connection”=\>“Keep-Alive”}, @body=“Bad username or password”\>

Thanks,

Kimball Johnson

---

<div class="post-metadata">

**Author:** ![Matt\_Ray\_OPSCODE](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_ray_opscode/32/459_2.png) [@Matt\_Ray\_OPSCODE](https://discourse.chef.io/u/Matt_Ray_OPSCODE)\
**Post date:** [March 20, 2012, 4:25am UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/2 "2012-03-20T04:25:16Z")

</div>

This is completely anecdotal, but my Rackspace creds stopped working a  
few weeks ago and I had to recreate my user and password. I believe it  
was the same error. New credentials and it started working again.

Thanks,  
Matt Ray  
Senior Technical Evangelist | Opscode Inc.  
[matt@opscode.com](mailto:matt@opscode.com) | (512) 731-2218  
Twitter, IRC, GitHub: mattray

On Mon, Mar 19, 2012 at 8:10 PM, Kimball Johnson [kimball@bowerham.net](mailto:kimball@bowerham.net) wrote:

> Hi trying to use the rackspace plugin, getting the error below - any  
> ideas? If there issue with the plugin not matching the current API  
> that anyone knows of?
> 
> I have checked my username and regenerated the key.
> 
> $ knife rackspace image list  
> ERROR: Excon::Errors::Unauthorized: Expected(204) \<=\> Actual(401 Unauthorized)  
> request =\> {:path=\>"/v1.0", :scheme=\>"https",  
> :headers=\>{"X-Auth-User"=\>"", "Content-Length"=\>0,  
> "X-Auth-Key"=\>"", "Host"=\>"[auth.api.rackspacecloud.com:443](http://auth.api.rackspacecloud.com:443)"},  
> :host=\>"[auth.api.rackspacecloud.com](http://auth.api.rackspacecloud.com)", :port=\>"443", :method=\>"GET",  
> :mock=\>nil, :expects=\>204, :query=\>nil}  
> response =\> #\<Excon::Response:0x1029ee708 @status=401,  
> @headers={"Date"=\>"Tue, 20 Mar 2012 00:59:27 GMT",  
> "Content-Type"=\>"application/octet-stream", "Content-Length"=\>"24",  
> "Server"=\>"Apache/2.2.3 (Red Hat)",  
> "vary"=\>"X-Auth-Token,X-Auth-Key,X-Storage-User,X-Storage-Pass",  
> "Connection"=\>"Keep-Alive"}, @body="Bad username or password"\>
> 
> Thanks,
> 
> Kimball Johnson

---

<div class="post-metadata">

**Author:** ![Ryan\_Richards](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ryan_richards/32/745_2.png) [@Ryan\_Richards](https://discourse.chef.io/u/Ryan_Richards)\
**Post date:** [March 20, 2012, 5:23am UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/3 "2012-03-20T05:23:12Z")

</div>

I also had to reset and regenerate the rackspace API token

Ryan

On Monday, March 19, 2012 at 11:25 PM, Matt Ray wrote:

> This is completely anecdotal, but my Rackspace creds stopped working a  
> few weeks ago and I had to recreate my user and password. I believe it  
> was the same error. New credentials and it started working again.
> 
> Thanks,  
> Matt Ray  
> Senior Technical Evangelist | Opscode Inc.  
> [matt@opscode.com](mailto:matt@opscode.com) | (512) 731-2218  
> Twitter, IRC, GitHub: mattray
> 
> On Mon, Mar 19, 2012 at 8:10 PM, Kimball Johnson [kimball@bowerham.net](mailto:kimball@bowerham.net) wrote:
> 
> > Hi trying to use the rackspace plugin, getting the error below - any  
> > ideas? If there issue with the plugin not matching the current API  
> > that anyone knows of?
> > 
> > I have checked my username and regenerated the key.
> > 
> > $ knife rackspace image list  
> > ERROR: Excon::Errors::Unauthorized: Expected(204) \<=\> Actual(401 Unauthorized)  
> > request =\> {:path=\>"/v1.0", :scheme=\>"https",  
> > :headers=\>{"X-Auth-User"=\>"", "Content-Length"=\>0,  
> > "X-Auth-Key"=\>"", "Host"=\>"[auth.api.rackspacecloud.com:443](http://auth.api.rackspacecloud.com:443)"},  
> > :host=\>"[auth.api.rackspacecloud.com](http://auth.api.rackspacecloud.com)", :port=\>"443", :method=\>"GET",  
> > :mock=\>nil, :expects=\>204, :query=\>nil}  
> > response =\> #\<Excon::Response:0x1029ee708 @status=401,  
> > @headers={"Date"=\>"Tue, 20 Mar 2012 00:59:27 GMT",  
> > "Content-Type"=\>"application/octet-stream", "Content-Length"=\>"24",  
> > "Server"=\>"Apache/2.2.3 (Red Hat)",  
> > "vary"=\>"X-Auth-Token,X-Auth-Key,X-Storage-User,X-Storage-Pass",  
> > "Connection"=\>"Keep-Alive"}, @body="Bad username or password"\>
> > 
> > Thanks,
> > 
> > Kimball Johnson

---

<div class="post-metadata">

**Author:** ![Brad\_Knowles](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/brad_knowles/32/716_2.png) [@Brad\_Knowles](https://discourse.chef.io/u/Brad_Knowles)\
**Post date:** [March 20, 2012, 7:06am UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/4 "2012-03-20T07:06:01Z")

</div>

On Mar 20, 2012, at 4:25 AM, Matt Ray wrote:

> This is completely anecdotal, but my Rackspace creds stopped working a  
> few weeks ago and I had to recreate my user and password. I believe it  
> was the same error. New credentials and it started working again.

The credentials for my "justenoughchef" account are brand new, so unfortunately this is not the problem I've been having. The problem I've been seeing is shown at [https://gist.github.com/de448b0867e604d6efb2/1621c21a6e4c2a1df1039625a4f01d49600b902a](https://gist.github.com/de448b0867e604d6efb2/1621c21a6e4c2a1df1039625a4f01d49600b902a).

--  
Brad Knowles [bknowles@ihiji.com](mailto:bknowles@ihiji.com)  
SAGE Level IV, Chef Level 0.0.1

---

<div class="post-metadata">

**Author:** ![Kimball\_Johnson](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Kimball\_Johnson](https://discourse.chef.io/u/Kimball_Johnson)\
**Post date:** [March 20, 2012, 2:29pm UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/5 "2012-03-20T14:29:37Z")

</div>

On 20 March 2012 07:06, Brad Knowles [bknowles@ihiji.com](mailto:bknowles@ihiji.com) wrote:

> On Mar 20, 2012, at 4:25 AM, Matt Ray wrote:
> 
> > This is completely anecdotal, but my Rackspace creds stopped working a  
> > few weeks ago and I had to recreate my user and password. I believe it  
> > was the same error. New credentials and it started working again.
> 
> The credentials for my "justenoughchef" account are brand new, so unfortunately this is not the problem I've been having. The problem I've been seeing is shown at [https://gist.github.com/de448b0867e604d6efb2/1621c21a6e4c2a1df1039625a4f01d49600b902a](https://gist.github.com/de448b0867e604d6efb2/1621c21a6e4c2a1df1039625a4f01d49600b902a).

Well it turns out my issue was my rackspace is london based so has a  
different authentication server.

Brad's issue - if you make -flavour 1 --flavour 1 then it works

Kimball

---

<div class="post-metadata">

**Author:** ![Kimball\_Johnson](https://avatars.discourse-cdn.com/v4/letter/k/41988e/32.png) [@Kimball\_Johnson](https://discourse.chef.io/u/Kimball_Johnson)\
**Post date:** [March 20, 2012, 3:36pm UTC](https://discourse.chef.io/t/knife-rackspace-plugin/2576/6 "2012-03-20T15:36:05Z")

</div>

> Well it turns out my issue was my rackspace is london based so has a  
> different authentication server.
> 
> Brad's issue - if you make -flavour 1 --flavour 1 then it works

Still finding after this that it tries to access a dns name for the  
instance, but this doesn't seem to exist when knife tries to ssh in.

Is there are way to get it to use the IP address instead.

Kimball
