trouble with opening a console to an openvz container.

J

joeblow

Guest
I'm having trouble opening consoles to openvz containers.

I'm running proxmox VE 2 beta3 on a host named 'proxmox'. The containers have RHEL5 variants in them. I can both ping the containers and ssh into them. But when I select a container (say, 109 with name 'test') in the lefthand pane on the web page, then click the 'console' button on the upper right of the webpage, I get a firefox VNC window ith url:

https://proxmox:8006/?console=openvz&vmid=109&vmname=test&node=proxmox

In the display part of the vnc window it says:

Network error: could not connect to server: proxmox:5900

Consoles to kvm guests work fine.

Any thoughts?

Thanks
 
No relevant entries in /var/log/messages

in /var/log/apache2/error.log

[Wed Jan 25 10:45:35 2012] [error] [client 172.21.21.185] File does not exist: /usr/share/pve-manager/images/favicon.ico

Lots of those. Basically every time something on the webpage changes or rewrites. I'm guessing that's just the regular garden-variety favicon.ico error?

in /var/log/apache2/access.log:
root@proxmox:/var/log/apache2# tail -f access.log|grep console
172.21.21.185 - - [25/Jan/2012:10:48:44 -0900] "GET /?console=openvz&vmid=109&vmname=test&node=proxmox HTTP/1.1" 200 4117 "https://proxmox:8006/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"
172.21.21.185 - - [25/Jan/2012:10:48:44 -0900] "GET /pve2/ext4/ext-all-debug.js HTTP/1.1" 200 456398 "https://proxmox:8006/?console=openvz&vmid=109&vmname=test&node=proxmox" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"
172.21.21.185 - - [25/Jan/2012:10:48:45 -0900] "POST /api2/json/access/ticket HTTP/1.1" 200 1365 "https://proxmox:8006/?console=openvz&vmid=109&vmname=test&node=proxmox" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"
172.21.21.185 - - [25/Jan/2012:10:48:45 -0900] "POST /api2/extjs/nodes/proxmox/openvz/109/vncproxy HTTP/1.1" 200 2101 "https://proxmox:8006/?console=openvz&vmid=109&vmname=test&node=proxmox" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"
172.21.21.185 - - [25/Jan/2012:10:48:45 -0900] "GET /api2/extjs/cluster/resources HTTP/1.1" 200 1253 "https://proxmox:8006/?console=openvz&vmid=109&vmname=test&node=proxmox" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"
 
I am having the same issue from a Mac OSX Lion 10.7.2. Running from Chrome 18, Firefox 10.0, and Safari all give the same error:

Network error: could not connect to server: 172.16.100.116:5900

This is a brand new Proxmox VE installation, and I ran apt-get dist-upgrade before creating the container. I got the template from http://download.openvz.org/template/precreated/ubuntu-11.10-x86_64.tar.gz

The container is running and it's using bridged networking, so it got a DHCP address and I don't know what it is, otherwise I would try to connect via SSH to see if it was actually working. I should also mention that I'm running Proxmox in Parallels on my Mac, which is also using bridged networking, so that could be part of the problem. I am planning on installing Proxmox on dedicated hardware later this evening to see if that is the case.
 
probably just a timeout? I never installed on Parallels but on VMware Workstation on win7, never had any problems.
 
Not sure. I tried it several times. The first time, it took almost a minute to load Java, which definitely caused a timeout. But I closed the window and opened the console again several times in each browser. It only takes a second or two to open after the first time, and I immediately got the same error. I even tried hitting the reload and refresh buttons in the top right of the console window, but kept getting the same message.
 
Just thought I would give a little more info. On Proxmox, I ran "netstat -tuln" to see what ports are open. It turns out port 5900 is not even open. Also ran it right after clicking the Console button and it's still not listening on 5900.

Checking the syslog right after clicking the Console button reveals this:

Jan 27 13:35:46 cloud pvedaemon[30353]: <root@pam> starting task UPID:cloud:00008BC6:000FBD06:4F22EE82:vncproxy:100:root@pam:
Jan 27 13:35:46 cloud pvedaemon[35782]: starting openvz vnc proxy UPID:cloud:00008BC6:000FBD06:4F22EE82:vncproxy:100:root@pam:
Jan 27 13:35:46 cloud pvedaemon[30353]: <root@pam> successful auth for user 'root@pam'
Jan 27 13:35:47 cloud pvedaemon[30353]: <root@pam> end task UPID:cloud:00008BC6:000FBD06:4F22EE82:vncproxy:100:root@pam: OK
 
I think I figured out the problem:

I have created two virtual machines from the Ubuntu 11.10 x64 image, and both had the same problem of not being able to use the Console. I assigned IP addresses to them both so I could attempt to SSH into them. Unfortunately, I couldn't because of the following error:

PTY allocation request failed on channel 0

After doing some research, I was finally able to fix the problem on both machines. It is caused by an incompatibility between udev and OpenVZ:

  1. ssh username@hostname "/bin/bash -i"
  2. Run these commands to make it possible to log in using Bash temporarily:
    1. rm -rf /dev/ptmx
    2. mknod /dev/ptmx c 5 2
    3. chmod 666 /dev/ptmx
    4. umount /dev/pts
    5. rm -rf /dev/pts
    6. mkdir /dev/pts
    7. mount /dev/pts
    8. exit
  3. Log back in the normal way:
    1. ssh username@hostname
  4. You should have been able to log in normally. Now we have to fix the problem permanently:
  5. vi /etc/fstab
    1. Press i to enter insert mode
    2. Remove any line mentioning /dev/pts
    3. Add this line:
      1. devpts /dev/pts devpts defaults 0 0
    4. Save: press (esc), then :wq
  6. reboot
  7. Once rebooted, you should be able to log into the machine normally from now on.
After doing this, I found that I could now use the Console on these machines.
 
Came across similar error.
1. Ensure you have updated java
2. Make sure your PC/remote desktop machine's firewall or antivirus is not blocking the port 5xxx

sorted my issue out :)
 
Same here.

Putty, Waterfox 1.8.1, Java 64 (7.11)

Solution:
Make sure there is a tunnel for port 5009 -> 5009.
 

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!