Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Web UI unavailable after fresh install, Ubuntu 24.04, Linux Integration #1131

Closed
2 tasks done
mrUlrik opened this issue Apr 30, 2024 · 9 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@mrUlrik
Copy link

mrUlrik commented Apr 30, 2024

What happened?

Ubuntu 24.04

  • Used jammy repositories for NGINX
  • Modified bunkerity_bunkerweb.list to use jammy repositories as well

Installed BunkerWeb following the guide here, for the Linux integration.

  • NGINX was installed first using their repositories and the specific version specified in the guide (nginx=1.24.0-1~jammy).
  • Set the environment variables with export UI_WIZARD=1
  • Installed BunkerWeb with curl -s https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh
  • Modified bunkerity_bunkerweb.list to use jammy rather than noble
  • sudo bash && sudo apt update && sudo -E apt install -y bunkerweb=1.5.6
  • Marked the current versions with sudo apt-mark hold nginx bunkerweb

Results:

  • Everything appears to be good. The install is successful and visiting the server's IP presents an expected page from BunkerWeb.
  • Discovered /setup produces a 502 error
  • ss -atpul reports that there is nothing listening on port 7000
  • journalctl -u bunkerweb-ui reports Python errors (reported in Log Output below)

How to reproduce?

  1. Fresh install of Ubuntu 24.04
  2. Install NGINX using their repository, modifying noble repository to jammy
  3. Set the environment variables with export UI_WIZARD=1
  4. curl -s https://packagecloud.io/install/repositories/bunkerity/bunkerweb/script.deb.sh
  5. Modify bunkerity_bunkerweb.list to use jammy rather than noble
  6. sudo bash && sudo apt update && sudo -E apt install -y bunkerweb=1.5.6
  7. Observe no process is listening on port 7000

Configuration file(s) (yaml or .env)

No changes from default, as the documentation does not suggest this. But instead going to either http://ip:7000 or http://fqdn/setup

DNS_RESOLVERS=9.9.9.9 8.8.8.8 8.8.4.4
HTTP_PORT=80
HTTPS_PORT=443
API_LISTEN_IP=127.0.0.1
MULTISITE=yes
UI_HOST=http://127.0.0.1:7000
SERVER_NAME=

Relevant log output

Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]: Traceback (most recent call last):
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen runpy>", line 198, in _run_module_as_main
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen runpy>", line 88, in _run_code
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/__main__.py", line 7, in <module>
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     run()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/wsgiapp.py", line 67, in run
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/base.py", line 236, in run
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     super().run()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/base.py", line 72, in run
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     Arbiter(self).run()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     ^^^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/arbiter.py", line 58, in __init__
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     self.setup(app)
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/arbiter.py", line 118, in setup
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     self.app.wsgi()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/base.py", line 67, in wsgi
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     self.callable = self.load()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:                     ^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/wsgiapp.py", line 58, in load
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     return self.load_wsgiapp()
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:            ^^^^^^^^^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     return util.import_app(self.app_uri)
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/gunicorn/util.py", line 371, in import_app
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     mod = importlib.import_module(module)
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     return _bootstrap._gcd_import(name[level:], package, level)
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap_external>", line 995, in exec_module
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/ui/main.py", line 36, in <module>
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     from regex import compile as re_compile, match as regex_match
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/regex/__init__.py", line 1, in <module>
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     from .regex import *
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/regex/regex.py", line 417, in <module>
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     import regex._regex_core as _regex_core
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:   File "/usr/share/bunkerweb/deps/python/regex/_regex_core.py", line 21, in <module>
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]:     import regex._regex as _regex
Apr 29 22:02:21 waf03 bunkerweb-ui.sh[18242]: ModuleNotFoundError: No module named 'regex._regex'

BunkerWeb version

1.5.6

What integration are you using?

Linux

Linux distribution (if applicable)

Ubuntu 24.04 LTS

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mrUlrik mrUlrik added the bug Something isn't working label Apr 30, 2024
@TheophileDiot
Copy link
Member

Hi @mrUlrik, thank you for opening this issue. What python version are you using ?

@TheophileDiot
Copy link
Member

Please note that Ubuntu 24.04 is not yet completely supported, as we haven't run tests on it as of now. However, we'll look into it. Thank you again for raising this issue; it will likely help narrow down potential problems we may face in the near future.

@mrUlrik
Copy link
Author

mrUlrik commented May 1, 2024

It looks like Ubuntu 24.04 comes with Python 3.12.3. I attempted to install the python3-regex package which didn't change the situation. That led me to dig into the folder of the file producing that error message which seems to contain a binary itself.

@TheophileDiot
Copy link
Member

I've compiled BunkerWeb for Ubuntu 24.04 and established somewhat official support. It will be made available once the next development workflow successfully passes all tests.
Currently, we are encountering some issues with the UI automated tests.
I'll keep you updated on its availability so that you can test it in an experimental but supported environment. 😊

@mrUlrik
Copy link
Author

mrUlrik commented May 1, 2024

Awesome! I'm happy to help!

@TheophileDiot
Copy link
Member

Alright, there's now a dev version of BunkerWeb available on Ubuntu 24.04 (x86_64) !
https://packagecloud.io/bunkerity/bunkerweb/packages/ubuntu/noble/bunkerweb_dev_amd64.deb?distro_version_id=284

@mrUlrik
Copy link
Author

mrUlrik commented May 2, 2024

Alas, I am not familiar with building deb packages to fix what appears to be quite a simple problem.

Selecting previously unselected package libpcre3:amd64.
Preparing to unpack .../24-libpcre3_2%3a8.39-15build1_amd64.deb ...
Unpacking libpcre3:amd64 (2:8.39-15build1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-ElW3Ax/25-bunkerweb_dev_amd64.deb (--unpack):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 2 package 'bunkerweb':
 'Version' field value 'dev': version number does not start with digit

I get the same issue when attempting to dpkg -i the deb linked on the page.

~$ sudo -E dpkg -i bunkerweb_dev_amd64.deb
dpkg: error processing archive bunkerweb_dev_amd64.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 2 package 'bunkerweb':
 'Version' field value 'dev': version number does not start with digit
Errors were encountered while processing:
 bunkerweb_dev_amd64.deb

@fl0ppy-d1sk
Copy link
Member

Hello @mrUlrik,

Since the dev version is not something standard when using apt/dpkg you will need to disable version checks :
echo "force-bad-version" | sudo tee -a /etc/dpkg/dpkg.cfg

By the way we also pushed a testing version with ready to use packages. Don't hesitate to test it.
More info here : https://docs.bunkerweb.io/testing/

@fl0ppy-d1sk
Copy link
Member

Hello @mrUlrik,

Ubuntu 24.04 should be working with the 1.5.7 version : https://docs.bunkerweb.io/1.5.7/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants