[GH-ISSUE #614] Quick Install overrides nginx upstream wssocketiod port? #355

Closed
opened 2026-02-27 15:58:22 +03:00 by kerem · 3 comments
Owner

Originally created by @0x6d61726b on GitHub (Oct 22, 2023).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/614

When running the Quick Install script the wssocketiod default port gets overridden with the websocket port number and I am wondering if this is expected:

upstream wsnovncd {
      server 127.0.0.1:6080;
}
upstream wssocketiod {
      server 127.0.0.1:6080;
}

System (debian 12, bookworm):
Linux XXXX 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux

File: /etc/nginx/conf.d/webvirtcloud.conf

server { listen 80;

server_name localhost;
#access_log /var/log/nginx/webvirtcloud-access_log;

location /static/ {
    root /srv/webvirtcloud;
    expires max;
}

location / {
    proxy_pass http://127.0.0.1:8000;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Forwarded-Proto $remote_addr;
    proxy_set_header X-Forwarded-Ssl off;
    proxy_connect_timeout 1800;
    proxy_read_timeout 1800;
    proxy_send_timeout 1800;
    client_max_body_size 1024M;
}

location /novncd/ {
    proxy_pass http://wsnovncd;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
location /socket.io/ {
    proxy_pass http://wssocketiod;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

}

upstream wsnovncd {
server 127.0.0.1:6080;
}
upstream wssocketiod {
server 127.0.0.1:6080;
}

Installation log details ...

WEBVIRTCLOUD

Welcome to Webvirtcloud Installer for RHEL&Alternatives, Fedora, Debian and Ubuntu!

The installer has detected Debian version 12 codename bookworm.
Q. Do you want to configure fqdn for Nginx? (y/n) n
Q. NOVNC service port number?(Default: 6080)
Setting novnc service port 6080

Q. NOVNC public port number for reverse proxy(e.g: 80 or 443)?(Default: 6080) 80
Setting novnc public port 80

Q. NOVNC host listen ip?(Default: 0.0.0.0)
Setting novnc host ip 0.0.0.0

  • Updating installed packages./
  • Installing OS requirements.
  • Installing git
  • Installing virtualenv
  • python3-virtualenv already installed
  • python3-dev already installed
  • Installing python3-lxml
  • Installing libvirt-dev
  • zlib1g-dev already installed
  • Installing libxslt1-dev
  • Installing libsasl2-dev
  • Installing libldap2-dev
  • nginx already installed
  • Installing supervisor
  • libsasl2-modules already installed
  • gcc already installed
  • pkg-config already installed
  • Installing python3-guestfs
  • Installing uuid
  • Setting up hosts file.
  • Creating webvirtcloud user.
  • Cloning webvirtcloud from github to the web directory.
  • Configuring settings.py file.
  • Secret for Django generated: %5215%km226j4zzaa_$3lry*zq9t3yv$qy#!)o_!ma+6i761%g
  • Activate virtual environment.
    created virtual environment CPython3.11.2.final.0-64 in 467ms
    creator CPython3Posix(dest=/srv/webvirtcloud/venv, clear=False, no_vcs_ignore=False, global=False)
    seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
    added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4
    activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
  • Install App's Python requirements.
    Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (23.0.1)
    Collecting pip
    Downloading pip-23.3.1-py3-none-any.whl (2.1 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 10.2 MB/s eta 0:00:00
    Installing collected packages: pip
    Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
    Successfully uninstalled pip-23.0.1
    Successfully installed pip-23.3.1
  • Django Migrate.
    Migrations for 'accounts':
    accounts/migrations/0006_alter_userattributes_id_alter_userinstance_id_and_more.py
    • Alter field id on userattributes
    • Alter field id on userinstance
    • Alter field id on usersshkey
      Migrations for 'appsettings':
      appsettings/migrations/0009_alter_appsettings_id.py
    • Alter field id on appsettings
      Migrations for 'computes':
      computes/migrations/0004_alter_compute_id.py
    • Alter field id on compute
      Migrations for 'instances':
      instances/migrations/0012_alter_flavor_id_alter_instance_id.py
    • Alter field id on flavor
    • Alter field id on instance
      Migrations for 'logs':
      logs/migrations/0004_alter_logs_id.py
    • Alter field id on logs
      Operations to perform:
      Apply all migrations: accounts, admin, appsettings, auth, computes, contenttypes, instances, interfaces, logs, networks, otp_totp, sessions, storages
      Running migrations:
      Applying accounts.0006_alter_userattributes_id_alter_userinstance_id_and_more... OK
      Applying appsettings.0009_alter_appsettings_id... OK
      Applying computes.0004_alter_compute_id... OK
      Applying instances.0012_alter_flavor_id_alter_instance_id... OK
      Applying logs.0004_alter_logs_id... OK
      ! SHOW_PROFILE_EDIT_PASSWORD is found inside settings.py
  • Applying permission can_change_password for all users
    ! Warning!!! Setting to True for all users
    ! Don`t forget to remove the option from settings.py
  • Django Collect Static

0 static files copied to '/srv/webvirtcloud/static', 70 unmodified.

  • Configuring Nginx.

    • Copying Nginx configuration
  • Configuring Supervisor.

    • Copying supervisor configuration
  • Setting Supervisor to start on boot and restart.

  • Setting Nginx to start on boot and starting Nginx.

    Open http://localhost to login to webvirtcloud.

  • Cleaning up...

  • Finished!

Originally created by @0x6d61726b on GitHub (Oct 22, 2023). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/614 When running the Quick Install script the wssocketiod default port gets overridden with the websocket port number and I am wondering if this is expected: ``` upstream wsnovncd { server 127.0.0.1:6080; } upstream wssocketiod { server 127.0.0.1:6080; } ``` System (debian 12, bookworm): Linux XXXX 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux <details><summary>File: /etc/nginx/conf.d/webvirtcloud.conf</summary> <p> server { listen 80; server_name localhost; #access_log /var/log/nginx/webvirtcloud-access_log; location /static/ { root /srv/webvirtcloud; expires max; } location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Proto $remote_addr; proxy_set_header X-Forwarded-Ssl off; proxy_connect_timeout 1800; proxy_read_timeout 1800; proxy_send_timeout 1800; client_max_body_size 1024M; } location /novncd/ { proxy_pass http://wsnovncd; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /socket.io/ { proxy_pass http://wssocketiod; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } upstream wsnovncd { server 127.0.0.1:6080; } upstream wssocketiod { server 127.0.0.1:6080; } </p> </details> <details><summary>Installation log details ...</summary> <p> WEBVIRTCLOUD Welcome to Webvirtcloud Installer for RHEL&Alternatives, Fedora, Debian and Ubuntu! The installer has detected Debian version 12 codename bookworm. Q. Do you want to configure fqdn for Nginx? (y/n) n Q. NOVNC service port number?(Default: 6080) Setting novnc service port 6080 Q. NOVNC public port number for reverse proxy(e.g: 80 or 443)?(Default: 6080) 80 Setting novnc public port 80 Q. NOVNC host listen ip?(Default: 0.0.0.0) Setting novnc host ip 0.0.0.0 * Updating installed packages./ * Installing OS requirements. * Installing git * Installing virtualenv * python3-virtualenv already installed * python3-dev already installed * Installing python3-lxml * Installing libvirt-dev * zlib1g-dev already installed * Installing libxslt1-dev * Installing libsasl2-dev * Installing libldap2-dev * nginx already installed * Installing supervisor * libsasl2-modules already installed * gcc already installed * pkg-config already installed * Installing python3-guestfs * Installing uuid * Setting up hosts file. * Creating webvirtcloud user. * Cloning webvirtcloud from github to the web directory. * Configuring settings.py file. * Secret for Django generated: %5215%km226j4zzaa_$3lry*zq9t3yv$qy#!)o_!ma+6i761%g * Activate virtual environment. created virtual environment CPython3.11.2.final.0-64 in 467ms creator CPython3Posix(dest=/srv/webvirtcloud/venv, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator * Install App's Python requirements. Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (23.0.1) Collecting pip Downloading pip-23.3.1-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 10.2 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 23.0.1 Uninstalling pip-23.0.1: Successfully uninstalled pip-23.0.1 Successfully installed pip-23.3.1 * Django Migrate. Migrations for 'accounts': accounts/migrations/0006_alter_userattributes_id_alter_userinstance_id_and_more.py - Alter field id on userattributes - Alter field id on userinstance - Alter field id on usersshkey Migrations for 'appsettings': appsettings/migrations/0009_alter_appsettings_id.py - Alter field id on appsettings Migrations for 'computes': computes/migrations/0004_alter_compute_id.py - Alter field id on compute Migrations for 'instances': instances/migrations/0012_alter_flavor_id_alter_instance_id.py - Alter field id on flavor - Alter field id on instance Migrations for 'logs': logs/migrations/0004_alter_logs_id.py - Alter field id on logs Operations to perform: Apply all migrations: accounts, admin, appsettings, auth, computes, contenttypes, instances, interfaces, logs, networks, otp_totp, sessions, storages Running migrations: Applying accounts.0006_alter_userattributes_id_alter_userinstance_id_and_more... OK Applying appsettings.0009_alter_appsettings_id... OK Applying computes.0004_alter_compute_id... OK Applying instances.0012_alter_flavor_id_alter_instance_id... OK Applying logs.0004_alter_logs_id... OK ! SHOW_PROFILE_EDIT_PASSWORD is found inside settings.py * Applying permission can_change_password for all users ! Warning!!! Setting to True for all users ! Don`t forget to remove the option from settings.py * Django Collect Static 0 static files copied to '/srv/webvirtcloud/static', 70 unmodified. * Configuring Nginx. * Copying Nginx configuration * Configuring Supervisor. * Copying supervisor configuration * Setting Supervisor to start on boot and restart. * Setting Nginx to start on boot and starting Nginx. ***Open http://localhost to login to webvirtcloud.*** * Cleaning up... * Finished! </p> </details>
kerem closed this issue 2026-02-27 15:58:22 +03:00
Author
Owner

@catborise commented on GitHub (Oct 23, 2023):

Default port should be 6081 for upstream wssocketiod.
Default port should be 6080 for upstream wsnovncd.
We should check installation script, if it is different than…

<!-- gh-comment-id:1774555108 --> @catborise commented on GitHub (Oct 23, 2023): Default port should be 6081 for upstream wssocketiod. Default port should be 6080 for upstream wsnovncd. We should check installation script, if it is different than…
Author
Owner

@0x6d61726b commented on GitHub (Oct 24, 2023):

Ok, than I think the issue is related to this line:
github.com/retspen/webvirtcloud@9a675918c6/webvirtcloud.sh (L177)

If I understand it correctly, it replaces everything that matches "server 127.0.0.1:" which applies to both upstream servers listed below:

github.com/retspen/webvirtcloud@9a675918c6/conf/nginx/webvirtcloud.conf (L39-L44)

<!-- gh-comment-id:1777970954 --> @0x6d61726b commented on GitHub (Oct 24, 2023): Ok, than I think the issue is related to this line: https://github.com/retspen/webvirtcloud/blob/9a675918c683d76b621ebd405960fd4c2e3be324/webvirtcloud.sh#L177 If I understand it correctly, it replaces everything that matches "server 127.0.0.1:" which applies to both upstream servers listed below: https://github.com/retspen/webvirtcloud/blob/9a675918c683d76b621ebd405960fd4c2e3be324/conf/nginx/webvirtcloud.conf#L39-L44
Author
Owner

@0x6d61726b commented on GitHub (Nov 12, 2023):

Pull request #618 has been merged

<!-- gh-comment-id:1807140462 --> @0x6d61726b commented on GitHub (Nov 12, 2023): Pull request #618 has been merged
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#355
No description provided.