bunkerweb icon indicating copy to clipboard operation
bunkerweb copied to clipboard

[BUG] Stuck with 'Generating Bunkerweb Config' message

Open Bambusa29 opened this issue 8 months ago • 9 comments

What happened?

Hi all,

When i try to connect tio my WebUI, i have this message

Image Image

Ani ideas ?

How to reproduce?

Something wrong with the communication beetwen the scheduler and the database host (not the same host) -> see log outpout

Configuration file(s) (yaml or .env)

/* ui.env */
DATABASE_URI=mariadb+pymysql://bunkerweb:[email protected]:3306/bunkerweb
# OVERRIDE_ADMIN_CREDS=no
ADMIN_USERNAME=
ADMIN_PASSWORD=
# FLASK_SECRET=changeme
# TOTP_ENCRYPTION_KEYS=changeme
LISTEN_ADDR=127.0.0.1
# LISTEN_PORT=7000
# MAX_CONTENT_LENGTH=50MB
FORWARDED_ALLOW_IPS=127.0.0.1,::1
PROXY_ALLOW_IPS=127.0.0.1,::1
# ENABLE_HEALTHCHECK=no
LOG_LEVEL=notice
LOG_TYPES=file
# LOG_FILE_PATH=/var/log/bunkerweb/ui.log

/* variables.env */
SERVER_NAME=bunkerweb-green.yannick.lan
BUNKERWEB_INSTANCES=192.168.3.15
DNS_RESOLVERS=192.168.2.252
HTTP_PORT=80
HTTPS_PORT=443
API_LISTEN_IP=0.0.0.0
API_WHITELIST_IP=127.0.0.0/8 192.168.2.62/32 192.168.2.5/32 192.168.2.56/32
API_TOKEN=
MULTISITE=yes

/* scheduler.env */
DATABASE_URI=mariadb+pymysql://bunkerweb:[email protected]:3306/bunkerweb
LOG_LEVEL=notice
LOG_TYPES=file
# LOG_FILE_PATH=/var/log/bunkerweb/scheduler.log
# in seconds
HEALTHCHECK_INTERVAL=30

# in seconds (the minimum is calculated by the formula and whichever is greater: RELOAD_MIN_TIMEOUT or count(SERVERS) * 2))
RELOAD_MIN_TIMEOUT=5

Relevant log output

I have activated debug log for the ui and the scheduler, but see no errors.
The worker communicate with the scheduler
The database and is table was created by the sheduler

I see no one error in the log (bunkerweb-ui, bunkerweb-scheduler, nginx...)
Same thing, if u try with the https url (nginx in front with local ssl) or direcly with le local url or with the ip of the server.

I see this error in my database host :

[Warning] Could not read packet: fd: 152  state: 1  read_length: 4  errno: 11  vio_errno: 1158  length: 0
[Warning] Aborted connection 7 to db: 'bunkerweb' user: 'bunkerweb' host: '192.168.2.62' (Got an error reading communication packets)

BunkerWeb version

1.6.9

What integration are you using?

Linux

Linux distribution (if applicable)

Debian Trixie

Removed private data

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

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Bambusa29 avatar Mar 17 '26 12:03 Bambusa29

Hey! I may be able to help with this bug.

I build custom fixes for Python projects and automation systems.

If you'd like help resolving this issue quickly feel free to reach out.

Happy to take a look 👍

FocusMode-coder avatar Mar 17 '26 13:03 FocusMode-coder

Hi @Bambusa29, can you share the actual logs of the scheduler / BunkerWeb / Web UI please ? https://docs.bunkerweb.io/latest/troubleshooting/

TheophileDiot avatar Mar 23 '26 08:03 TheophileDiot

I'm currently dealing (or was dealing) with the same issue right now. In the logs, I was seeing stuff like

bunkerweb-scheduler-1 | [2026-03-25 08:33:06 +0000] [GENERATOR] [92] [ℹ️ ] - ✅ Database connection established bunkerweb-scheduler-1 | [2026-03-25 08:33:07 +0000] [SCHEDULER] [56] [⚠️ ] - No BunkerWeb instance found, skipping bunkerweb reload ...

bunkerweb-ui-1 | [2026-03-25 08:32:11 +0000] [UI] [28] [⚠️ ] - Database is not initialized, retrying in 5s ...

What immediately resolved the issue in my case was adding the http:// prefix to BUNKERWEB_INSTANCES, in my case BUNKERWEB_INSTANCES=http://bunkerweb-proxy:5000 for Podman / Docker.

In earlier versions like 1.6.4, it worked for me without the http:// prefix, so something seems to have changed between 1.6.4 and 1.6.9, not sure whether it's intentional.

senpro-ziegerl avatar Mar 25 '26 08:03 senpro-ziegerl

Hi @Bambusa29, can you share the actual logs of the scheduler / BunkerWeb / Web UI please ? https://docs.bunkerweb.io/latest/troubleshooting/

Hi,

