strongswan / strongMan

Management UI for strongSwan
https://www.strongswan.org/
Other
117 stars 39 forks source link

./run.py - [ERROR] Exception in worker process #119

Closed ayungman closed 3 years ago

ayungman commented 3 years ago

./run.py /ws/strongMan Press CTRL + C to stop strongMan () [2021-01-11 17:47:07 +0200] [12226] [INFO] Starting gunicorn 19.5.0 [2021-01-11 17:47:07 +0200] [12226] [INFO] Listening at: http://0.0.0.0:1515 (12226) [2021-01-11 17:47:07 +0200] [12226] [INFO] Using worker: sync /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, *args, **kwargs) [2021-01-11 17:47:07 +0200] [12228] [INFO] Booting worker with pid: 12228 [2021-01-11 17:47:07 +0200] [12229] [INFO] Booting worker with pid: 12229 [2021-01-11 17:47:08 +0200] [12230] [INFO] Booting worker with pid: 12230 [2021-01-11 17:47:08 +0200] [12231] [INFO] Booting worker with pid: 12231 [2021-01-11 17:47:08 +0200] [12232] [INFO] Booting worker with pid: 12232 [2021-01-11 17:47:08 +0200] [12233] [INFO] Booting worker with pid: 12233 [2021-01-11 15:47:08 +0000] [12228] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() : : RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-11 15:47:08 +0000] [12229] [INFO] Worker exiting (pid: 12229) [2021-01-11 15:47:08 +0000] [12230] [ERROR] Exception in worker process

Following those instruction git clone https://github.com/strongswan/strongMan.git cd strongMan sudo ./setup.py install ./run.py

The version of virtualenv is: virtualenv 20.2.2 from /root/.local/pipx/venvs/virtualenv/lib/python3.8/site-packages/virtualenv/init.py

Running on Ubuntu 20.04.1 LTS, arm64

tobiasbrunner commented 3 years ago

Might be an incompatibility between Python 3.8 and Django 1.9.6, which the project currently uses. Using an older Python version (e.g. 3.6, which the automated tests use) or trying to upgrade to a newer Django version might fix it. The latter is probably preferable, but could lead to further issues.

ayungman commented 3 years ago

Try two scenarios - both fail.

  1. install manual ok. but run.py failed. see bellow.
  2. download and update-alternatives pyton to 3.6.10 and run ./setup.py uninstall then install failed the same way.

dumps installing manual - successful. pip3 install -r requirements.txt

However running ./run.py failed with Exception in worker process as shown bellow.

./run.py

