[GH-ISSUE #244] Something wrong in the install documentation? #192

Closed
opened 2026-02-27 16:38:20 +03:00 by kerem · 9 comments
Owner

Originally created by @thibaudsowa on GitHub (Feb 22, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/244

I followed the installation guide (from https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr) on a fully new Ubuntu 12.04 but when I ran the following command (in the fourth section) :

sudo cp /var/www/webvirtmgr/conf/initd/webvirtmgr-novnc-ubuntu /etc/init.d/webvirtmgr-novnc

An error occured: the webvirtmgr-novnc-ubuntu folder didn't exist.
In fact when I list the content of the /var/www/webvirtmgr/ folder this is what I see :

thibaudsowa@nuc:/var/www/webvirtmgr$ ll
total 40
drwxrwxr-x  2 www-data www-data 4096 févr. 18 22:28 ./
drwxr-xr-x 18 www-data www-data 4096 févr. 18 22:29 ../
-rw-rw-r--  1 www-data www-data    0 févr. 18 22:27 __init__.py
-rw-rw-r--  1 www-data www-data  138 févr. 18 22:28 __init__.pyc
-rw-rw-r--  1 www-data www-data 5540 févr. 18 22:27 settings_jenkins.py
-rw-rw-r--  1 www-data www-data 5073 févr. 18 22:27 settings.py
-rw-rw-r--  1 www-data www-data 3368 févr. 18 22:28 settings.pyc
-rw-rw-r--  1 www-data www-data 1798 févr. 18 22:27 urls.py
-rw-rw-r--  1 www-data www-data 1431 févr. 18 22:27 wsgi.py

Does the error come from the third section (Setup Nginx)?

$ cd ..
$ sudo mv webvirtmgr /var/www/

I'm not at all an Nginx expert...
Thanks for help!

Originally created by @thibaudsowa on GitHub (Feb 22, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/244 I followed the installation guide (from https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr) on a fully new Ubuntu 12.04 but when I ran the following command (in the fourth section) : ``` sudo cp /var/www/webvirtmgr/conf/initd/webvirtmgr-novnc-ubuntu /etc/init.d/webvirtmgr-novnc ``` An error occured: the `webvirtmgr-novnc-ubuntu` folder didn't exist. In fact when I list the content of the `/var/www/webvirtmgr/` folder this is what I see : ``` thibaudsowa@nuc:/var/www/webvirtmgr$ ll total 40 drwxrwxr-x 2 www-data www-data 4096 févr. 18 22:28 ./ drwxr-xr-x 18 www-data www-data 4096 févr. 18 22:29 ../ -rw-rw-r-- 1 www-data www-data 0 févr. 18 22:27 __init__.py -rw-rw-r-- 1 www-data www-data 138 févr. 18 22:28 __init__.pyc -rw-rw-r-- 1 www-data www-data 5540 févr. 18 22:27 settings_jenkins.py -rw-rw-r-- 1 www-data www-data 5073 févr. 18 22:27 settings.py -rw-rw-r-- 1 www-data www-data 3368 févr. 18 22:28 settings.pyc -rw-rw-r-- 1 www-data www-data 1798 févr. 18 22:27 urls.py -rw-rw-r-- 1 www-data www-data 1431 févr. 18 22:27 wsgi.py ``` Does the error come from the third section (Setup Nginx)? ``` $ cd .. $ sudo mv webvirtmgr /var/www/ ``` I'm not at all an Nginx expert... Thanks for help!
kerem closed this issue 2026-02-27 16:38:20 +03:00
Author
Owner

@AlexH-HankIT commented on GitHub (Feb 23, 2014):

I run into the same error, delete everything in /var/www, download the files again and use the following command to move the files correctly:
sudo mv webvirtmgr /var/www/webvirtmgr

<!-- gh-comment-id:35822678 --> @AlexH-HankIT commented on GitHub (Feb 23, 2014): I run into the same error, delete everything in /var/www, download the files again and use the following command to move the files correctly: sudo mv webvirtmgr /var/www/webvirtmgr
Author
Owner

@thibaudsowa commented on GitHub (Feb 23, 2014):

Thanks!
So now I can follow next steps, but when I want to connect on the web interface I have an 500 Internal Server Error...

This is what output in my console:

[23/Feb/2014 12:31:27] "GET / HTTP/1.0" 302 0
[23/Feb/2014 12:31:27] "GET /login HTTP/1.0" 301 0
[23/Feb/2014 12:31:27] "GET /login/ HTTP/1.0" 500 1827
[23/Feb/2014 12:31:27] "GET /static/css/webvirtmgr.css HTTP/1.0" 304 0
[23/Feb/2014 12:31:27] "GET /static/css/bootstrap.min.css HTTP/1.0" 304 0
[23/Feb/2014 12:31:27] "GET /static/js/bootstrap.min.js HTTP/1.0" 304 0
[23/Feb/2014 12:31:27] "GET /static/js/jquery-1.10.2.js HTTP/1.0" 304 0
[23/Feb/2014 12:31:27] "GET /static/img/favicon.ico HTTP/1.0" 304 0

And in the /var/log/nginx/error.log:

2014/02/23 10:25:25 [error] 15763#0: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.12, server: nuc.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "nuc.local"
2014/02/23 10:25:26 [error] 15763#0: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.12, server: nuc.local, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "nuc.local"
<!-- gh-comment-id:35828779 --> @thibaudsowa commented on GitHub (Feb 23, 2014): Thanks! So now I can follow next steps, but when I want to connect on the web interface I have an 500 Internal Server Error... This is what output in my console: ``` [23/Feb/2014 12:31:27] "GET / HTTP/1.0" 302 0 [23/Feb/2014 12:31:27] "GET /login HTTP/1.0" 301 0 [23/Feb/2014 12:31:27] "GET /login/ HTTP/1.0" 500 1827 [23/Feb/2014 12:31:27] "GET /static/css/webvirtmgr.css HTTP/1.0" 304 0 [23/Feb/2014 12:31:27] "GET /static/css/bootstrap.min.css HTTP/1.0" 304 0 [23/Feb/2014 12:31:27] "GET /static/js/bootstrap.min.js HTTP/1.0" 304 0 [23/Feb/2014 12:31:27] "GET /static/js/jquery-1.10.2.js HTTP/1.0" 304 0 [23/Feb/2014 12:31:27] "GET /static/img/favicon.ico HTTP/1.0" 304 0 ``` And in the `/var/log/nginx/error.log`: ``` 2014/02/23 10:25:25 [error] 15763#0: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.12, server: nuc.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "nuc.local" 2014/02/23 10:25:26 [error] 15763#0: *9 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.12, server: nuc.local, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "nuc.local" ```
Author
Owner

@retspen commented on GitHub (Feb 23, 2014):

$ ls -la /var/www/webvirtmgr

<!-- gh-comment-id:35829001 --> @retspen commented on GitHub (Feb 23, 2014): <code>$ ls -la /var/www/webvirtmgr</code>
Author
Owner

@thibaudsowa commented on GitHub (Feb 23, 2014):

The output:

thibaudsowa@nuc:/var/log/nginx$ ls -la /var/www/webvirtmgr
total 136
drwxr-xr-x 18 www-data www-data  4096 févr. 23 10:28 .
drwxr-xr-x  5 www-data www-data  4096 févr. 23 11:34 ..
drwxr-xr-x  5 www-data www-data  4096 févr. 23 10:27 conf
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 console
drwxr-xr-x  3 www-data www-data  4096 févr. 23 10:27 create
-rw-r--r--  1 www-data www-data    79 févr. 23 10:27 dev-requirements.txt
drwxr-xr-x  8 www-data www-data  4096 févr. 23 10:31 .git
-rw-r--r--  1 www-data www-data    71 févr. 23 10:27 .gitignore
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 hostdetail
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 images
drwxr-xr-x  3 www-data www-data  4096 févr. 23 10:27 instance
drwxr-xr-x  4 www-data www-data  4096 févr. 23 10:27 locale
-rwxr-xr-x  1 www-data www-data   253 févr. 23 10:27 manage.py
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 networks
-rw-r--r--  1 www-data www-data  1405 févr. 23 10:27 README.md
-rw-r--r--  1 www-data www-data    28 févr. 23 10:27 requirements.txt
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 serverlog
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 servers
drwxr-xr-x  6 www-data www-data  4096 févr. 23 10:27 static
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 storages
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 templates
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 vrtManager
drwxr-xr-x  2 www-data www-data  4096 févr. 23 10:27 webvirtmgr
-rw-r--r--  1 www-data www-data 38912 févr. 23 10:28 webvirtmgr.sqlite3
<!-- gh-comment-id:35829029 --> @thibaudsowa commented on GitHub (Feb 23, 2014): The output: ``` thibaudsowa@nuc:/var/log/nginx$ ls -la /var/www/webvirtmgr total 136 drwxr-xr-x 18 www-data www-data 4096 févr. 23 10:28 . drwxr-xr-x 5 www-data www-data 4096 févr. 23 11:34 .. drwxr-xr-x 5 www-data www-data 4096 févr. 23 10:27 conf drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 console drwxr-xr-x 3 www-data www-data 4096 févr. 23 10:27 create -rw-r--r-- 1 www-data www-data 79 févr. 23 10:27 dev-requirements.txt drwxr-xr-x 8 www-data www-data 4096 févr. 23 10:31 .git -rw-r--r-- 1 www-data www-data 71 févr. 23 10:27 .gitignore drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 hostdetail drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 images drwxr-xr-x 3 www-data www-data 4096 févr. 23 10:27 instance drwxr-xr-x 4 www-data www-data 4096 févr. 23 10:27 locale -rwxr-xr-x 1 www-data www-data 253 févr. 23 10:27 manage.py drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 networks -rw-r--r-- 1 www-data www-data 1405 févr. 23 10:27 README.md -rw-r--r-- 1 www-data www-data 28 févr. 23 10:27 requirements.txt drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 serverlog drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 servers drwxr-xr-x 6 www-data www-data 4096 févr. 23 10:27 static drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 storages drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 templates drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 vrtManager drwxr-xr-x 2 www-data www-data 4096 févr. 23 10:27 webvirtmgr -rw-r--r-- 1 www-data www-data 38912 févr. 23 10:28 webvirtmgr.sqlite3 ```
Author
Owner

@retspen commented on GitHub (Feb 23, 2014):

Change in file settings.py: DEBUG=False to DEBUG=True

$ sudo service supervisor stop
$ cd /var/www/webvirtmgr
$ ./manage.py runserver 0:8000

Open browser and input IP:8000 where run panel.

<!-- gh-comment-id:35829163 --> @retspen commented on GitHub (Feb 23, 2014): Change in file settings.py: DEBUG=False to DEBUG=True <code>$ sudo service supervisor stop</code> <code>$ cd /var/www/webvirtmgr</code> <code>$ ./manage.py runserver 0:8000</code> Open browser and input IP:8000 where run panel.
Author
Owner

@thibaudsowa commented on GitHub (Feb 23, 2014):

Ok so there is a problem with the database...

DatabaseError at /login/
attempt to write a readonly database
Request Method: GET
Request URL:    http://nuc.local:8000/login/
Django Version: 1.5.5
Exception Type: DatabaseError
Exception Value:    
attempt to write a readonly database
Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py in execute, line 362
Python Executable:  /usr/bin/python
Python Version: 2.7.3
Python Path:    
['/var/www/webvirtmgr',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
 '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
Server time:    Sun, 23 Feb 2014 13:12:09 +0200
<!-- gh-comment-id:35829365 --> @thibaudsowa commented on GitHub (Feb 23, 2014): Ok so there is a problem with the database... ``` DatabaseError at /login/ attempt to write a readonly database Request Method: GET Request URL: http://nuc.local:8000/login/ Django Version: 1.5.5 Exception Type: DatabaseError Exception Value: attempt to write a readonly database Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py in execute, line 362 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/var/www/webvirtmgr', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol'] Server time: Sun, 23 Feb 2014 13:12:09 +0200 ```
Author
Owner

@thibaudsowa commented on GitHub (Feb 23, 2014):

Hmmm... ok so with that:

sudo chmod 777 /var/www/webvirtmgr/webvirtmgr.sqlite3
sudo chmod 777 /var/www/webvirtmgr

....it works!
It is just a right problem.

So I think that the www-data user is not used to launch the website.
How can I fix this without the chmod 777 trick?

<!-- gh-comment-id:35830151 --> @thibaudsowa commented on GitHub (Feb 23, 2014): Hmmm... ok so with that: ``` sudo chmod 777 /var/www/webvirtmgr/webvirtmgr.sqlite3 sudo chmod 777 /var/www/webvirtmgr ``` ....it works! It is just a right problem. So I think that the www-data user is not used to launch the website. How can I fix this without the `chmod 777` trick?
Author
Owner

@AlexH-HankIT commented on GitHub (Feb 23, 2014):

My database has 644, are you sure that the nginx user is the owner of the whole /var/www/webvirtmgr folder?
Use the following command again:

chown -R www-data:www-data /var/www/webvirtmgr

and change the permissions to 644.

<!-- gh-comment-id:35830194 --> @AlexH-HankIT commented on GitHub (Feb 23, 2014): My database has 644, are you sure that the nginx user is the owner of the whole /var/www/webvirtmgr folder? Use the following command again: <pre>chown -R www-data:www-data /var/www/webvirtmgr</pre> and change the permissions to 644.
Author
Owner

@retspen commented on GitHub (Feb 23, 2014):

And need check parameter user=www-data in file /etc/supervisor.d/webvirtmgr.conf

<!-- gh-comment-id:35830272 --> @retspen commented on GitHub (Feb 23, 2014): And need check parameter user=www-data in file /etc/supervisor.d/webvirtmgr.conf
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/webvirtmgr#192
No description provided.