PHP API with Proxmox HA cluster

x86

New Member
Aug 19, 2014
21
0
1
Hello,

I have a basic HA cluster (2 nodes, just to write the PHP scripts). My script is connecting to a node within the cluster (randomly) and will get all VMs running within the cluster.
i.e. I have node1 and node2 and I am connected to node1.

So the script is getting all vms from node1 and node2 by using the url (/nodes/<name>/qemu). But I am unable to get the nodes of node2 (node1 works fine).
The error is:

URL - https://192.168.17.128:8006/api2/json/nodes/NODE002/qemu
----------------------------------------------

FULL RESPONSE:
HTTP/1.1 401 permission denied - invalid ticket
Cache-Control: max-age=0
Connection: close
Date: Fri, 20 Feb 2015 20:03:29 GMT
Pragma: no-cache
Server: pve-api-daemon/3.0
Expires: Fri, 20 Feb 2015 20:03:29 GMT

END FULL RESPONSE.

Is there anything I am doing wrong?
Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!