/ws/strongMan Press CTRL + C to stop strongMan () [2021-01-12 15:20:01 +0200] [33078] [INFO] Starting gunicorn 19.5.0 [2021-01-12 15:20:01 +0200] [33078] [INFO] Listening at: http://0.0.0.0:1515 (33078) [2021-01-12 15:20:01 +0200] [33078] [INFO] Using worker: sync /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, *args, **kwargs) [2021-01-12 15:20:01 +0200] [33080] [INFO] Booting worker with pid: 33080 [2021-01-12 15:20:01 +0200] [33081] [INFO] Booting worker with pid: 33081 [2021-01-12 15:20:01 +0200] [33082] [INFO] Booting worker with pid: 33082 [2021-01-12 15:20:02 +0200] [33083] [INFO] Booting worker with pid: 33083 [2021-01-12 15:20:02 +0200] [33084] [INFO] Booting worker with pid: 33084 [2021-01-12 15:20:02 +0200] [33085] [INFO] Booting worker with pid: 33085 [2021-01-12 13:20:02 +0000] [33080] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33080] [INFO] Worker exiting (pid: 33080) [2021-01-12 13:20:02 +0000] [33081] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33081] [INFO] Worker exiting (pid: 33081) [2021-01-12 13:20:02 +0000] [33083] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33083] [INFO] Worker exiting (pid: 33083) [2021-01-12 13:20:02 +0000] [33082] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33082] [INFO] Worker exiting (pid: 33082) [2021-01-12 13:20:02 +0000] [33084] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33084] [INFO] Worker exiting (pid: 33084) [2021-01-12 13:20:02 +0000] [33085] [ERROR] Exception in worker process Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 517, in spawn_worker worker.init_process() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 122, in init_process self.load_wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 132, in load_wsgi self.wsgi = self.app.wsgi() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/util.py", line 357, in import_app import(module) File "/ws/strongMan/strongMan/wsgi.py", line 17, in application = Cling(get_wsgi_application()) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? [2021-01-12 13:20:02 +0000] [33085] [INFO] Worker exiting (pid: 33085) Traceback (most recent call last): File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 183, in run self.sleep() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 316, in sleep ready = select.select([self.PIPE[0]], [], [], 1.0) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 218, in handle_chld self.reap_workers() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 466, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/ws/strongMan/env/bin/gunicorn", line 8, in sys.exit(run()) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 74, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 192, in run super(Application, self).run() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 205, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 301, in halt self.stop() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 348, in stop time.sleep(0.1) File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 218, in handle_chld self.reap_workers() File "/ws/strongMan/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 466, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> Traceback (most recent call last): File "./run.py", line 13, in process = subprocess.check_output(cmd.split()) File "/usr/lib/python2.7/subprocess.py", line 223, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['/ws/strongMan/env/bin/gunicorn', '--workers', '6', '--bind', '0.0.0.0:1515', '--env', 'DJANGO_SETTINGS_MODULE=strongMan.settings.local', 'strongMan.wsgi:application']' returned non-zero exit status 1

  1. ./setup.py Start strongMan installation
    • Virtualenv
    • Requirements
    • Database migration Delete strongMan/db.sqlite3 [Errno 2] No such file or directory: '/ws/strongMan/strongMan/db.sqlite3' Traceback (most recent call last): File "/ws/strongMan/manage.py", line 10, in execute_from_command_line(sys.argv) File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/management/init.py", line 353, in execute_from_command_line utility.execute() File "/ws/strongMan/env/lib/python3.8/site-packages/django/core/management/init.py", line 327, in execute django.setup() File "/ws/strongMan/env/lib/python3.8/site-packages/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/ws/strongMan/env/lib/python3.8/site-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 4, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/ws/strongMan/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 49, in class AbstractBaseUser(models.Model): RuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new? Command '['/ws/strongMan/env/bin/python', '/ws/strongMan/manage.py', 'makemigrations', 'certificates', '--settings=strongMan.settings.local']' returned non-zero exit status 1.
tobiasbrunner commented 3 years ago

You can try the django-update branch, which updates Django and the other dependencies to their latest version. In a quick test it seems to work OK. I noticed one issue, though, which is that strings returned from vici (e.g. on the about page) are wrapped in b'' because they are bytestrings (Django versions < 2 converted/decoded these automatically). Please let me know if you find other stuff that doesn't work.

ayungman commented 3 years ago

ok. switching to django-update branch made the trick and strongMan manage to load with no errors or exceptions. I think that change should be push to master. I saw the issue you've talked about wrapped in b'' (About menu) and will report if find more issues.

When going to 'Server Connections' menu item I don't see my active/running connection. Should it show me that info? Connection Overview No connections to show

tobiasbrunner commented 3 years ago

I think that change should be push to master.

Yes, that's definitely the goal once everything seems to work.

I saw the issue you've talked about wrapped in b'' (About menu) and will report if find more issues.

I've updated the commit and fixed an issue with iframes (e.g. to upload certificates from the connection editor) and the about page now also looks OK (for the decoding of error messages I pushed a fix for the vici Python bindings to the strongSwan repository in the vici-errors-decode branch).

When going to 'Server Connections' menu item I don't see my active/running connection. Should it show me that info?

I don't think so. It will only display connections configured in strongMan itself (i.e. you can't use it to manage connections configured via swanctl.conf or vici directly, instead you have to configure everything via strongMan).

ayungman commented 3 years ago

