1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unable to use the web remote console

Discussion in 'Proxmox VE 1.x: Installation and configuration' started by piero.proietti, Mar 12, 2010.

  1. piero.proietti

    piero.proietti New Member

    Joined:
    Mar 12, 2010
    Messages:
    11
    Likes Received:
    0
    I run Proxmox VE from more than a year ad never had big problems, really a great work. Recentely after the update from 1.4 to 1.5 I had the following problem:

    When I try to connect a virtual machine with the browser, it open the window of the console, but don't work and I receive the follow error in the apache error.log:

    [Fri Mar 12 15:55:21 2010] [error] [4922]ERR: 24: Error in Perl code: unable to find free vnc port at /usr/share/perl5/PVE/ConfigServer.pm line 1008.\n

    this is the content of ConfigServer.pm

    ...
    my $next_vnc_port = sub { # private method

    for (my $p = 5900; $p < 6000; $p++) {

    my $sock = IO::Socket::INET->new (Listen => 5,
    LocalAddr => 'localhost',
    LocalPort => $p,
    ReuseAddr => 1,
    Proto => 0);

    if ($sock) {
    close ($sock);
    return $p;
    }
    }
    die "unable to find free vnc port";
    };
    ...


    This my actual version:

    # pveversion --verbose

    pve-manager: 1.5-8 (pve-manager/1.5/4674)
    running kernel: 2.6.24-10-pve
    proxmox-ve-2.6.24: 1.5-21
    pve-kernel-2.6.24-10-pve: 2.6.24-21
    pve-kernel-2.6.24-1-pve: 2.6.24-4
    pve-kernel-2.6.24-5-pve: 2.6.24-6
    pve-kernel-2.6.24-2-pve: 2.6.24-5
    qemu-server: 1.1-11
    pve-firmware: 1.0-3
    libpve-storage-perl: 1.0-10
    vncterm: 0.9-2
    vzctl: 3.0.23-1pve8
    vzdump: 1.2-5
    vzprocps: 2.0.11-1dso2
    vzquota: 3.0.11-1
    pve-qemu-kvm: 0.11.1-2

    That I can do to solve the question, possibly without the need to reformat everything?

    Thanx
     
    #1 piero.proietti, Mar 12, 2010
    Last edited: Mar 12, 2010
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    10,635
    Likes Received:
    14
    is this a standard ISO install, no manual changes?
     
  3. piero.proietti

    piero.proietti New Member

    Joined:
    Mar 12, 2010
    Messages:
    11
    Likes Received:
    0
    )Yes, it is a standard ISO install (version 1.4 as I remember) just upgrated to 1.5.
     
  4. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    13,639
    Likes Received:
    15
    So who uses ports 5900-6000? Or do you run some kind of firewall?
     
  5. piero.proietti

    piero.proietti New Member

    Joined:
    Mar 12, 2010
    Messages:
    11
    Likes Received:
    0
    I don't know, this is the result of

    #pstree

    init─┬─apache2───2*[apache2]
    ├─atd
    ├─cron
    ├─6*[getty]
    ├─inetd
    ├─kvm───3*[{kvm}]
    ├─kvm───2*[{kvm}]
    ├─master─┬─pickup
    │ ├─qmgr
    │ └─tlsmgr
    ├─ntpd
    ├─portmap
    ├─pvedaemon───2*[pvedaemon]
    ├─rpc.statd
    ├─rsyslogd───3*[{rsyslogd}]
    ├─sshd───sshd───bash───pstree
    └─udevd
     
  6. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    13,639
    Likes Received:
    15
    Does "netstat -t" shows something usefull.
     
  7. piero.proietti

    piero.proietti New Member

    Joined:
    Mar 12, 2010
    Messages:
    11
    Likes Received:
    0
    netstat -t
    This is the result of netstat -t

    Active Internet connections (w/o servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State
    tcp 0 0 prometeo.geniodife.:ssh 10.26.106.50:34776 ESTABLISHED
    tcp 0 0 prometeo.geniodife.:ssh 10.26.106.181:46811 ESTABLISHED
    prometeo:~#

    I tried this command too

    iptables -I INPUT -m state --state NEW -p tcp --dport 5900:6000 -j ACCEPT

    to enable the port for VNC (from the site http://www.convirture.com/wiki/index.php?title=Convirt2_Installation) but unfortunately nothing happen
    :-(

     
  8. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    13,639
    Likes Received:
    15
    just copy the code into your own litte perl script and try to debug - I can't see what's wrong.
     
  9. SamTzu

    SamTzu Member

    Joined:
    Mar 27, 2009
    Messages:
    274
    Likes Received:
    0
    Lets see a bit more info about the open ports. Run this command...

    And also this...

    And also this...

     
    #9 SamTzu, Mar 21, 2010
    Last edited: Mar 21, 2010
  10. piero.proietti

    piero.proietti New Member

    Joined:
    Mar 12, 2010
    Messages:
    11
    Likes Received:
    0
    Thanx Sam, thanx a lot

    I just run the commands and I just solved the problem...

    The problem was... the lacks of /etc/hosts.

    I dont know why or in that way this file was deleted, everything was going well, except vncterm!

    Just put it back and everything is working perfectly.

    Really thanx a lot Tom, Dietmar, Sam.

    Piero Proietti
     
    #10 piero.proietti, Mar 22, 2010
    Last edited: Mar 22, 2010
  11. SamTzu

    SamTzu Member

    Joined:
    Mar 27, 2009
    Messages:
    274
    Likes Received:
    0
    It was my pleasure Piero.
    I try to visit this great forum when I have the time. I have found HowtoForge and this place to be the greatest fountains of IT knowledge in the NET.
     
  12. willy1009

    willy1009 Member

    Joined:
    Jul 26, 2010
    Messages:
    52
    Likes Received:
    0
    hi,

    i'm sorry i up this topic but i get the same problem. When i try to use vnc console i get this error "[2734]ERR: 24: Error in Perl code: unable to find free vnc port at /usr/share/perl5/PVE/ConfigServer.pm line 1011"

    here's the result of pveversion -v command :

    pve-manager: 1.9-26 (pve-manager/1.9/6567)
    running kernel: 2.6.32-6-pve
    proxmox-ve-2.6.32: 1.9-51
    pve-kernel-2.6.32-6-pve: 2.6.32-51
    qemu-server: 1.1-32
    pve-firmware: 1.0-14
    libpve-storage-perl: 1.0-19
    vncterm: 0.9-2
    vzctl: 3.0.29-3pve1
    vzdump: 1.2-16
    vzprocps: 2.0.11-2
    vzquota: 3.0.11-1
    pve-qemu-kvm: 0.15.0-2
    ksm-control-daemon: 1.0-6

    thanks for help
     
  13. willy1009

    willy1009 Member

    Joined:
    Jul 26, 2010
    Messages:
    52
    Likes Received:
    0
    with the command cat /etc/hosts

    Is this normal ??
     
  14. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    13,639
    Likes Received:
    15
    No (looks like the content of /etc/lvm/lvm.conf).
     

Share This Page