[GH-ISSUE #137] Broken Install Steps Centos 7 #91

Open
opened 2026-02-27 15:57:18 +03:00 by kerem · 10 comments
Owner

Originally created by @ghost on GitHub (Nov 7, 2017).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/137

Getting below errors on fresh Centos 7 64bit install (SELINUX disabled)...

[root@localhost webvirtcloud]# source venv/bin/activate
(venv)[root@localhost webvirtcloud]# venv/bin/pip install -r conf/requirements.txt
Downloading/unpacking Django==1.8.11 (from -r conf/requirements.txt (line 1))
  Downloading Django-1.8.11.tar.gz (7.3MB): 7.3MB downloaded
  Running setup.py egg_info for package Django
    
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Downloading/unpacking websockify==0.8.0 (from -r conf/requirements.txt (line 2))
  Downloading websockify-0.8.0.tar.gz (234kB): 234kB downloaded
  Running setup.py egg_info for package websockify
    
Downloading/unpacking gunicorn==19.3.0 (from -r conf/requirements.txt (line 3))
  Downloading gunicorn-19.3.0.tar.gz (395kB): 395kB downloaded
  Running setup.py egg_info for package gunicorn
    
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Downloading/unpacking libvirt-python==1.3.2 (from -r conf/requirements.txt (line 4))
  Downloading libvirt-python-1.3.2.tar.gz (171kB): 171kB downloaded
  Running setup.py egg_info for package libvirt-python
    
    file build/libvirt.py (for module libvirt) not found
    file build/libvirt_qemu.py (for module libvirt_qemu) not found
    file build/libvirt_lxc.py (for module libvirt_lxc) not found
Downloading/unpacking libxml2-python from http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz (from -r conf/requirements.txt (line 6))
  Downloading libxml2-2.9.1.tar.gz (unknown size): 4.8MB downloaded
  Running setup.py egg_info for package libxml2-python
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
    IOError: [Errno 2] No such file or directory: '/srv/webvirtcloud/venv/build/libxml2-python/setup.py'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

IOError: [Errno 2] No such file or directory: '/srv/webvirtcloud/venv/build/libxml2-python/setup.py'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /srv/webvirtcloud/venv/build/libxml2-python
Storing complete log in /root/.pip/pip.log
(venv)[root@localhost webvirtcloud]# cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d/
(venv)[root@localhost webvirtcloud]# venv/bin/python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management


[root@localhost nginx]# semanage fcontext -a -t httpd_sys_content_t "/srv/webvirtcloud(/.*)"
SELinux:  Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version.
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.30:  No such file or directory
/sbin/load_policy:  Can't load policy:  No such file or directory
libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory).
SELinux:  Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version.
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.30:  No such file or directory
/sbin/load_policy:  Can't load policy:  No such file or directory
libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory).
OSError: No such file or directory