Thanks.

I don't think so. It will only display connections configured in strongMan itself (i.e. you can't use it to manage connections configured via swanctl.conf or vici directly, instead you have to configure everything via strongMan).

ha, a bit disappointment as conflict may occurs. The other direction - If I configure using strongMan, will it be reflected in swanctl conf.d or somewhere else? I guess It must be reflected somehow to StrongSwan, isn't it

tobiasbrunner commented 3 years ago

ha, a bit disappointment as conflict may occurs.

That's exactly the point. Generally, only one client can currently configure the daemon via vici. So e.g. swanctl would remove connections loaded by strongMan as it can't find these in swanctl.conf. Controlling SAs is less of a problem, that can work with multiple clients.

If I configure using strongMan, will it be reflected in swanctl conf.d or somewhere else?

Not in the config, but you could e.g. list, initiate or terminate connections via swanctl.

tobiasbrunner commented 3 years ago

I've migrated the automated testing to GitHub Actions and those complete successfully (they don't cover everything, though). But unless you found anything else, I think these changes are ready for merging. What do you think?

ayungman commented 3 years ago

Well, saw another thing, not sure if its an issue, after initiate successful connection. Going to "Connection Overview" form and clicking on the "eye" icon to see the "Connection Settings" I am getting always "my-lab-peer refused to connect."

c1 c2

tobiasbrunner commented 3 years ago

Well, saw another thing, not sure if its an issue, after initiate successful connection.

Does this affect the rest of the web application too? Or only the popup? The latter would be strange, but if the complete site is not reachable anymore that could be because of the VPN connection (depending on the negotiated traffic selectors). You might have to configure bypass policies to avoid covering the web traffic.

ayungman commented 3 years ago

Its the latter... :-( Using different network interfaces for the web access and for the VPN. The rest of the app is functional. Pls note that it "refused to connect" when clicking on the "eye" also when VPN connection is not active ("Unloaded")

image

tobiasbrunner commented 3 years ago

Hm, no idea, can't reproduce this here, works fine in Firefox and Chrome with hostname or IP address. What browser/version do you use? Did you change any config options (other than ALLOWED_HOSTS)? Can you follow the request(s) in the browser's developer tools (Network tab)?

ayungman commented 3 years ago

I am using chrome from another machine (not the installed one). I changed only ALLOWED_HOSTS to '*' inside file: strongMan/strongMan/settings/base.py I can send you the ip of the server, as you can connect from far also.

tobiasbrunner commented 3 years ago

I've tried that too, doesn't happen here (although, I only tested in the same LAN). Since you modified base.py, do you have the changes I made to that file in yours (in particular X_FRAME_OPTIONS = 'SAMEORIGIN')? Did you try clearing the browser cache (maybe Chrome stored the previous X-Frame-Options value and doesn't allow the frame to be loaded)? Did you try the developer tools? You can email me the IP if you want.

ayungman commented 3 years ago

Great! that was the problem. X_FRAME_OPTIONS = 'SAMEORIGIN' I made that change manually in "/env/lib/python3.8/site-packages/django/conf/global_settings.py" since it was not there. I guess it's not on the branch django-update.

it is working now. :-) Many thanks for your help - its very nice - thanks!

tobiasbrunner commented 3 years ago

I made that change manually in "/env/lib/python3.8/site-packages/django/conf/global_settings.py"

You shouldn't modify such third-party files, that's what the local config files are for. base.py is the base for all configs, the others are loaded depending on the scenario (via DJANGO_SETTINGS_MODULE).

I guess it's not on the branch django-update.

No, it definitely was in there: https://github.com/strongswan/strongMan/blob/08329559f91c0cdc527af24fad8effc002ea7453/strongMan/settings/base.py#L36

But it's possible you missed it since I force-pushed the branch a couple of times.

Anyway, I'm going to push the changes to master.

SonnyMargwe commented 2 years ago

i'm having this Error 2 when trying to install strongMan. Need help please python setup.py install Start strongMan installation