Question - Community setup issues

Good morning everyone,

I am installing the community edition in order to evaluate Eramba before potentially switching to the enterprise model. I cloned the image yesterday and deployed it within “DockerDesktop”.
Unfortunately I still have 2 issues in my setup as per the Health Status page (I fixed 3 others, linked to the MySQL configuration but the health page was very instructive and helpful).

1) Worker Cron, not ok
I have the “NOT OK” status with the statement “Under System / Settings / Crontab Settings you can review the required crontab configurations.”
I looked at the guides and forum topics, and didn’t find any luck:

  • I tried the “touch /var/log/cron.log” followed by “chown www-data: /var/log/cron.log” that I found in a post, to no avail.
  • I also let a day pass, to see if the daily cron would fix it, and unsuccessful (and cron history has nothing)

2) MySQL - privileges
I have the following failure: “Connected datasource must have required permissions granted for the database to work properly. Required privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX, PROCESS, TRIGGER.” with “Missing Privileges: PROCESS”
But when I looked at the db user, it seems ok:
mysql> show grants for ‘docker’;
±------------------------------------------------------------------------------+
| Grants for docker@% |
±------------------------------------------------------------------------------+
| GRANT USAGE ON . TO docker@% |
| GRANT ALL PRIVILEGES ON docker. TO docker@% |*
±------------------------------------------------------------------------------+

Could you give me some pointers?
Thank you to the community!
Renaud

PS: I hesitated: please let me know if you prefer this post to be split in two.

Do you have your ‘public address’ set?

Hello Nick,
The git clone gave me Eramba version 3.20.

On this version, the public address seems to be populated from the .env file:

PUBLIC_ADDRESS=https://127.0.0.1:8443

I left this value because I am still trying to evaluate the product.

My modal looks differently than yours. When I connect as “admin” to my Eramba instance, I see:


So it seems that the value is not empty for Eramba

1) Worker cron
While “docker logs cron” gave me nothing, I could navigate to /var/log/cron.log, and I read:

2023-06-16 20:47:01 error: [Cake\Database\Exception\MissingConnectionException] Connection to Mysql could not be established: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known in /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php on line 133
Stack Trace:
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:164

[...]

Caused by: [PDOException] PDO::__construct(): php_network_getaddresses: getaddrinfo for mysql
 failed: Name or service not known in /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php on line 121
Stack Trace:
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php:121
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php:70
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php:131
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:164
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php:51
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:216
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/Collection.php:53
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Connection.php:418
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:520
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:290
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:184
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1714
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1269
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:116
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/ValidationRule.php:145
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:2722
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:191
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:2787
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:147
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:330
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:105
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Command/RunCommand.php:110
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/BaseCommand.php:189
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
- /var/www/eramba/app/upgrade/bin/cake.php:12

Could it be linked to the “PROCESS” issue then?

Please write to support@eramba.org and we will do a quick call to review.

Hello Sam,

Sorry for the late answer. Here is a last update.
I cleaned everything and restarted from scratch 2 days ago:

  1. git clone https://github.com/eramba/docker

  2. I put the folder “docker” (and subfolders/files) as NOT readonly

  3. I edited DB_PASSWORD and MYSQL_ROOT_PASSWORD

  4. I browsed ALL files in the docker (sub)folder(s) and make sure the EOL were Unix compatible (that was the fix I did in the past when the cron container couldn’t execute docker-cron-entrypoint.sh)

  5. curl https://support-v3.eramba.org/ping.html is successful

  6. docker compose -f docker-compose.simple-install.yml up -d

  7. I stopped all the containers in DockerDesktop

  8. In sql container, I edited /etc/my,cnf by adding, under [mysqld]

innodb_lock_wait_timeout="200"
sql_mode=""
max_allowed_packet="128000000"

(these were the suggestions from eramba health page)

  1. I started all the containers in DockerDesktop

>> Now the worker cron issue is solved as well as the “PROCESS” privilege one.

I had an “hourly cron” not ok in the health page, with nothing relevant in the cron history, But by the time I wrote down this reply, the issue has disappeared (it seems the hourly kicked in and resolved it)

So I am all good now!
I wonder what made the difference

  • did you update the community edition since 2 weeks ago?
  • or are my steps #2 and #4, done systematically this time (on all files) the reason it worked?

Anyway, you can close this thread, and thank you for the inputs !

Renaud

Hello,

Super that it worked. My bet would be that correct permissions before the first run of docker compose made the difference.

App Version
3.22.3

DB Schema Version
20230918084154


I’m getting the same problem. I installed it to test before and use the community to get confidence, but I’m getting the error below:

Under System / Settings / Crontab Settings you can review the required crontab configurations

I’m putting all the tests that I did and in the end of this thread I fixed. I don’t know why, but for me the solution was the last. Maybe for you can be other.

Investigating the cron container, I saw this log on /var/log/cron.log:

