Comments (9)
Can you paste the code you are attempting to run?
That error message is being thrown from node.js core, it generally means that your outgoing connection cannot find it's target ( bad URI / bad network / etc )
from node-cloudservers.
Thanks Marak. Here's the code I'm trying to run.
var cloudservers = require('cloudservers'),
sys = require('sys');
function createServer(serverName, client) {
var options = {
name: serverName,
image: 49, // Ubuntu 10.04 (Lucid Lynx)
flavor: 1, // 256 server
};
client.setAuth(function (err, res) {
if(err) {
console.log("Error Authenticating Client:")
console.log(err);
} else {
client.createServer(options, function (err, server) {
if(err) {
console.log("Error Creating Server")
console.log(err);
} else {
server.setWait({ status: 'ACTIVE' }, 5000, function () {
// Our server is now built and active, so we can install node.js on it
sys.puts('Your server ' + serverName + ' is now ready.');
sys.puts(' IP Address: ' + server.addresses.public);
sys.puts(' Root password: ' + server.adminPass);
});
}
});
}
});
};
var args = process.argv.slice(2);
var serverName = args[0];
var username = args[1] || 'my-userid';
var apiKey = args[2] || 'my-api-key';
var config = {
auth : {
username: 'my-userid',
apiKey: 'my-api-key'
}
};
var client = cloudservers.createClient(config);
createServer(serverName, client);
I can successfully authenticate using curl with the following:
user$ curl -D -
-H "X-Auth-Key: (my-api-key)"
-H "X-Auth-User: (my-user-id)"
https://auth.api.rackspacecloud.com/v1.0
I agree with you. Everything points to something funky with the outbound connection...but I don't seem to have issues with curl or npm.
from node-cloudservers.
Haven't resolved. Any ideas?
from node-cloudservers.
Confirmed the same problem. I used the client.getFlavors
example from the readme.
from node-cloudservers.
Seems the current git repo works. What is in npm doesn't. Might need to publish version "0.2.9". Current in npm in "0.2.8"
from node-cloudservers.
Ditto on the npm installed version.
from node-cloudservers.
Well I just had to use this library and the workaround is to set "host" to "auth.api.rackspacecloud.com" in the auth hash. The problem is within lib/cloudservers/code.js when in the setAuth function the authUrl
becomes undefined for some reason. I tried debugging it but couldn't figure out why that happens.
Here is how you set the auth hash so it worked:
{
"username" : "X",
"apiKey" : "Y",
"host" : "auth.api.rackspacecloud.com"
}
from node-cloudservers.
Turns out this bug has been fixed in the current master, and it just hasn't been npm publish
ed!
from node-cloudservers.
Current master is broken in other ways. It does not properly set the serverUrl after authorization resulting in a protocol error. Any chance of getting a stable version pushed to npm?
UPDATE: My bad, I had an auth error, which instead of being reported or throwing an exception, just messes up the config hash by assuming a valid response.
from node-cloudservers.
Related Issues (10)
- question - ssh passwords from rackspace cloud servers HOT 3
- Upgrade to [email protected] HOT 1
- Documentation doesn't mention that you have to call setAuth HOT 3
- [Request]: option to perform cache-busting on API call HOT 1
- Please push latest to npm (auth URL issue) HOT 3
- Error: Failed to parse json, when installing cloudservers HOT 6
- node v0.5.0-pre HOT 2
- Possible to install node-cloudservers with cloud9ide? HOT 5
- createServer and getServers returns null HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-cloudservers.