[GH-ISSUE #265] no access to webVirtMgr #212

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

Originally created by @Knut770 on GitHub (Mar 19, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/265

Hi to all,
I am new in Centos and Nginx but familiar with debian and apache, so might be the problems are basic...

I can access whe I start the debug modet with $ ./manage.py runserver 0:8000

but not when I start with service webvirtmgr-novnc restart

the /webvirtmgr.conf:
server {
listen 80;

server_name server2.myserver.de;
access_log /var/log/nginx/webvirtmgr_access_log;
/etc/nginx/conf.d/webvirtmgr.conf

location / {
proxy_pass http://127.0.0.1:8222;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $remote_addr;
}
}

Originally created by @Knut770 on GitHub (Mar 19, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/265 Hi to all, I am new in Centos and Nginx but familiar with debian and apache, so might be the problems are basic... I can access whe I start the debug modet with $ ./manage.py runserver 0:8000 but not when I start with service webvirtmgr-novnc restart the /webvirtmgr.conf: server { listen 80; ``` server_name server2.myserver.de; access_log /var/log/nginx/webvirtmgr_access_log; /etc/nginx/conf.d/webvirtmgr.conf ``` location / { proxy_pass http://127.0.0.1:8222; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $remote_addr; } }
kerem closed this issue 2026-02-27 16:38:26 +03:00
Author
Owner

@Knut770 commented on GitHub (Mar 19, 2014):

sorry "proxy_pass http://127.0.0.1:8222;" just tried another port
but it was proxy_pass http://127.0.0.1:8000:

<!-- gh-comment-id:38037411 --> @Knut770 commented on GitHub (Mar 19, 2014): sorry "proxy_pass http://127.0.0.1:8222;" just tried another port but it was proxy_pass http://127.0.0.1:8000:
Author
Owner

@retspen commented on GitHub (Mar 19, 2014):

$ ps axf | grep supervisor

<!-- gh-comment-id:38053390 --> @retspen commented on GitHub (Mar 19, 2014): $ ps axf | grep supervisor
Author
Owner

@Knut770 commented on GitHub (Mar 19, 2014):

ps axf | grep supervisor
7963 pts/0 S+ 0:00 _ grep supervisor
4660 ? Ss 0:01 /usr/bin/python /usr/bin/supervisord

<!-- gh-comment-id:38057340 --> @Knut770 commented on GitHub (Mar 19, 2014): ps axf | grep supervisor 7963 pts/0 S+ 0:00 _ grep supervisor 4660 ? Ss 0:01 /usr/bin/python /usr/bin/supervisord
Author
Owner

@retspen commented on GitHub (Mar 19, 2014):

$ sudo service supervisord restart

<!-- gh-comment-id:38057453 --> @retspen commented on GitHub (Mar 19, 2014): $ sudo service supervisord restart
Author
Owner

@Knut770 commented on GitHub (Mar 19, 2014):

sudo service supervisord restart
Stopping supervisord: [ OK ]
Starting supervisord: [ OK ]

<!-- gh-comment-id:38059063 --> @Knut770 commented on GitHub (Mar 19, 2014): sudo service supervisord restart Stopping supervisord: [ OK ] Starting supervisord: [ OK ]
Author
Owner

@retspen commented on GitHub (Mar 19, 2014):

$ ps axf | grep supervisor

<!-- gh-comment-id:38060474 --> @retspen commented on GitHub (Mar 19, 2014): $ ps axf | grep supervisor
Author
Owner

@Knut770 commented on GitHub (Mar 19, 2014):

ps axf | grep supervisor
8615 pts/3 S+ 0:00 _ grep supervisor
8098 ? Ss 0:00 /usr/bin/python /usr/bin/supervisord

<!-- gh-comment-id:38064350 --> @Knut770 commented on GitHub (Mar 19, 2014): ps axf | grep supervisor 8615 pts/3 S+ 0:00 _ grep supervisor 8098 ? Ss 0:00 /usr/bin/python /usr/bin/supervisord
Author
Owner

@retspen commented on GitHub (Mar 19, 2014):

Did you add some lines to /etc/supervisord.conf from instruction ?

<!-- gh-comment-id:38064553 --> @retspen commented on GitHub (Mar 19, 2014): Did you add some lines to /etc/supervisord.conf from instruction ?
Author
Owner

@Knut770 commented on GitHub (Mar 19, 2014):

:-( sorry I forgot this ,
correction: but is not working - i was on the debug interface ..

<!-- gh-comment-id:38066292 --> @Knut770 commented on GitHub (Mar 19, 2014): :-( sorry I forgot this , correction: but is not working - i was on the debug interface ..
Author
Owner

@serverchief commented on GitHub (Apr 30, 2014):

hey, also stuck here.. on centos with nginx, if i start the nginx - it takes me to default nginx index page.

However, if i start it with ./manage.py runserver 0:8000. Then i can connect to the UI.

How can this be fixed? I followed the instruction from the beginning to the end. I did notice that i need to run
chown -R nginx.nginx /var/www

for web
PS: i do speak russian, so if its easier to respond in russian, please do so.

Thanks

<!-- gh-comment-id:41757284 --> @serverchief commented on GitHub (Apr 30, 2014): hey, also stuck here.. on centos with nginx, if i start the nginx - it takes me to default nginx index page. However, if i start it with ./manage.py runserver 0:8000. Then i can connect to the UI. How can this be fixed? I followed the instruction from the beginning to the end. I did notice that i need to run chown -R nginx.nginx /var/www for web PS: i do speak russian, so if its easier to respond in russian, please do so. Thanks
Author
Owner

@serverchief commented on GitHub (Apr 30, 2014):

I did a little more digging.

If i change in /var/www/webvirtmgr/conf/gunicorn.conf.py

#bind = '127.0.0.1:8000'
bind = '0:8000'

and run

/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py

Then it comes up properly on port 8000, but supervisor itself is not reading the config

It turns out that my default umask was not a standard 022 (due to security restrictions), so i had to run
chmod -R 755 /usr/lib/python2.6/*

post that, restarting all services, nginx, webvrtmgr and supervisord - came up as expected

<!-- gh-comment-id:41758450 --> @serverchief commented on GitHub (Apr 30, 2014): I did a little more digging. If i change in /var/www/webvirtmgr/conf/gunicorn.conf.py #bind = '127.0.0.1:8000' bind = '0:8000' and run /usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py Then it comes up properly on port 8000, but supervisor itself is not reading the config It turns out that my default umask was not a standard 022 (due to security restrictions), so i had to run chmod -R 755 /usr/lib/python2.6/* post that, restarting all services, nginx, webvrtmgr and supervisord - came up as expected
Author
Owner

@serverchief commented on GitHub (Apr 30, 2014):

if you can add into documentation that user should inspect these log files in case of issues:

supervisord.log webvirtmgr.log in /var/log/supervisor/

it would certainly help.

<!-- gh-comment-id:41758546 --> @serverchief commented on GitHub (Apr 30, 2014): if you can add into documentation that user should inspect these log files in case of issues: supervisord.log webvirtmgr.log in /var/log/supervisor/ it would certainly help.
Author
Owner

@serverchief commented on GitHub (Apr 30, 2014):

one more observation with SSH key connectivity, the nginx home path in /etc/passwd had to be changed to /var/www (from /var/lib/nginx)

after that change with proper keys setup over ssh, the KVM VNC UI worked.

<!-- gh-comment-id:41759944 --> @serverchief commented on GitHub (Apr 30, 2014): one more observation with SSH key connectivity, the nginx home path in /etc/passwd had to be changed to /var/www (from /var/lib/nginx) after that change with proper keys setup over ssh, the KVM VNC UI worked.
Author
Owner

@Knut770 commented on GitHub (Apr 30, 2014):

Âñå äåëî â íàñòðîéêå nginx íå óêàçàí server_name â ôàéëå
webvirtmgr.conf. Íóæíî óêàçàòü ñâîé äîìåí èëè IP è âåðíóòü âñå íà
127.0.0.1:8000 â gunicorn.conf.py

it would be fine to get the answer also in english. As you can see I can
not read anything, because of the wrong charcter set.

<!-- gh-comment-id:41761219 --> @Knut770 commented on GitHub (Apr 30, 2014): > Âñå äåëî â íàñòðîéêå nginx íå óêàçàí server_name â ôàéëå > webvirtmgr.conf. Íóæíî óêàçàòü ñâîé äîìåí èëè IP è âåðíóòü âñå íà > 127.0.0.1:8000 â gunicorn.conf.py it would be fine to get the answer also in english. As you can see I can not read anything, because of the wrong charcter set.
Author
Owner

@retspen commented on GitHub (Apr 30, 2014):

You need change parameter "sever_name" in file webvirtmgr.conf input your domain name or IP address. And return all changes in file gunicorn.conf.py to 127.0.0.1:8000.

<!-- gh-comment-id:41762503 --> @retspen commented on GitHub (Apr 30, 2014): You need change parameter "sever_name" in file webvirtmgr.conf input your domain name or IP address. And return all changes in file gunicorn.conf.py to 127.0.0.1:8000.
Author
Owner

@zaraki673 commented on GitHub (May 6, 2014):

On Centos 6.5, you need to change port 80 in "/etc/nginx/default.conf" (or move it out as say in install guide, thks the one who add this ^^ ), else webvirtmgr.conf can't listen on this port.
And in /etc/supervisor.conf, you need to change :

stdout_logfile=/var/log/supervisor/webvirtmgr.log
redirect_stderr=true

in :

logfile=/var/log/supervisor/webvirtmgr.log
log_stderr=true

Thks for your work retspen

<!-- gh-comment-id:42269017 --> @zaraki673 commented on GitHub (May 6, 2014): On Centos 6.5, you need to change port 80 in "/etc/nginx/default.conf" (or move it out as say in install guide, thks the one who add this ^^ ), else webvirtmgr.conf can't listen on this port. And in /etc/supervisor.conf, you need to change : stdout_logfile=/var/log/supervisor/webvirtmgr.log redirect_stderr=true in : logfile=/var/log/supervisor/webvirtmgr.log log_stderr=true Thks for your work retspen
Author
Owner

@silentgecko commented on GitHub (May 21, 2014):

i had the same problem the day before yesterday

After 2 hours of digging i tried:
/etc/init.d/supervisor stop
/etc/init.d/supervisor start

And that was it for me. If you use "service supervisor restart" or /etc/init.d/supervisor restart the supervisor won't load a new config file. You have to stop and Start him.

@retspen maybe you could update your Install Guide for this part.

<!-- gh-comment-id:43745257 --> @silentgecko commented on GitHub (May 21, 2014): i had the same problem the day before yesterday After 2 hours of digging i tried: /etc/init.d/supervisor stop /etc/init.d/supervisor start And that was it for me. If you use "service supervisor restart" or /etc/init.d/supervisor restart the supervisor won't load a new config file. You have to stop and Start him. @retspen maybe you could update your Install Guide for this part.
Author
Owner

@retspen commented on GitHub (May 25, 2014):

Done

<!-- gh-comment-id:44118591 --> @retspen commented on GitHub (May 25, 2014): Done
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#212
No description provided.