Sorry, i have abandoned the project and don't have anymore the log. I will give a try perhaps later. Best regards.

Bambusa29 avatar Mar 26 '26 10:03 Bambusa29

Hi @senpro-ziegerl, can you share your config ? Maybe you've activated the API's HTTPS by mistake

TheophileDiot avatar Mar 27 '26 10:03 TheophileDiot

Hi @senpro-ziegerl, can you share your config ? Maybe you've activated the API's HTTPS by mistake

Sure, here's my bunkerweb.env. If you need anything else, let me know. I also encountered this issue when I tried updating an existing BunkerWeb installation from 1.6.4 to 1.6.9 - after the update, it did not find the instance without changing anything in the configuration apart from the Docker image tags.

Core

MULTISITE=yes DNS_RESOLVERS=1.1.1.2 9.9.9.9 API_WHITELIST_IP=127.0.0.0/24 172.28.0.0/28 BUNKERWEB_INSTANCES=http://bunkerweb-proxy:5000

Logging

TIMERS_LOG_LEVEL=notice

UI

USE_UI=yes UI_HOST=http://172.28.0.7:7000

Reverse Proxy

SERVER_NAME="bunkerweb.yourdomain.tld" DISABLE_DEFAULT_SERVER=yes REDIRECT_HTTP_TO_HTTPS=yes SERVE_FILES=no

bunkerweb.yourdomain.tld_USE_TEMPLATE: "ui" bunkerweb.yourdomain.tld_USE_REVERSE_PROXY: "yes" bunkerweb.yourdomain.tld_REVERSE_PROXY_URL: "/changeme" # Admin URL - Change it to a hard-to-guess URI bunkerweb.yourdomain.tld_REVERSE_PROXY_HOST: "http://172.28.0.7:7000"

AntiBot

USE_ANTIBOT=javascript ANTIBOT_URI=/bunker_challenge ANTIBOT_IGNORE_URI=^/api ANTIBOT_IGNORE_IP=127.0.0.1

Backup

BACKUP_ROTATION=14

Bad Behaviour settings

BAD_BEHAVIOR_STATUS_CODES=400 401 403 404 405 420 429 444 BAD_BEHAVIOR_BAN_TIME=3600 BAD_BEHAVIOR_BAN_SCOPE=global BLACKLIST_COMMUNITY_LISTS=ip:laurent-minne-data-shield-aggressive ip:danmeuk-tor-exit ua:mitchellkrogza-bad-user-agents

ClamAV

USE_CLAMAV=yes CLAMAV_HOST=172.28.0.5 CLAMAV_TIMEOUT=60000

Compression + CORS

USE_BROTLI=yes USE_GZIP=yes USE_CORS=yes CROSS_ORIGIN_EMBEDDER_POLICY=credentialless CROSS_ORIGIN_RESOURCE_POLICY=same-origin

Client Caching

USE_CLIENT_CACHE=yes CLIENT_CACHE_CONTROL=public, max-age=86400

CrowdSec

USE_CROWDSEC=yes CROWDSEC_API=http://172.28.0.6:8080 CROWDSEC_APPSEC_URL=http://172.28.0.6:7422 CROWDSEC_ALWAYS_SEND_TO_APPSEC=yes

DNSBL

DNSBL_LIST=bl.blocklist.de sbl.spamhaus.org xbl.spamhaus.org dnsbl-2.uceprotect.net

ModSecurity

USE_MODSECURITY=yes USE_MODSECURITY_CRS=yes MODSECURITY_CRS_VERSION=4 MODSECURITY_SEC_RULE_ENGINE=On

Rate Limiting

LIMIT_CONN_MAX_HTTP1=50 LIMIT_CONN_MAX_STREAM=50 LIMIT_REQ_RATE=10r/s LIMIT_REQ_URL_1=/api LIMIT_REQ_RATE_1=5r/s

Misc

USE_REAL_IP=yes REDIRECT_TO_REQUEST_URI=yes

Redis

USE_REDIS=yes REDIS_HOST=172.28.0.3 REDIS_PORT=6379

robots.txt feature

USE_ROBOTSTXT=yes

ROBOTSTXT_COMMUNITY_LISTS=ai-robots-txt robots-disallowed

senpro-ziegerl avatar Mar 27 '26 10:03 senpro-ziegerl

Hi @senpro-ziegerl, thank you. I'll investigate this behavior

TheophileDiot avatar Mar 27 '26 10:03 TheophileDiot

Hi @senpro-ziegerl and @Bambusa29, do you still have the issue with the 1.6.10 ?

TheophileDiot avatar May 21 '26 07:05 TheophileDiot

Hi @TheophileDiot, I upgraded one of our instances to 1.6.10 yesterday without any issues. However, that particular instance already had the "fix" applied. I don't think we have an instance running on an older version without this fix applied, so I won't be able to verify whether 1.6.10 fixes this issue.

senpro-ziegerl avatar May 21 '26 09:05 senpro-ziegerl