retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.68k stars 371 forks source link

Quick Install Broken? #459

Open ghost opened 3 years ago

ghost commented 3 years ago

Fresh Centos 8 (KVM VPS). Used below method to install:

wget https://raw.githubusercontent.com/retspen/webvirtcloud/master/install.sh
chmod 744 install.sh
# run with sudo or root user
./install.sh

Results:

[root@server ~]# systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2021-08-17 19:45:20 IST; 5h 31min ago
  Process: 840 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 829 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Aug 17 19:45:20 server.none.com systemd[1]: Starting The nginx HTTP and reverse proxy server...
Aug 17 19:45:20 server.none.com nginx[840]: nginx: [emerg] invalid port in upstream "127.0.0.1:n" in /etc/nginx/conf.d/webvirtcloud.conf:34
Aug 17 19:45:20 server.none.com nginx[840]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 17 19:45:20 server.none.com systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 17 19:45:20 server.none.com systemd[1]: nginx.service: Failed with result 'exit-code'.
Aug 17 19:45:20 server.none.com systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
[root@server ~]# service supervisor restart
Redirecting to /bin/systemctl restart supervisor.service
Failed to restart supervisor.service: Unit supervisor.service not found.

Any suggestions? The install said it was complete, but the web GUI is not coming up. Page not found.

catborise commented 3 years ago

while installing it is asking the novncd port. if you do not modify it, its default is 6080. i think there must be a glitch . as you see nginx conf gives error. you can manually edit the /etc/nginx/conf.d/webvirtcloud.conf file line 34 to fix port number. then it should be worked

ghost commented 3 years ago

Thanks. Did what you said, was able to restart nginx. I reran the install script, still cannot access via https://ipaddress:6080 (tried http:// too).

  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/webvirtcloud/webvirtcloud/settings.py", line 189, in <module>
    WS_PUBLIC_PORT = n
NameError: name 'n' is not defined
* Configuring Nginx.
  * Copying Nginx configuration
* Configuring Supervisor.
  * Copying supervisor configuration
not running
* Setting Supervisor to start on boot and restart.
* Setting Nginx to start on boot and starting Nginx.

  ***Open http:// to login to webvirtcloud.***

* Cleaning up...
* Finished!
ghost commented 3 years ago
[root@server ~]# service supervisor restart
Redirecting to /bin/systemctl restart supervisor.service
Failed to restart supervisor.service: Unit supervisor.service not found.
catborise commented 3 years ago

"/srv/webvirtcloud/webvirtcloud/settings.py" edit this before running installation. set WS_PUBLIC_PORT = 6080

ghost commented 3 years ago

Thanks. Updated file. Reran install. Still no web GUI.

http://ipaddress:6080 (tried with https too)

[root@server ~]# service supervisor restart
Redirecting to /bin/systemctl restart supervisor.service
Failed to restart supervisor.service: Unit supervisor.service not found.
kwmiebach commented 2 years ago

I probably found the reason why this could happen during installation.

There are some questions during install:

  Welcome to Webvirtcloud Installer for CentOS, Fedora, Debian and Ubuntu!

  The installer has detected Debian version 10 codename buster.
  Q1. Do you want to configure fqdn for Nginx? (y/n) n

  Q2. Do you want to change NOVNC service port number?(Default: 6080)
     Setting novnc service port 6080

  Q3. Do you want to change NOVNC public port number for reverse proxy(e.g: 80 or 443)?(Default: 6080) 
     Setting novnc public port 6080

  Q4. Do you want to change NOVNC host listen ip?(Default: 0.0.0.0)
     Setting novnc host ip 0.0.0.0

I added the numbers 1-4 in the above snippet for clarity.

To avoid the error please be careful only to answer y/n in Q1 but not in Q2,Q3 and Q4!

If you answer 'n' in any of them, it would lead to an error as described above. Because the installer takes 'n' and tries to use it as a port number.

The correct answer to Q2-Q4 is just hitting enter or write a port number and then hit enter.

The installer could be improved by an additional warning message or explanation, because it is tempting to put the 'n' everywhere.

Or even check for an integer input.

catborise commented 2 years ago

yes it is a semantic problem "do you" question is wrong, answer is thought to be yes or no. may be we should change question style. what should you suggest?

change like; Do you want to change NOVNC service port number?(Default: 6080)
to NOVNC service port number?(Default: 6080