Nextcloud cron job - samba gencache_init error

Just FYI. Not reproducible at the moment.

Error message (happened only one time, directory does not exist)

gencache_init: Failed to create directory: /usr/share/httpd/.cache/samba - No such file or directory

Nextcloud apps
External storages (with a configured samba share)

Packages

httpd-2.4.6-97.el7.centos.x86_64
nethserver-nextcloud-1.15.0-1.ns7.noarch
nethserver-httpd-3.11.4-1.ns7.noarch
nethserver-rh-php73-php-fpm-1.0.0-1.ns7.noarch
nethserver-samba-4.5.5-1.ns7.noarch
samba-4.10.16-7.el7_9.x86_64
samba-client-4.10.16-7.el7_9.x86_64
php-smbclient-0.9.0-1.el7.x86_64
sclo-php73-php-smbclient-1.0.0-2.el7.x86_64
libsmbclient-4.10.16-7.el7_9.x86_64

Resolution
No resolution. Error happened only one time.
Update action taken after the error:

nethserver-httpd-3.11.5-1.ns7.noarch
nethserver-nextcloud-1.16.0-1.ns7.noarch
Unrelated

Warnings after Nextcloud update from 20.0.1 to 20.0.2:

The database is missing some primary keys. Due to the fact that adding primary keys on big tables could take some time they were not added automatically. By running "occ db:add-missing-primary-keys" those missing primary keys could be added manually while the instance keeps running.

    Missing primary key on table "oc_federated_reshares".
    Missing primary key on table "oc_systemtag_object_mapping".
    Missing primary key on table "oc_comments_read_markers".
    Missing primary key on table "oc_collres_resources".
    Missing primary key on table "oc_collres_accesscache".
    Missing primary key on table "oc_filecache_extended".

Solved as per the self-explanatory message:

sudo -u apache scl enable rh-php73 -- php -dmemory_limit=512M /usr/share/nextcloud/occ db:add-missing-primary-keys
2 Likes

Happened to me too: error message every quarter of an hour.

Probably due to the fact that in external storage there is a configuration to share users’ home directories.

Since not all Nextcloud users have a home directory created, on Nethserver in cockpit I created a group containing the users with the home present (the users created by Nethserver cockpit) and I applied this group as “permission” to the home in nextcloud external shares.

This way I no longer have the error and users created in Nextcloud no longer have a connection error to their home directory that does not exist.

1 Like

Hi everyone, after updating the server to version 7.9, I received an error email twice about the php script on nextcloud.

I have followed the directions but the error is very random. I ask you if it could be that the error is generated if the network shares configured in nextcloud fail to synchronize due to network problems, so no folder to synchronize. It’s just a technical doubt, maybe it doesn’t have anything to do with it!

The only workaround I’ve found is:

mkdir /usr/share/httpd/.cache
chown apache /usr/share/httpd/.cache

It seems that the problem has been reported to Red Hat:

2 Likes