kimchi-project / kimchi

An HTML5 management interface for KVM guests
https://github.com/kimchi-project/kimchi/releases/latest
Other
3.11k stars 364 forks source link

Bad Gateway on Ubuntu 16.04 #989

Closed buschco closed 8 years ago

buschco commented 8 years ago

I tired many times to install this kimchi. I have a virtual Ubuntu 16.04 and the install of ginger-base worked great. But after installing kimchi I am not able to go to the wok/ginger-base/kimchi. it says "502 Bad Gateway nginx/1.10.0 (Ubuntu)". I executet this list of commands:

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

sudo reboot

sudp apt-get -y install python-cherrypy3 python-jsonschema python-m2crypto nginx python-ldap python-psutil fonts-font-awesome texlive-fonts-extra python-configobj python-parted sosreport python-imaging websockify novnc nfs-common python-ethtool open-iscsi python-guestfs libguestfs-tools spice-html5 python-paramiko

sudo reboot

wget http://kimchi-project.github.io/wok/downloads/wok-2.2.0-0.noarch.deb

sudo dpkg -i wok-*.deb 
sudo apt-get install -f

wget http://kimchi-project.github.io/gingerbase/downloads/ginger-base-2.2.0-0.noarch.deb

dpkg -i ginger-base-*.deb
sudo apt-get install -f

sudo service wokd restart
sudo reboot

wget http://kimchi-project.github.io/kimchi/downloads/kimchi-2.2.0-0.noarch.deb

sudo dpkg -i kimchi-*.deb
sudo apt-get install -f

sudo systemctl daemon-reload
sudo systemctl restart wokd

sudo service wokd restart
sudo reboot

sudo systemctl daemon-reload

sudo systemctl restart wokd

And this is the output of systemctl status nginx.service

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2016-08-25 09:20:42 PDT; 8min ago
  Process: 6249 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Aug 25 09:20:41 ubuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
Aug 25 09:20:42 ubuntu nginx[6249]: nginx: [emerg] "user" directive is not allowed here in /etc/nginx/conf.d/wok.conf:25
Aug 25 09:20:42 ubuntu nginx[6249]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 25 09:20:42 ubuntu systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 25 09:20:42 ubuntu systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 25 09:20:42 ubuntu systemd[1]: nginx.service: Unit entered failed state.
Aug 25 09:20:42 ubuntu systemd[1]: nginx.service: Failed with result 'exit-code'.

Can somebody help me?

pvital commented 8 years ago

@buschco Wok-2.2 still start its own instance of nginx, and the system nginx service conflicts with the file created by Wok.

Try to disable the nginx service of your system, and then restart wokd

$ systemctl stop nginx.service
$ systemctl disable nginx.service
$ systemctl restart wokd.service

If this process still doesn't work, please, try to attach the /var/log/wok/wok-error.log file here to see better what's happening.

buschco commented 8 years ago

Maybe the reason was that I used the VM. Anyway I got it working on a physical Debian server. But I will try your fix on the VM and let you now if that will fix the problem.