tmp501
(philip ballinger)
September 24, 2022, 3:23pm
1
NethServer Version: 7.9.2009
hi, i had to swap my NS boot harddrive, restoring the backup gave me some issues so i decided to do a fresh install. system install was easy - installed nextcloud through applications, put it in maintainance and replaced the NC dir with my backup ( /var/lib/nethserver/nextcloud), imported the db and all is good.
but i got spammed by the mail delivery system that this msg could not be delivered.
<office@domain.com > (expanded from ): host
http://mail.domain.com [http://pub-ip ] said: 550 Message rejected as spam (in reply
to end of DATA command)
looked into postfix stuff…
/etc/postfix/canonical
root mail@domain.info
eventually i disabled the spam filter on my email account and mails go through. not sure if thats how it should be? did not do this on my old system, but then maybe the mails just did not get sent. anyway… now i get the error msg once every hour
Cron apache@tank php -f /usr/share/nextcloud/cron.php
PHP Warning: Unsupported declare ‘strict_types’ in /usr/share/nextcloud/lib/versioncheck.php on line 3
This version of Nextcloud requires at least PHP 7.4 You are currently running 5.4.16. Please update your PHP version.
i got unsure if my hostname really should be tank.domain.com and not just domain.com ?
thanks, phil
sudo -u apache scl enable rh-php73 – php -dmemory_limit=512M -f /usr/share/nextcloud/cron.php
This version of Nextcloud requires at least PHP 7.4 You are currently running 7.3.33. Please update your PHP version.
sudo -u apache /usr/bin/scl enable php80 – php -dmemory_limit=512M -f /usr/share/nextcloud/cron.php
OCP\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)
dnutan
(Marc)
September 25, 2022, 10:48am
2
Regarding Nextcloud, can you provide this info?
occ --version
grep "'version'" /usr/share/nextcloud/config/config.php
grep -ri nextcloud /etc/cron*
rpm -qa *php*|sort
tmp501
(philip ballinger)
September 25, 2022, 1:17pm
3
hey marc - of course, thanks for looking into that!
occ --version
Nextcloud 24.0.5
grep “‘version’” /usr/share/nextcloud/config/config.php
'version' => '24.0.5.1',
grep -ri nextcloud /etc/cron*
/etc/cron.d/nextcloud:*/60 * * * * apache /usr/bin/scl enable php80 -- php -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php
rpm -qa php |sort
gd3php-2.3.3-7.el7.remi.x86_64
nethserver-php-1.3.0-1.ns7.noarch
nethserver-remi-php80-php-fpm-1.0.0-1.ns7.noarch
nethserver-rh-php73-php-fpm-1.0.0-1.ns7.noarch
oniguruma5php-6.9.8-1.el7.remi.x86_64
php-5.4.16-48.el7.x86_64
php80-1.0-3.el7.remi.x86_64
php80-php-bcmath-8.0.23-1.el7.remi.x86_64
php80-php-cli-8.0.23-1.el7.remi.x86_64
php80-php-common-8.0.23-1.el7.remi.x86_64
php80-php-enchant-8.0.23-1.el7.remi.x86_64
php80-php-fpm-8.0.23-1.el7.remi.x86_64
php80-php-gd-8.0.23-1.el7.remi.x86_64
php80-php-gmp-8.0.23-1.el7.remi.x86_64
php80-php-imap-8.0.23-1.el7.remi.x86_64
php80-php-intl-8.0.23-1.el7.remi.x86_64
php80-php-ldap-8.0.23-1.el7.remi.x86_64
php80-php-mbstring-8.0.23-1.el7.remi.x86_64
php80-php-mysqlnd-8.0.23-1.el7.remi.x86_64
php80-php-opcache-8.0.23-1.el7.remi.x86_64
php80-php-pdo-8.0.23-1.el7.remi.x86_64
php80-php-pecl-apcu-5.1.20-1.el7.remi.x86_64
php80-php-pecl-imagick-im6-3.7.0-1.el7.remi.x86_64
php80-php-pecl-zip-1.19.4-1.el7.remi.x86_64
php80-php-pgsql-8.0.23-1.el7.remi.x86_64
php80-php-process-8.0.23-1.el7.remi.x86_64
php80-php-smbclient-1.0.6-1.el7.remi.x86_64
php80-php-soap-8.0.23-1.el7.remi.x86_64
php80-php-sodium-8.0.23-1.el7.remi.x86_64
php80-php-tidy-8.0.23-1.el7.remi.x86_64
php80-php-xml-8.0.23-1.el7.remi.x86_64
php80-runtime-1.0-3.el7.remi.x86_64
php-cli-5.4.16-48.el7.x86_64
php-common-5.4.16-48.el7.x86_64
php-intl-5.4.16-48.el7.x86_64
php-xml-5.4.16-48.el7.x86_64
rh-php73-1-1.el7.x86_64
rh-php73-php-bcmath-7.3.33-1.el7.x86_64
rh-php73-php-cli-7.3.33-1.el7.x86_64
rh-php73-php-common-7.3.33-1.el7.x86_64
rh-php73-php-enchant-7.3.33-1.el7.x86_64
rh-php73-php-fpm-7.3.33-1.el7.x86_64
rh-php73-php-gd-7.3.33-1.el7.x86_64
rh-php73-php-gmp-7.3.33-1.el7.x86_64
rh-php73-php-intl-7.3.33-1.el7.x86_64
rh-php73-php-json-7.3.33-1.el7.x86_64
rh-php73-php-ldap-7.3.33-1.el7.x86_64
rh-php73-php-mbstring-7.3.33-1.el7.x86_64
rh-php73-php-mysqlnd-7.3.33-1.el7.x86_64
rh-php73-php-opcache-7.3.33-1.el7.x86_64
rh-php73-php-pdo-7.3.33-1.el7.x86_64
rh-php73-php-pear-1.10.9-1.el7.noarch
rh-php73-php-pecl-apcu-5.1.17-1.el7.x86_64
rh-php73-php-pgsql-7.3.33-1.el7.x86_64
rh-php73-php-process-7.3.33-1.el7.x86_64
rh-php73-php-soap-7.3.33-1.el7.x86_64
rh-php73-php-xml-7.3.33-1.el7.x86_64
rh-php73-php-zip-7.3.33-1.el7.x86_64
rh-php73-runtime-1-1.el7.x86_64
sclo-php73-php-imap-7.3.11-1.el7.x86_64
sclo-php73-php-pecl-imagick-3.4.4-3.el7.x86_64
sclo-php73-php-smbclient-1.0.0-2.el7.x86_64
sclo-php73-php-tidy-7.3.11-1.el7.x86_64
this command executes without any issues
sudo -u apache /usr/bin/scl enable php80 -- php -dmemory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php
thats the email i get every hour
PHP Warning: Unsupported declare 'strict_types' in /usr/share/nextcloud/lib/versioncheck.php on line 3
This version of Nextcloud requires at least PHP 7.4<br/>You are currently running 5.4.16. Please update your PHP version.
cat /var/log/cron
Sep 25 15:00:01 tank CROND[24428]: (apache) CMD (php -f /usr/share/nextcloud/cron.php)
Sep 25 15:00:01 tank CROND[24429]: (apache) CMD (/usr/bin/scl enable php80 -- php -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php)
Sep 25 15:01:01 tank CROND[24688]: (root) CMD (run-parts /etc/cron.hourly)
Sep 25 15:01:01 tank run-parts(/etc/cron.hourly)[24688]: starting 0anacron
Sep 25 15:01:01 tank run-parts(/etc/cron.hourly)[24699]: finished 0anacron
systemctl -l status rh-php73-php-fpm rh-mariadb105-mariadb@nextcloud.service
● rh-php73-php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/rh-php73-php-fpm.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/rh-php73-php-fpm.service.d
└─nethserver-rh-php73-php-fpm.conf
Active: active (running) since Sat 2022-09-24 13:59:54 CEST; 1 day 1h ago
Main PID: 19029 (php-fpm)
Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 6
Memory: 23.6M
CGroup: /system.slice/rh-php73-php-fpm.service
├─ 8679 php-fpm: pool www
├─ 8680 php-fpm: pool www
├─ 8681 php-fpm: pool www
├─ 8682 php-fpm: pool www
├─ 8683 php-fpm: pool www
└─19029 php-fpm: master process (/etc/opt/rh/rh-php73/php-fpm.conf
Sep 24 13:59:54 my.domain.com systemd[1]: Starting The PHP FastCGI Process Manager...
Sep 24 13:59:54 my.domain.com systemd[1]: Started The PHP FastCGI Process Manager.
Sep 24 21:45:58 my.domain.com systemd[1]: Reloading The PHP FastCGI Process Manager.
Sep 24 21:45:58 my.domain.com systemd[1]: Reloaded The PHP FastCGI Process Manager.
Sep 24 23:14:01 my.domain.com systemd[1]: Reloading The PHP FastCGI Process Manager.
Sep 24 23:14:01 my.domain.com systemd[1]: Reloaded The PHP FastCGI Process Manager.
● rh-mariadb105-mariadb@nextcloud.service - MariaDB 10.5 database server
Loaded: loaded (/etc/systemd/system/rh-mariadb105-mariadb@.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/rh-mariadb105-mariadb@nextcloud.service.d
└─nethserver.conf
Active: active (running) since Sat 2022-09-24 21:33:18 CEST; 17h ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 26033 (mysqld)
Status: "Taking your SQL requests now..."
CGroup: /system.slice/system-rh\x2dmariadb105\x2dmariadb.slice/rh-mariadb105-mariadb@nextcloud.service
└─26033 /opt/rh/rh-mariadb105/root/usr/libexec/mysqld --defaults-group-suffix=.nextcloud --basedir=/opt/rh/rh-mariadb105/root/usr
Sep 24 21:33:18 my.domain.com systemd[1]: Starting MariaDB 10.5 database server...
Sep 24 21:33:18 my.domain.com scl[25988]: Database MariaDB is probably initialized in /var/opt/rh/rh-mariadb105/lib/mysql-nextcloud already, nothing is done.
Sep 24 21:33:18 my.domain.com scl[25988]: If this is not the case, make sure the /var/opt/rh/rh-mariadb105/lib/mysql-nextcloud is empty before running mysql-prepare-db-dir.
Sep 24 21:33:18 my.domain.com mysqld-scl-helper[26033]: 2022-09-24 21:33:18 0 [Note] /opt/rh/rh-mariadb105/root/usr/libexec/mysqld (mysqld 10.5.16-MariaDB) starting as process 26033 ...
Sep 24 21:33:18 my.domain.com systemd[1]: Started MariaDB 10.5 database server.
dnutan
(Marc)
September 25, 2022, 4:22pm
4
where does that task comes from? (it runs before the one that is using php8)
occ background:cron
grep -ri nextcloud /var/spool/cron /etc/anacrontab /etc/cron.d /etc/crontab
tmp501
(philip ballinger)
September 25, 2022, 4:48pm
5
hmm… no idea…
occ background:cron
Set mode for background jobs to 'cron'
grep -ri nextcloud /var/spool/cron /etc/anacrontab /etc/cron.d /etc/crontab
/var/spool/cron/apache:*/60 * * * * php -f /usr/share/nextcloud/cron.php
/etc/cron.d/nextcloud:*/60 * * * * apache /usr/bin/scl enable php80 -- php -d memory_limit=512M -d apc.enable_cli=1 -f /usr/share/nextcloud/cron.php
dnutan
(Marc)
September 25, 2022, 4:53pm
6
There it is. Most probably it comes from an old crontab job:
crontab -l -u apache
If the nextcloud job is the only entry, you can remove the whole apache crontab with:
crontab -ri -u apache
If the crontab contains other jobs, then you can edit the apache crontab and remove the nextcloud job:
contrab -e -u apache
1 Like
tmp501
(philip ballinger)
September 25, 2022, 5:04pm
7
sweet! i removed it entirely. ill let you know if i get an email in the next hour - thank you!
1 Like