Critical alert __construct(/var/www/html/scratch/autobackups/dump): failed to open dir

Can you please upload the server logs into the below link after switching the log level to Dev mode from Admin portal >> Settings >> Server >> Log level >> Dev

https://zerg.codelathe.com/url/gyzzwzvqa2zb4bra

You can then recreate the alert once more and share us the log files from the below location:

Linux : /var/www/html/scratch/logs/log_YYYY-MM-DD.txt

log_2020-06-18.txt has been uploaded

@dreedijk

Thank you for the logs. We will review it and get back to you.

@dreedijk

The error seems to be different. However, we will try to recreate the issue from our side and let you know about this.

@dreedijk

Thank you for your patience.

Can you please apply the below patch and check if you are still facing the issue

Please download the patch: https://zerg.codelathe.com/url/zipstream

Replace the file /var/www/html/thirdparty/zipstream.php with the patched version in all nodes.

We recommend taking a backup before replacing the file.

Done. Will have to wait a couple of hours to see if the patch solves the problem! I’ll keep you posted!

1 Like

unfortunately error remains: “AUTOBACKUP : Unable to store zipped backup file /var/www/html/scratch/autobackups/auto_db_dump_2020-07-02.zip ! Backup failed”

Uploaded log_2020-07-02.txt to the same location as before.

@dreedijk

Thank you for getting back to us.

We will check this with our team and get back to you.

@dreedijk

Can you please run the below command in location /var/www/html/scratch and share us the results

/usr/bin/mongodump --gzip --out /var/www/html/scratch/autobackups/dump --host localhost:27017 --db tonidostoragedb

2020-07-07T21:18:52.724+0200 Failed: error getting collections for database tonidostoragedb: error running listCollections. Database: tonidostoragedb Err: not authorized on tonidostoragedb to execute command { listCollections: 1, cursor: {}, $readPreference: { mode: “secondaryPreferred” }, $db: “tonidostoragedb” }

The database has been secured.

@dreedijk

Can you please add the below line in your FileCloud server’s cloudconfig.php. Please use the username and password of the secured database.

define(“AUTOBACKUP_MONGODUMP_PARAMS”, “–username userA --password password123 --authenticationDatabase admin”);

I have added the line (adjusted username and password) to the top of /var/www/html/thirdparty/simplesaml/config/filecloudconfig.php
Restarted the server and ran: /usr/bin/mongodump --gzip --out /var/www/html/scratch/autobackups/dump --host localhost:27017 --db tonidostoragedb in: /var/www/html/scratch
This resulted in the same error…

@dreedijk

Sorry I did not mention the exact location of the file to be edited. It is in
/var/www/html/config/cloudconfig.php

Add the above mention code. Then try from your side after clearing all the existing alerts.

Please let us know if this helps you.

Sorry about the file, I did adjust the file /var/www/html/config/cloudconfig.php and not /var/www/html/thirdparty/simplesaml/config/filecloudconfig.php

Then another problem occurred, where because of the copy and paste action the " where replaced by “ which caused a “white screen of death”

The code did not solve the problem however … when running the command it still throws the error" “2020-07-10T23:05:24.486+0200 Failed: error getting collections for database tonidostoragedb: error running listCollections. Database: tonidostoragedb Err: not authorized on tonidostoragedb to execute command { listCollections: 1, cursor: {}, $readPreference: { mode: “secondaryPreferred” }, $db: “tonidostoragedb” }”

Thanks @dreedijk

We will look into this and get back to you

@dreedijk

Can you run the below command after editing to your username and password for DB

/usr/bin/mongodump --username UserA --password password123 --gzip --out /var/www/ html/scratch/autobackups/dump --host localhost:27017 --db tonidostoragedb --authenticationDatabase admin

I think I found the problem. A stupid copy paste issue! When copying and pasting the above command, I got an error, because of a space in the path. I also noticed that the – was replaced by a single longer -
So corrected the issues and ran the command which now works like a charm! I’ll have a look if there are any alerts in the admin after tonight.

@dreedijk

Thank you for the update.

Problem seems to be solved! No more alerts!
Thanks!

@dreedijk

Happy to hear that the issue is solved :slight_smile: .