[root@localhost nginx]# usermod -G kvm -a webvirtmgr
usermod: group 'kvm' does not exist
(venv)[root@localhost nginx]# systemctl restart nginx && systemctl restart supervisord
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
Originally created by @ghost on GitHub (Nov 7, 2017). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/137 Getting below errors on fresh Centos 7 64bit install (SELINUX disabled)... ``` [root@localhost webvirtcloud]# source venv/bin/activate (venv)[root@localhost webvirtcloud]# venv/bin/pip install -r conf/requirements.txt Downloading/unpacking Django==1.8.11 (from -r conf/requirements.txt (line 1)) Downloading Django-1.8.11.tar.gz (7.3MB): 7.3MB downloaded Running setup.py egg_info for package Django warning: no previously-included files matching '__pycache__' found under directory '*' warning: no previously-included files matching '*.py[co]' found under directory '*' Downloading/unpacking websockify==0.8.0 (from -r conf/requirements.txt (line 2)) Downloading websockify-0.8.0.tar.gz (234kB): 234kB downloaded Running setup.py egg_info for package websockify Downloading/unpacking gunicorn==19.3.0 (from -r conf/requirements.txt (line 3)) Downloading gunicorn-19.3.0.tar.gz (395kB): 395kB downloaded Running setup.py egg_info for package gunicorn warning: no previously-included files matching '__pycache__' found under directory '*' warning: no previously-included files matching '*.py[co]' found under directory '*' Downloading/unpacking libvirt-python==1.3.2 (from -r conf/requirements.txt (line 4)) Downloading libvirt-python-1.3.2.tar.gz (171kB): 171kB downloaded Running setup.py egg_info for package libvirt-python file build/libvirt.py (for module libvirt) not found file build/libvirt_qemu.py (for module libvirt_qemu) not found file build/libvirt_lxc.py (for module libvirt_lxc) not found Downloading/unpacking libxml2-python from http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz (from -r conf/requirements.txt (line 6)) Downloading libxml2-2.9.1.tar.gz (unknown size): 4.8MB downloaded Running setup.py egg_info for package libxml2-python Traceback (most recent call last): File "<string>", line 16, in <module> IOError: [Errno 2] No such file or directory: '/srv/webvirtcloud/venv/build/libxml2-python/setup.py' Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 16, in <module> IOError: [Errno 2] No such file or directory: '/srv/webvirtcloud/venv/build/libxml2-python/setup.py' ---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in /srv/webvirtcloud/venv/build/libxml2-python Storing complete log in /root/.pip/pip.log ``` ``` (venv)[root@localhost webvirtcloud]# cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d/ (venv)[root@localhost webvirtcloud]# venv/bin/python manage.py migrate Traceback (most recent call last): File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line ImportError: No module named django.core.management [root@localhost nginx]# semanage fcontext -a -t httpd_sys_content_t "/srv/webvirtcloud(/.*)" SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version. SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.30: No such file or directory /sbin/load_policy: Can't load policy: No such file or directory libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory). SELinux: Could not downgrade policy file /etc/selinux/targeted/policy/policy.30, searching for an older version. SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.30: No such file or directory /sbin/load_policy: Can't load policy: No such file or directory libsemanage.semanage_reload_policy: load_policy returned error code 2. (No such file or directory). OSError: No such file or directory [root@localhost nginx]# usermod -G kvm -a webvirtmgr usermod: group 'kvm' does not exist (venv)[root@localhost nginx]# systemctl restart nginx && systemctl restart supervisord Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. ```
Author
Owner

