mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-26 08:05:54 +03:00
[GH-ISSUE #645] Can't Log Into Web Gui #492
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Sep 5, 2017).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/645
Just installed on Centos 7.
http://xxx.xxx.47.18:8000/
Page not found
`[root@localhost www]# ./manage.py runserver 0:8000
WARNING:root:No local_settings file found.
WARNING:root:No local_settings file found.
Validating models...
0 errors found
September 05, 2017 - 19:38:17
Django version 1.5.5, using settings 'webvirtmgr.settings'
Development server is running at http://0:8000/
Quit the server with CONTROL-C.`
Also a heads up:
[root@localhost www]# yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Loaded plugins: fastestmirror Cannot open: http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm. Skipping. Error: Nothing to do@ghost commented on GitHub (Sep 20, 2017):
I would appreciate help on this, thanks.
@ghost commented on GitHub (Oct 10, 2017):
Is this project dead?
@rightkick commented on GitHub (Oct 11, 2017):
You should be able to install on Centos 7 without issues. The site has all
info. Apart from the errors mentioned, what do you receive when you try to
acess with browser? I might be able to provide tomorrow steps I follow.
Alex
On Sep 5, 2017 19:44, "Chad Abizeid" notifications@github.com wrote:
@rightkick commented on GitHub (Oct 12, 2017):
Steps for Centos7:
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
./manage.py collectstatic
Create User
./manage.py createsuperuser
username: someuser
passwd: yourpass
Change user password
python
manage.py changepassword
Configure nginx
mkdir /var/www/
cp -r /usr/src/webvirtmgr /var/www/
nano /etc/nginx/conf.d/webvirtmgr.conf
server {
listen 80 default_server;
server_name $hostname;
#access_log /var/log/nginx/webvirtmgr_access_log;
location /static/ {
root /var/www/webvirtmgr/webvirtmgr; # or /srv instead of /var
expires max;
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
client_max_body_size 1024M; # Set higher depending on your needs
}
}
comment our the server part from /etc/nginx/nginx.conf
systemctl restart nginx
Enable services at startup:
systemctl enable supervisord
systemctl enable nginx
Setup supervisor:
chown -R nginx:nginx /var/www/webvirtmgr
Create file
/etc/supervisord.d/webvirtmgr.ini as following:
[program:webvirtmgr]
command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c
/var/www/webvirtmgr/conf/gunicorn.conf.py
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true
user=nginx
[program:webvirtmgr-console]
command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console
directory=/var/www/webvirtmgr
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/webvirtmgr-console.log
redirect_stderr=true
user=nginx
service supervisord stop
service supervisord start
usermod -a -G libvirt nginx
systemctl restart libvirtd
Alex
On Wed, Oct 11, 2017 at 8:20 PM, Alex K rightkicktech@gmail.com wrote:
@ghost commented on GitHub (Oct 16, 2017):
Thanks. So far getting these errors already...
@rightkick commented on GitHub (Oct 16, 2017):
On Oct 16, 2017 22:21, "Chad Abizeid" notifications@github.com wrote:
Thanks. So far getting these errors already...
`Installed:
git.x86_64 0:1.8.3.1-12.el7_4
Dependency Installed:
libgnome-keyring.x86_64 0:3.12.0-1.el7 perl.x86_64 4:5.16.3-292.el7
perl-Carp.noarch 0:1.26-244.el7 perl-Encode.x86_64 0:2.51-7.el7
perl-Error.noarch 1:0.17020-2.el7 perl-Exporter.noarch 0:5.68-3.el7
perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7
perl-Filter.x86_64 0:1.49-3.el7 perl-Getopt-Long.noarch 0:2.40-2.el7
perl-Git.noarch 0:1.8.3.1-12.el7_4 perl-HTTP-Tiny.noarch 0:0.033-3.el7
perl-PathTools.x86_64 0:3.40-5.el7 perl-Pod-Escapes.noarch 1:1.04-292.el7
perl-Pod-Perldoc.noarch 0:3.20-4.el7 perl-Pod-Simple.noarch 1:3.28-4.el7
perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64
0:1.27-248.el7 perl-Socket.x86_64 0:2.010-4.el7 perl-Storable.x86_64
0:2.45-3.el7
perl-TermReadKey.x86_64 0:2.30-20.el7 perl-Text-ParseWords.noarch
0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch
0:1.2300-2.el7
perl-constant.noarch 0:1.27-2.el7 perl-libs.x86_64 4:5.16.3-292.el7
perl-macros.x86_64 4:5.16.3-292.el7 perl-parent.noarch 1:0.225-244.el7
perl-podlators.noarch 0:2.5.1-3.el7 perl-threads.x86_64 0:1.87-4.el7
perl-threads-shared.x86_64 0:1.43-6.el7 rsync.x86_64 0:3.0.9-18.el7
Complete!
[root@localhost ~]# cd webvirtmgr
-bash: cd: webvirtmgr: No such file or directory
[root@localhost ~]# `
This is saying that the directory webvirtmgr does not exist. Did you got
clone first? Did you follow all the steps one by one?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337005043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOedfMKfqk0say8iyieSbvAsFR7owhSRks5ss6zIgaJpZM4PNORu
.
@ghost commented on GitHub (Oct 17, 2017):
Ok tried again, now this:
@rightkick commented on GitHub (Oct 17, 2017):
Please follow all steps carefully.
You are receiving simple errors that show you where the issue is.
You need few linux commands knowledge in order to complete the steps.
cp: cannot stat ‘/usr/src/webvirtmgr’: No such file or directory
indicates that /usr/src/webvirtmgr does not exist.
On Tue, Oct 17, 2017 at 6:17 PM, Chad Abizeid notifications@github.com
wrote:
@ghost commented on GitHub (Oct 17, 2017):
I did follow steps correctly, but that directory does not exist. What command do you think I missed here?
@ghost commented on GitHub (Oct 17, 2017):
@rightkick commented on GitHub (Oct 17, 2017):
The last command is showing you are running a second time manage.py, and
this time without ./. Why? Is this in the steps provided? You either run it
as ./manage.py or as python manage.py
Please check the steps carefully again. Some lines may have been moved
during copy-paste on newines and perhaps are confusing you but it should be
easy to understand the correct commands to run.
On Oct 17, 2017 21:44, "Chad Abizeid" notifications@github.com wrote:
[root@localhost ~]# pip install --upgrade pip
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 511kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Successfully uninstalled pip-8.1.2
Successfully installed pip-9.0.1
[root@localhost ~]# cd webvirtmgr
[root@localhost webvirtmgr]# pip install -r requirements.txt
Requirement already satisfied: django==1.5.5 in
/usr/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: gunicorn==18.0 in
/usr/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied: lockfile>=0.9 in
/usr/lib/python2.7/site-packages (from -r requirements.txt (line 5))
[root@localhost webvirtmgr]# ./manage.py syncdb
WARNING:root:No local_settings file found.
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 6 object(s) from 1 fixture(s)
[root@localhost webvirtmgr]# ./manage.py collectstatic
WARNING:root:No local_settings file found.
You have requested to collect static files at the destination
location as specified in your settings.
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
0 static files copied, 75 unmodified.
[root@localhost webvirtmgr]# ./manage.py createsuperuser
WARNING:root:No local_settings file found.
Username: chadzeid
Email address: none@none.com
Password:
Password (again):
Superuser created successfully.
[root@localhost webvirtmgr]# manage.py changepassword chadzeid
-bash: manage.py: command not found
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/retspen/webvirtmgr/issues/645#issuecomment-337327758,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOedfBgef2j7OzHFoIT2D8v6pePLULTjks5stPQ-gaJpZM4PNORu
.
@ghost commented on GitHub (Oct 17, 2017):
Hello,
I just noticed that line was broken in 2 lines, yes. Ran it fine, but still hanging up the cp -r portion.
@rightkick commented on GitHub (Oct 17, 2017):
Can you give all command that you run from start?
On Oct 17, 2017 22:12, "Chad Abizeid" notifications@github.com wrote:
@ghost commented on GitHub (Oct 23, 2017):
Here you go, it get's stuck on the last line "cp -r..."
No errors on previous commands ran.
@ghost commented on GitHub (Oct 23, 2017):
Instructions are not working fully on Centos 7....
https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
I followed through every step carefully, no errors. But, still cannot access web GUI.
@rightkick commented on GitHub (Oct 23, 2017):
The issue is that my instructions assume that you git clone inside /usr/src.
I might be able to compile a doc with some more general instructions if
this helps.
On Oct 23, 2017 8:37 PM, "Chad Abizeid" notifications@github.com wrote:
@rightkick commented on GitHub (Oct 23, 2017):
For a quick check I would suggest to start with:
cd /usr/src
... then all other provided commands.
In case you already have any webvirtmgr folder at /var/www remove it to
start clean.
On Oct 23, 2017 11:40 PM, "Alex K" rightkicktech@gmail.com wrote:
@ghost commented on GitHub (Oct 24, 2017):
Ok, did you're steps again...
Now, I'm stuck on this?
Steps followed...
@rightkick commented on GitHub (Oct 24, 2017):
Im not sure about the errors you are receiving now. Also I have not tested
the steps with selinux enabled. If you start clean and with disabled
selinux do you still receive errors?
On Oct 24, 2017 3:46 AM, "Chad Abizeid" notifications@github.com wrote:
Ok, did you're steps again...
Now, I'm stuck on this?
[root@localhost webvirtmgr]# cd /var/www/webvirtmgr
[root@localhost webvirtmgr]# git pull
Already up-to-date.
[root@localhost webvirtmgr]# ./manage.py collectstatic
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/init.py",
line 453, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/init.py",
line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/init.py",
line 263, in fetch_command
app_name = get_commands()[subcommand]
File "/usr/lib/python2.7/site-packages/django/core/management/init.py",
line 109, in get_commands
apps = settings.INSTALLED_APPS
File "/usr/lib/python2.7/site-packages/django/conf/init.py",
line 53, in getattr
self._setup(name)
File "/usr/lib/python2.7/site-packages/django/conf/init.py",
line 48, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.7/site-packages/django/conf/init.py",
line 134, in init
raise ImportError("Could not import settings '%s' (Is it on
sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'webvirtmgr.settings' (Is it on
sys.path?): No module named webvirtmgr.settings
Steps followed...
cd /usr/src
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt
./manage.py syncdb
./manage.py collectstatic
./manage.py createsuperuser
python manage.py changepassword chadzeid
mv webvirtmgr /var/www/
nano /etc/nginx/conf.d/webvirtmgr.conf
nano /etc/nginx/nginx.conf
service nginx restart
/usr/sbin/setsebool httpd_can_network_connect true
chkconfig supervisord on
chown -R nginx:nginx /var/www/webvirtmgr
nano /etc/supervisord.d/webvirtmgr.ini
service supervisord stop
service supervisord start
cd /var/www/webvirtmgr
git pull
./manage.py collectstatic
service supervisord restart
./manage.py runserver xxx.xxx.xxx.130:8000
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/retspen/webvirtmgr/issues/645#issuecomment-338837463,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOedfP7F1n7FODQnsSfYoWk_bqNb-R9-ks5svTNhgaJpZM4PNORu
.
@ghost commented on GitHub (Oct 24, 2017):
I simply followed the documentation.
https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
@ghost commented on GitHub (Oct 26, 2017):
Can't believe how frustrating this has been to get this working. Virtually impossible.
Reinstalled Centos 7 fresh
Followed below steps:
Got the same error:
@rightkick commented on GitHub (Oct 28, 2017):
SKIPPED THIS ONE AS YOU INSTRUCTED: /usr/sbin/setsebool
httpd_can_network_connect true
Ok, but did you disable selinux?
On Thu, Oct 26, 2017 at 10:37 PM, Chad Abizeid notifications@github.com
wrote:
@ghost commented on GitHub (Oct 30, 2017):
I disabled it after I ran the commands actually, but rebooted and same error. Now, I reloaded Centos 7 and disabled it first before running the steps below after disabling SELINUX.
I did notice this warning on a few commands...
Now look where the problem is, missing files. Unbelievable. No errors on all previous commands except missing files on 3rd last command.
@ghost commented on GitHub (Oct 30, 2017):
I think the issue is this in your documentation...
Hence why the files end up in /var/www/ instead of /var/www/webvirtmgr
Now I ran that collectstatic command again, but in /var/www and no errors. However, still no GUI access.
I moved the files from /var/www to /var/www/webvirtmgr and re-ran the last few commands. Then, ended up once again with the previous error. Documentation is all screwed up at this point. Never had such a difficult time installing any script like this.
@rightkick commented on GitHub (Oct 31, 2017):
I will try to reproduce this.
I have been setting this up many times without issues. There were few times
which the GUI simply was not working but repeating the steps usually
resolved the issue.
On Oct 30, 2017 20:20, "Chad Abizeid" notifications@github.com wrote:
@ghost commented on GitHub (Oct 31, 2017):
I literally started install oVirt on the same box and somehow, that fixed the web GUI access.
I added a new "connection". Went to infrastructure area and see this:
I also tried adding new "local socket" connection, this time green but still getting an error.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory@rightkick commented on GitHub (Oct 31, 2017):
For remote connections I do it with ssh, configuring keys. For the local
socket issue, is libvirtd started?
On Oct 31, 2017 18:35, "Chad Abizeid" notifications@github.com wrote:
I literally started install oVirt on the same box and somehow, that fixed
the web GUI access.
I added a new "connection". Went to infrastructure area and see this:
" unable to connect to server at 'xxx.xxx.xxx.130:16509': Connection refused"
I also tried adding new "local socket" connection, this time green but
still getting an error.
Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file
or directory
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/retspen/webvirtmgr/issues/645#issuecomment-340821908,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOedfFSQXvfdGIXBCBbYu1x-nQPS4fiMks5sx0xHgaJpZM4PNORu
.
@ghost commented on GitHub (Nov 1, 2017):
Output...
So I ran:
yum install libvirt libvirt-python libvirt-client -yNew error now...
authentication unavailable: no polkit agent available to authenticate action org.libvirt.unix.manage@rightkick commented on GitHub (Nov 4, 2017):
I recommend to install KVM with the following;
yum groupinstall -y "Virtualization Host"
yum groupinstall -y "Virtualization Platform"
You may need also the following:
yum -y install @virt* dejavu-lgc-* xorg-x11-xauth tigervnc libguestfs-tools
policycoreutils-python bridge-utils
In regards to the Webvirt installation the same steps apply and have been
tested once again to install without issues... I am attaching a doc in case
this is more easy for you (changed the mv step to cp -r as it is easy to
mishandle the mv command).
On Wed, Nov 1, 2017 at 2:38 PM, Chad Abizeid notifications@github.com
wrote:
@ghost commented on GitHub (Nov 4, 2017):
Thanks, but nothing is attached?
@ghost commented on GitHub (Nov 6, 2017):
Hello, please follow up when you can. Thank you.
@rightkick commented on GitHub (Nov 7, 2017):
I was replying with email on this and the attachment might have been stripped.
I am putting again the steps for a clean CentOS7 further down, this time formatted. It is assumed that selinux is disabled.
Needless to say that you need libvirt installed. In case not installed install it as below:
Caution: the steps assume that you do not have any nginx configuration in place, as it will overwrite it.
Attached also the script. You can rename it as webvirt-install.sh and make it executable to run it.
webvirt-install.txt
@rightkick commented on GitHub (Nov 8, 2017):
In case this worked, you may close also #637
@rightkick commented on GitHub (Nov 11, 2017):
Any luck with this?
Show some community spirit and let us know. Other users might be interested
also...
On Nov 7, 2017 00:07, "Chad Abizeid" notifications@github.com wrote: