[GH-ISSUE #16] Centos 7 supervisor #10

Open
opened 2026-02-27 15:56:58 +03:00 by kerem · 8 comments
Owner

Originally created by @la0wei on GitHub (Jun 7, 2015).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/16

[root@Gen8 etc]# cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
cp: cannot stat ‘conf/supervisor/webvirtcloud.conf’: No such file or directory

Originally created by @la0wei on GitHub (Jun 7, 2015). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/16 [root@Gen8 etc]# cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d cp: cannot stat ‘conf/supervisor/webvirtcloud.conf’: No such file or directory
Author
Owner

@savichev commented on GitHub (Jun 7, 2015):

The previous command

cd webvirtcloud 

did not cause the error ?

Please execute

pwd

and

ls -la conf/supervisor/

Attach the output

<!-- gh-comment-id:109720884 --> @savichev commented on GitHub (Jun 7, 2015): The previous command ``` cd webvirtcloud ``` did not cause the error ? Please execute ``` pwd ``` and ``` ls -la conf/supervisor/ ``` Attach the output
Author
Owner

@la0wei commented on GitHub (Jun 7, 2015):

@savichev I am sorry ,post the wrong output.
the original command in 'Install WebVirtCloud panel' is
sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
it does not work,because /etc/supervisor doesn't exist.

[root@Gen8 webvirtcloud]# cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
cp: cannot create regular file ‘/etc/supervisor/conf.d’: No such file or directory

I changed the /etc/supervisor/conf.d to /etc/supervisord.d
at least the cp command works.

and the command
sudo chown -R www-data:www-data /var/www/webvirtcloud

Centos 7 nginx user seems not www-data like Debian or Ubuntu,it's nginx.
So it seems should be sudo chown -R nginx:nginx /var/www/webvirtcloud

<!-- gh-comment-id:109722933 --> @la0wei commented on GitHub (Jun 7, 2015): @savichev I am sorry ,post the wrong output. the original command in 'Install WebVirtCloud panel' is sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d it does not work,because /etc/supervisor doesn't exist. [root@Gen8 webvirtcloud]# cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d cp: cannot create regular file ‘/etc/supervisor/conf.d’: No such file or directory I changed the /etc/supervisor/conf.d to /etc/supervisord.d at least the cp command works. and the command sudo chown -R www-data:www-data /var/www/webvirtcloud Centos 7 nginx user seems not www-data like Debian or Ubuntu,it's nginx. So it seems should be sudo chown -R nginx:nginx /var/www/webvirtcloud
Author
Owner

@retspen commented on GitHub (Jun 7, 2015):

For ContOS 7 add this lines to /etc/supervisor.conf:

[program:webvirtcloud]
command=/usr/local/bin/gunicorn webvirtcloud.wsgi:application -c 
/var/www/webvirtcloud/gunicorn.conf.py
directory=/var/www/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true
[program:novncd]
command=/usr/bin/python /var/www/webvirtcloud/console/novncd
directory=/var/www/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true
<!-- gh-comment-id:109724780 --> @retspen commented on GitHub (Jun 7, 2015): For ContOS 7 add this lines to /etc/supervisor.conf: <pre> [program:webvirtcloud] command=/usr/local/bin/gunicorn webvirtcloud.wsgi:application -c /var/www/webvirtcloud/gunicorn.conf.py directory=/var/www/webvirtcloud user=nginx autostart=true autorestart=true redirect_stderr=true [program:novncd] command=/usr/bin/python /var/www/webvirtcloud/console/novncd directory=/var/www/webvirtcloud user=nginx autostart=true autorestart=true redirect_stderr=true </pre>
Author
Owner

@retspen commented on GitHub (Jun 7, 2015):

And change www-data to nginx all config files

<!-- gh-comment-id:109724899 --> @retspen commented on GitHub (Jun 7, 2015): And change www-data to nginx all config files
Author
Owner

@savichev commented on GitHub (Jun 7, 2015):

@retspen

sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d
sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d

IMHO not corrected.
More correctly

sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d/
sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d/

?

<!-- gh-comment-id:109729222 --> @savichev commented on GitHub (Jun 7, 2015): @retspen ``` sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d ``` IMHO not corrected. More correctly ``` sudo cp conf/supervisor/webvirtcloud.conf /etc/supervisor/conf.d/ sudo cp conf/nginx/webvirtcloud.conf /etc/nginx/conf.d/ ``` ?
Author
Owner

@choclo commented on GitHub (Jul 31, 2015):

Hi @retspen and @savichev ,

Make sure you also on CentOS7 change some paths on the /etc/supervisord.conf file:

[program:webvirtcloud]
command=/srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py
directory=/srv/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true

[program:novncd]
command=/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd
directory=/srv/webvirtcloud
user=nginx
autostart=true
autorestart=true
redirect_stderr=true

The defaults did not work, mostly because you need to point to the correct python version to load django. This is working now on the latest CentOS:

(venv)[root@mercadono webvirtcloud]# supervisorctl status
gstfsd                           RUNNING    pid 24187, uptime 0:04:17
novncd                           RUNNING    pid 24186, uptime 0:04:17
webvirtcloud                     RUNNING    pid 24185, uptime 0:04:17

(venv)[root@mercadono webvirtcloud]# cat /etc/redhat-release 
CentOS Linux release 7.1.1503 (Core) 

I'm still not getting a connection from novnc but will post the solution as soon as I get it.

<!-- gh-comment-id:126655325 --> @choclo commented on GitHub (Jul 31, 2015): Hi @retspen and @savichev , Make sure you also on CentOS7 change some paths on the /etc/supervisord.conf file: ``` [program:webvirtcloud] command=/srv/webvirtcloud/venv/bin/gunicorn webvirtcloud.wsgi:application -c /srv/webvirtcloud/gunicorn.conf.py directory=/srv/webvirtcloud user=nginx autostart=true autorestart=true redirect_stderr=true [program:novncd] command=/srv/webvirtcloud/venv/bin/python /srv/webvirtcloud/console/novncd directory=/srv/webvirtcloud user=nginx autostart=true autorestart=true redirect_stderr=true ``` The defaults did not work, mostly because you need to point to the correct python version to load django. This is working now on the latest CentOS: ``` (venv)[root@mercadono webvirtcloud]# supervisorctl status gstfsd RUNNING pid 24187, uptime 0:04:17 novncd RUNNING pid 24186, uptime 0:04:17 webvirtcloud RUNNING pid 24185, uptime 0:04:17 (venv)[root@mercadono webvirtcloud]# cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) ``` I'm still not getting a connection from novnc but will post the solution as soon as I get it.
Author
Owner

@dubrsl commented on GitHub (Jul 31, 2015):

Try to check iptables

<!-- gh-comment-id:126656279 --> @dubrsl commented on GitHub (Jul 31, 2015): Try to check iptables
Author
Owner

@choclo commented on GitHub (Jul 31, 2015):

@dubrsl nah, iptables is long disabled:

[tomas@mercadono ~]$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

EDIT: Actually it was the proxy/firewall I'm at so all works OK :)

<!-- gh-comment-id:126656482 --> @choclo commented on GitHub (Jul 31, 2015): @dubrsl nah, iptables is long disabled: ``` [tomas@mercadono ~]$ sudo iptables -nL Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ``` **EDIT: Actually it was the proxy/firewall I'm at so all works OK :)**
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#10
No description provided.