2024-01-11 01:50:01 error: [Cake\Database\Exception\MissingConnectionException] Connection to Mysql could not be established: SQLSTATE[HY000] [2002] No such file or directory in /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php on line 133
Stack Trace:
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:164
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php:51
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:216
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/Collection.php:53
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Connection.php:418
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:520
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:290
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:184
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1714
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1269
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:116
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/ValidationRule.php:145
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:2722
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:191
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:2787
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:147
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:330
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:105
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Command/RunCommand.php:110
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/BaseCommand.php:189
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
- /var/www/eramba/app/upgrade/bin/cake.php:12

Caused by: [PDOException] SQLSTATE[HY000] [2002] No such file or directory in /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php on line 121
Stack Trace:
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php:121
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Core/Retry/CommandRetry.php:70
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver.php:131
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:164
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/SchemaDialect.php:51
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Driver/Mysql.php:216
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Schema/Collection.php:53
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Database/Connection.php:418
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:520
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:290
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Query.php:184
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1714
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:1269
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:116
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/ValidationRule.php:145
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:2722
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Validation/Validator.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:275
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Marshaller.php:191
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/ORM/Table.php:2787
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Model/Table/QueueProcessesTable.php:147
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:330
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Queue/Processor.php:105
- /var/www/eramba/app/upgrade/vendor/dereuromark/cakephp-queue/src/Command/RunCommand.php:110
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/BaseCommand.php:189
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
- /var/www/eramba/app/upgrade/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
- /var/www/eramba/app/upgrade/bin/cake.php:12

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="noindex" />
    <title>
        Error | Eramba
    </title>
    <link href="/favicon.png" type="image/x-icon" rel="icon"/><link href="/favicon.png" type="image/x-icon" rel="shortcut icon"/>
    
	<link rel="stylesheet" href="/limitless_theme/css/icons/icomoon/styles.css"/>
	<link rel="stylesheet" href="/limitless_theme/css/bootstrap.css"/>
	<link rel="stylesheet" href="/limitless_theme/css/core.css"/>
	<link rel="stylesheet" href="/limitless_theme/css/components.css?ver=20200327"/>
	<link rel="stylesheet" href="/limitless_theme/css/colors.css"/>
	<link rel="stylesheet" href="/css/report-blocks-grid.css"/>
	<link rel="stylesheet" href="/css/eramba.css?app_v=3.22.3"/>


            
    <!-- Load YoonityJS Framework -->
    <script src="/js/YoonityJS/YoonityJS-2.0.2-eramba.js?app_v=3.22.3"></script>
    <link href="/css/font/Roboto-font/Roboto-Regular.ttf" rel="stylesheet">
</head>
<body>
    <div id="navbar" class="navbar-fixed-wrapper">
        <div class="navbar navbar-inverse navbar-fixed">
            <div class="navbar-header">
                <a id="header-logo" class="navbar-brand" href="/">
                    <img src="/settings/get-logo/white" alt="Eramba" width="190"/>                </a>
            </div>
        </div>
    </div>

    <div class="error-container container text-center">
                <h2>An Internal Error Has Occurred</h2>
<p class="error">
    <strong>Error: </strong>
    An Internal Error Has Occurred.</p>
                    <br>
            <div class="error-container-buttons">
                <a href="javascript:history.back()" class="btn btn-primary">Go Back</a>
                <a href="/" class="btn btn-default">Dashboards</a>
            </div>
            </div>
</body>
</html>

Reading all this thread and others, I tried all this:

Drop all and reinstall again.

To remove: docker compose -f docker-compose.simple-install.yml down -v
To install: docker compose -f docker-compose.simple-install.yml up -d

Reinstall step-by-step

The sequence was:

  • MySQL and Redis (Wait for MySQL to be ready)
  • Eramba (wait until migrations end)
  • Cron

Check the log file

The cron.log file are correct:

root@01443236d76b:/var/www/html# ls -lh /var/log/
total 656K
lrwxrwxrwx 1 root        root              39 Nov  8 08:14 README -> ../../usr/share/doc/systemd/README.logs
-rw-r--r-- 1 root        root            9.2K Nov  8 08:15 alternatives.log
drwxrwxrwt 2 www-data    www-data          72 Oct 12 03:40 apache2
drwxr-xr-x 1 root        root              60 Nov  8 08:16 apt
-rw-rw---- 1 root        utmp               0 Oct  9 00:00 btmp
-rw-r--r-- 1 www-data    www-data        383K Jan 11 02:45 cron.log
-rw-r--r-- 1 root        root            253K Nov  8 08:16 dpkg.log
drwxr-s--- 1 Debian-exim adm               21 Jan 11 01:50 exim4
-rw-r--r-- 1 root        root               0 Oct  9 00:00 faillog
-rw-r--r-- 1 root        root            1.5K Nov  8 08:15 fontconfig.log
drwxr-sr-x 2 root        systemd-journal    6 Nov  8 08:14 journal
-rw-rw-r-- 1 root        utmp               0 Oct  9 00:00 lastlog
drwx------ 2 root        root               6 Nov  8 08:14 private
-rw-rw-r-- 1 root        utmp               0 Oct  9 00:00 wtmp