@ps78674 commented on GitHub (Nov 9, 2017):

  1. Update pip with command 'venv/bin/pip install --upgrade pip'.
  2. Edit 'conf/requirements.txt' as shown below:
    • change libvirt-python to version, installed in your system (yum info libvirt-python, for now it's 3.2.0);
    • uncomment libxml2-python from retspen repo / comment gnome version.

That worked for me.

Django==1.8.11
websockify==0.8.0
gunicorn==19.3.0
libvirt-python==3.2.0
http://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz
#http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz#egg=libxml2-python&subdirectory=python
<!-- gh-comment-id:343095997 --> @ps78674 commented on GitHub (Nov 9, 2017): 1. Update pip with command 'venv/bin/pip install --upgrade pip'. 2. Edit 'conf/requirements.txt' as shown below: - change libvirt-python to version, installed in your system (yum info libvirt-python, for now it's 3.2.0); - uncomment libxml2-python from retspen repo / comment gnome version. That worked for me. ``` Django==1.8.11 websockify==0.8.0 gunicorn==19.3.0 libvirt-python==3.2.0 http://github.com/retspen/retspen.github.io/raw/master/libxml2-python-2.9.1.tar.gz #http://git.gnome.org/browse/libxml2/snapshot/libxml2-2.9.1.tar.gz#egg=libxml2-python&subdirectory=python ```
Author
Owner

@letran3691 commented on GitHub (May 10, 2018):

Help me.
I am confg done, when login user admin/admin then erros in image . please fix help me. thanks.
(https://user-images.githubusercontent.com/19284401/39852142-0c1df396-5445-11e8-909c-3cfebc320b64.jpeg)

<!-- gh-comment-id:387948549 --> @letran3691 commented on GitHub (May 10, 2018): Help me. I am confg done, when login user admin/admin then erros in image . please fix help me. thanks. (https://user-images.githubusercontent.com/19284401/39852142-0c1df396-5445-11e8-909c-3cfebc320b64.jpeg)
Author
Owner

@ps78674 commented on GitHub (May 10, 2018):

You need edit file /srv/webvirtcloud/webvirtcloud/settings.py:
Change AUTHENTICATION_BACKENDS () to

AUTHENTICATION_BACKENDS (
   'django.contrib.auth.backends.ModelBackend',
)

Then restart supervisord (systemctl restart supervisord).

<!-- gh-comment-id:387983408 --> @ps78674 commented on GitHub (May 10, 2018): You need edit file ```/srv/webvirtcloud/webvirtcloud/settings.py```: Change ```AUTHENTICATION_BACKENDS ()``` to ``` AUTHENTICATION_BACKENDS ( 'django.contrib.auth.backends.ModelBackend', ) ``` Then restart supervisord (systemctl restart supervisord).
Author
Owner

@letran3691 commented on GitHub (May 25, 2018):

thanks u support.
but i see error . i have config connect tcp. but The error is as below. please help me :(
virsh -c qemu+tcp://172.x.x.x/system nodeinfo
error: failed to connect to the hypervisor
error: authentication failed: authentication failed

<!-- gh-comment-id:392083391 --> @letran3691 commented on GitHub (May 25, 2018): thanks u support. but i see error . i have config connect tcp. but The error is as below. please help me :( virsh -c qemu+tcp://172.x.x.x/system nodeinfo error: failed to connect to the hypervisor error: authentication failed: authentication failed
Author
Owner

@ps78674 commented on GitHub (May 25, 2018):

TCP auth is disabled in liblvirt by default. Try using ssh (qemu+ssh).

  1. su - nginx -s /bin/bash
  2. ssh-keygen Don't use password, just hit enter.
  3. ssh-copy-id root@172.x.x.x
  4. virsh -c qemu+ssh://root@172.x.x.x/system nodeinfo
<!-- gh-comment-id:392085322 --> @ps78674 commented on GitHub (May 25, 2018): TCP auth is disabled in liblvirt by default. Try using ssh (qemu+ssh). 1. `su - nginx -s /bin/bash` 2. `ssh-keygen` Don't use password, just hit enter. 3. `ssh-copy-id root@172.x.x.x` 4. `virsh -c qemu+ssh://root@172.x.x.x/system nodeinfo`
Author
Owner

@letran3691 commented on GitHub (May 26, 2018):

if use qume+ssh it's work ok. but i want use tcp. how to connect with tcp . i is already enable auth_tcp = "sasl" and add user with saslpasswd2. i try connect tcp but still error :(

<!-- gh-comment-id:392235006 --> @letran3691 commented on GitHub (May 26, 2018): if use qume+ssh it's work ok. but i want use tcp. how to connect with tcp . i is already enable auth_tcp = "sasl" and add user with saslpasswd2. i try connect tcp but still error :(
Author
Owner

@ps78674 commented on GitHub (May 29, 2018):

You need to uncomment LIBVIRTD_ARGS="--listen" in /etc/sysconfig/libvirtd and restart libvirtd.

<!-- gh-comment-id:392694521 --> @ps78674 commented on GitHub (May 29, 2018): You need to uncomment `LIBVIRTD_ARGS="--listen"` in `/etc/sysconfig/libvirtd` and restart libvirtd.
Author
Owner

@letran3691 commented on GitHub (May 30, 2018):

thanks is already support. i fix done. because libvirtd not allow connect qemu+tcp with "sasl" Unencrypted. Must install DigestMD5 and sasl-gssapi on host kvm and webvirt.
thanks you very much

<!-- gh-comment-id:393013353 --> @letran3691 commented on GitHub (May 30, 2018): thanks is already support. i fix done. because libvirtd not allow connect qemu+tcp with "sasl" Unencrypted. Must install DigestMD5 and sasl-gssapi on host kvm and webvirt. thanks you very much
Author
Owner

@retspen commented on GitHub (May 30, 2018):

sudo yum install cyrus-sasl-md5
sudo systemctl restart libvirtd
virsh -c qemu+tcp://localhost/system
<!-- gh-comment-id:393084988 --> @retspen commented on GitHub (May 30, 2018): ```bash sudo yum install cyrus-sasl-md5 sudo systemctl restart libvirtd virsh -c qemu+tcp://localhost/system ```
Author
Owner

@letran3691 commented on GitHub (May 31, 2018):

Hi Sir
when I console vnc erros in image
(https://user-images.githubusercontent.com/19284401/40769260-b8e0fa0e-64e1-11e8-9728-42f51aec74cb.png)
I have check supervisorctl novncd still running
supervisorctl status
novncd RUNNING pid 1400, uptime 1 day, 2:50:56
webvirtcloud RUNNING pid 1399, uptime 1 day, 2:50:56
Please help me! :(

<!-- gh-comment-id:393452713 --> @letran3691 commented on GitHub (May 31, 2018): Hi Sir when I console vnc erros in image (https://user-images.githubusercontent.com/19284401/40769260-b8e0fa0e-64e1-11e8-9728-42f51aec74cb.png) I have check supervisorctl novncd still running supervisorctl status novncd RUNNING pid 1400, uptime 1 day, 2:50:56 webvirtcloud RUNNING pid 1399, uptime 1 day, 2:50:56 Please help me! :(
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#91
No description provided.