[PVE-User] Proxmox API: novnc 401 ticket error
Mohamed Sadok Ben Jazia
benjazia.mohamedsadok at gmail.com
Mon Oct 9 11:37:44 CEST 2017
the noVNC console won't work out of the proxmox web interface.
I found a solution based on a change in proxmox core, it works only in
I can't publish it since it seems as a hack.
You better check proxmox assistance.
On 9 October 2017 at 10:17, TotallyHosted - Martin Kruijff <
info at totallyhosted.nl> wrote:
> Hello Everyone,
> A problem I am facing is getting a ticket for NOVNC submitted. I keep
> getting an error ("401 no ticket" in NOVNC). I am trying to remote connect
> via the API.
> I tried getting NOVNC to work with 2 wrappers,
> https://github.com/ZzAntares/ProxmoxVE <https://github.com/ZzAntares/
> ProxmoxVE> version is below. The other version is
> https://github.com/CpuID/pve2-api-php-client <
> $server = 'myip';
> $user = 'root';
> $pass = 'mypass';
> // Create your Credentials object
> $credentials = new Credentials($server, $user, $pass);
> // realm and port defaults to 'pam' and '8006' but you can specify them
> like so
> //$credentials = new Credentials($server, $user, $pass, 'pam', '9009');
> // Then simply pass your Credentials object when creating the API client
> $proxmox = new Proxmox($credentials);
> $action = $proxmox->create("/nodes/mynode/qemu/201/vncproxy");
> $vncwebsocket = $proxmox->get("nodes/mynode/qemu/201/vncwebsocket",
> array('port' => $action['data']['port'], 'vncticket' =>
> <iframe src="https://mykvmurl:8006/?console=kvm&novnc=1&vmid=201&nod
> e=mynode" <https://mykvmurl:8006/?console=kvm&novnc=1&vmid=201&node=mynode>
> frameborder="0" scrolling="no" width="1024px" height="768px"></iframe>
> var_dumping $vncwebsocket results in just a port in the data array.
> No errors in the httpd error log.
> The strange thing is, when I log in to my Proxmox control panel, the NOVNC
> screen starts to work and all seems fine. When I log out, I get the same
> 401 no ticket error.
> Any thoughts?
> Your help is greatly appreciated!
> PS: i am using the 2.1.1 version without guzzle (I am working with PHP 7.0)
> Kind regards,
> pve-user mailing list
> pve-user at pve.proxmox.com
More information about the pve-user