Check connection to MySQL

I checked if the cron and eramba containers were connecting to MySQL with passwords in .env file. All the connections worked, my the error in System Health was the same

Change the Public Address

To connect in my Eramba from outside of the server, I have one FQDN that was the same in Settings / Security / Public Address, but different in .env.
I changed PUBLIC_ADDRESS and HOST fields to the same FQDN that I’m using but without success.
At this time, I discovered that from the cron container was impossible to connect to the FQDN URL (eramba). This can be caused by iptables running in the host. To solve this, I change the /etc/hosts in the cron container and put the eramba container IP address.

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.20.0.5	01443236d76b
172.20.0.4 FQDN

Check the certificates

Debugging I remember that I’m using a self-signed certificate. To discard this possibility, I installed my own CA and tested using the curl from cron to eramba’s container. Work the curl, but the error keeps occurring.

Finally

After all, I checked the cron commands in the cron container. I ran this one manually:
/bin/sh /var/www/eramba/app/upgrade/bin/cake queue run -v

This command ran in ~10 seconds and the output was:

root@47a8172d8200:/var/www/html# /bin/sh /var/www/eramba/app/upgrade/bin/cake queue run -v 
[2024-01-11 03:07:18] Looking for Job ...
Running Job of type "Reports.Report"
2024-01-11 03:07:18 debug: ------
2024-01-11 03:07:18 debug: Report (id:29) initialized with model: `Dashboard.DashboardReports`, type `1`, params `[  'user' => 'User::1',  'reportId' => (int) 29,  'dashboard' => true,  'preload' => true]`
...
2024-01-11 03:07:18 warning: Required attribute 'download' in element 'a' was not allowed, which means 'a' will not be allowed either
Trace:
HTMLPurifier_HTMLDefinition::setupConfigStuff() /var/www/eramba/app/upgrade/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php, line 352
...
---------------------------------------------------------------
[2024-01-11 03:07:18] Looking for Job ...
Running Job of type "Reports.Report"
2024-01-11 03:07:18 debug: ------
2024-01-11 03:07:18 debug: Report (id:29) initialized with model: `Dashboard.DashboardReports`, type `1`, params `[  'user' => 'User::1',  'reportId' => (int) 29,  'dashboard' => true,  'preload' => true]`
2024-01-11 03:07:18 debug: Reports\Block\TextBlock (2953) initialized with config: `[  'size' => '12']`
2024-01-11 03:07:18 debug: Reports\Block\TaskListBlock (2952) initialized with config: `[  'size' => '4',  'type' => '2']`
2024-01-11 03:07:18 debug: Reports\Block\TaskListBlock (2958) initialized with config: `[  'size' => '4',  'type' => '1']`
2024-01-11 03:07:18 debug: Reports\Block\TaskListBlock (810) initialized with config: `[  'size' => '4',  'type' => '3']`
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (2960) initialized with config: `[  'size' => '12',  'model' => 'Risks',  'chartId' => '16',  'visualisations' => '1']`
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (917) initialized with config: `[  'size' => '12',  'model' => 'CompliancePackageRegulators',  'chartId' => '4',  'visualisations' => '1']`
2024-01-11 03:07:18 debug: Report (id:29) rendering
2024-01-11 03:07:18 debug: Reports\Block\TextBlock (2953) reading from cache
2024-01-11 03:07:18 debug: Reports\Block\TextBlock (2953) rendering
2024-01-11 03:07:18 debug: Reports\Block\TextBlock (2953) writing to cache
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (2960) reading from cache
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (2960) rendering
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (2960) writing to cache
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (917) reading from cache
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (917) rendering
2024-01-11 03:07:18 debug: Reports\Block\ChartBlock (917) writing to cache
Job Finished.
---------------------------------------------------------------
[2024-01-11 03:07:18] Looking for Job ...
nothing to do, sleeping.
^C

After running this command above, the error in System Health changes:

eramba needs to be able to access files inside its working directory, if this check fails then one or more files and/or directories are not owned by the process that runs apache. The easiest way to correct this is by using the chown command on linux for example “chown www-data:www-data eramba/ -R” in ubuntu. In Centos or Redhat apache typically runs as apache and therefore the command is likely to be different, for example: "chown apache:apache eramba/ -R

Reading the message, I ran the recommendation:
chown www-data:www-data -R /var/www/eramba/

Solved!

Make sure that crons are running automatically. It shows you OK when you run it manually of course but it has to run every minute automatically. In your case, I believe that the public address setup was missing.