Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket hang up - POST clone #3

Open
sokraflex opened this issue Apr 22, 2016 · 7 comments
Open

Socket hang up - POST clone #3

sokraflex opened this issue Apr 22, 2016 · 7 comments

Comments

@sokraflex
Copy link

Hello there!

I just tried the library and listing nodes/vms works great so far within our proxmox installation.
After that, I tried cloning a VM template (which does not currently run), but instead of an error message or a response I simply receive a "Socket hang up" error.

Authentication is done via PAM (using "root"), so permissions shouldn't be a problem.

My code:

proxmox.post('/nodes/'+nodeId+'/qemu/'+vmId+'/clone', options, function(data) {
    console.log(data);
});

Result:

Error: socket hang up
    at createHangUpError (_http_client.js:200:15)
    at TLSSocket.socketOnEnd (_http_client.js:292:23)
    at emitNone (events.js:72:20)
    at TLSSocket.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:913:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

Any idea? Does Proxmox store logs of API calls anywhere?

Thanks for any help!

@rtrettin
Copy link

Have you found a solution to this? I ran into the same issue when trying to create a new VM.

@sokraflex
Copy link
Author

sokraflex commented May 12, 2016

Yes. We found out that this module has some programming mistakes from the base on - for example, it does not respond with error messages if errors occur.

We completely rewrote the proxmox api implementation. Our module works stable, and we've added a lot of abstraction layers and methods helping the developer. For example, you can do sth like this:

var Proxmox = require('proxmox');
var proxmox = new Proxmox('myhost.com', 'myusername', 'mypassword');
proxmox.getNodes(function(err, nodes) {
    if (err) return next(err);

    console.log(nodes);
});

cloning/starting/stopping works well, also conversions from and to a template. Error messages get reported.

Problem is, that due to it's large scale and complexity, we need to completely document the API, which will take some time. That's the main reason why we didn't open source the module right away. If you're interested in trying or using it, feel free to contact me at martin.bories [at] megatherium.solutions, and I'm sure we can work something out :).

@rtrettin
Copy link

Ah, I see. I have sent you an email for further discussion. Hope we can work out a deal!

@sokraflex
Copy link
Author

Thanks for that, I already replied to your mail some hours ago.

@rtrettin
Copy link

Looks like our mail server filtered your response. I have whitelisted your email. Can you send again? Sorry about that.

@sokraflex
Copy link
Author

I forwarded the message to you again ;)

@vahidHossaini
Copy link

On npm--> node-proxmox.js --> Line 110 --> Replace "req.write(querystring.stringify(body));" With "req.write(body);"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants