Bug - Database initialization fails on 3.20.0


This is an unsupported installation method, but I thought I’d post this in case it affects other deployments too. The database initialization step fails on 3.20.0 at step “Running post process…”. This regards an empty database (newly created db and user).

A workaround is to perform a clean installation of 3.19.0 and then upgrade to 3.20.0.

I’m attaching the respective log, error seems to be:

error: [TypeError] DynamicStatus\Model\Behavior\DynamicStatusBehavior::injectDynamicStatus(): Argument #1 ($status) must be of type DynamicStatus\Model\Entity\DynamicStatus, null given, called in /usr/share/eramba-3.20.0/app/upgrade/vendor/cakephp/cakephp/src/ORM/BehaviorRegistry.php on line 252 in /usr/share/eramba-3.20.0/app/upgrade/plugins/DynamicStatus/src/Model/Behavior/DynamicStatusBehavior.php on line 462

eramba-init-error.txt (5.6 KB)


Have you done some changes in the default docker deployment? Are you using a remote database or something? What is the host machine os?

Hello Sam,

Thanks for the follow-up. Yes, as I mentioned this is not a supported installation method (no VMware or docker infrastructure here, unfortunately). It comprises of copying the contents of /var/www/eramba from the docker image into a debian bullseye VM under /usr/share/eramba. A remote database server is used and a local installation of redis, along with php-8.2 deps from the deb.sury.org repo. After permissions/symlinks under /var/www etc are set up, the following actions are taken via ansible:

  • Use the following env vars for all subsequent commands:
    • DB_HOST: “{{ databases.eramba.proxy }}”
    • DB_DATABASE: “{{ databases.eramba.name }}”
    • DB_USERNAME: “{{ databases.eramba.roles.admin.username }}”
    • DB_PASSWORD: “{{ databases.eramba.roles.admin.password }}”
    • USE_PROXY: 0
    • CACHE_URL: “Redis://?server=”
    • SECURITY_SALT: “s3kr1t”
  • Run the following commands under this environment/eramba user:
    • php composer.phar run-script post-install-cmd --no-interaction
    • rsync -rv app/upgrade/data_template/ app/upgrade/data/
    • rsync -rv app/upgrade/logs_template/ app/upgrade/logs/
    • php app/upgrade/bin/cake.php database initialize

It is at this last step the error occurs. The exact same ansible playbook runs with eramba 3.18.1 (I erroneously mentioned 3.19.0 in my original post, sorry) without failures.

One note which might complicate this is that DB_HOST corresponds to a mariadb proxy performing read/write splitting against a pair of MariaDB nodes setup with async replication. If the TypeError is related to db operations, I could try running this against the primary MariaDB node directly to see if the proxy is in any way interfering with this.