Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: FreebSD 12.2 + PHP 7.4 + Matomo 4.1.1 #17186

Closed
vsatmydynipnet opened this issue Feb 3, 2021 · 2 comments
Closed

BUG: FreebSD 12.2 + PHP 7.4 + Matomo 4.1.1 #17186

vsatmydynipnet opened this issue Feb 3, 2021 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@vsatmydynipnet
Copy link

FreeBSD 12.2
Matomo-Version: 4.1.1
MySQL-Version: 5.6.50
PHP-Version: 7.4.14
python37-3.7.9

Problem: Script to import Log Files fails since Update from 3.14 to 4.1.1 with:

importing Matomo ID 8 from partnerwelt.domain.tld without botsFatal error: php /usr/local/www/matomo/misc/cron/updatetoken.php --matomo-domain=analytics.domain.tld failed with error: PHP Fatal error: Uncaught InvalidArgumentException: The directory "/usr/local/www/matomo/tmp/cache/tracker/" does not exist and could not be created. in /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:84

Directory exists and is owned by www, as are the subdirs and files. All is accessible.

Log

HANDLING: /var/log/www/2021/02/02/ssl_request.log
importing Matomo ID 8 from partnerwelt.domain.tld without botsFatal error: php /usr/local/www/matomo/misc/cron/updatetoken.php --matomo-domain=analytics.domain.tld failed with error: PHP Fatal error: Uncaught InvalidArgumentException: The directory "/usr/local/www/matomo/tmp/cache/tracker/" does not exist and could not be created. in /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:84
Stack trace:
#0 /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php(33): Doctrine\Common\Cache\FileCache->__construct('/usr/local/www/...', '.php', 2)
#1 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/File.php(40): Doctrine\Common\Cache\PhpFileCache->__construct('/usr/local/www/...', '.php')
#2 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(22): Matomo\Cache\Backend\File->__construct('/usr/local/www/...')
#3 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(96): Matomo\Cache\Backend\Factory->buildFileCache(Array)
#4 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(41): Matomo\Cache\Backend\Factory->buildBackend('file', Array)
#5 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(100) in /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php on line 84
.
Reponse code was: 255. You can alternatively run the importer using the --login and --password option
system /usr/local/bin/python3.7 /usr/local/www/matomo/misc/log-analytics/import_logs.py --url=https://analytics.domain.tld/analytics/ --idsite=8 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static ~/sv03.domain.tld.output.tmp failed: 256importing Matomo ID 9 from partnerwelt.domain.tld without botsFatal error: php /usr/local/www/matomo/misc/cron/updatetoken.php --matomo-domain=analytics.domain.tld failed with error: PHP Fatal error: Uncaught InvalidArgumentException: The directory "/usr/local/www/matomo/tmp/cache/tracker/" does not exist and could not be created. in /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php:84
Stack trace:
#0 /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php(33): Doctrine\Common\Cache\FileCache->__construct('/usr/local/www/...', '.php', 2)
#1 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/File.php(40): Doctrine\Common\Cache\PhpFileCache->__construct('/usr/local/www/...', '.php')
#2 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(22): Matomo\Cache\Backend\File->__construct('/usr/local/www/...')
#3 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(96): Matomo\Cache\Backend\Factory->buildFileCache(Array)
#4 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(41): Matomo\Cache\Backend\Factory->buildBackend('file', Array)
#5 /usr/local/www/matomo/vendor/matomo/cache/src/Backend/Factory.php(100) in /usr/local/www/matomo/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php on line 84
.
Reponse code was: 255. You can alternatively run the importer using the --login and --password option
system /usr/local/bin/python3.7 /usr/local/www/matomo/misc/log-analytics/import_logs.py --url=https://analytics.domain.tld/analytics/ --idsite=9 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots ~/sv03.domain.tld.output.tmp failed: 256Press any key to continue...
$ ./LOAD_sv03_partnerwelt_matomo_date-1.pl

Permissions:

pwd
/usr/local/www/matomo/tmp

ls -lR cache
total 16
-rw-rw-r-- 1 www www 20 Feb 3 16:47 index.htm
-rw-rw-r-- 1 www www 20 Feb 3 16:47 index.php
-rw-r--r-- 1 www www 47 Jan 28 04:34 token.php
drwxrwxr-x 2 www www 3584 Feb 3 16:51 tracker

cache/tracker:
total 3432
-rw-rw-r-- 1 www www 218694 Feb 3 16:28 eagercache-411-tracker.php
-rw-rw-r-- 1 www www 305782 Feb 3 15:41 eagercache-411-ui.php
-rw-rw-r-- 1 www www 3230 Feb 3 16:51 matomocache_1.php
-rw-rw-r-- 1 www www 1066 Feb 3 15:03 matomocache_10.php

@diosmosis
Copy link
Member

@vsatmydynipnet what user did you run the import_logs.py script with? Will it work if you run it with the www user?

(Note: you can also set the token auth manually via the --token-auth parameter)

@diosmosis diosmosis added the Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data label Feb 4, 2021
@vsatmydynipnet
Copy link
Author

Just found out that a FreeBSD 11 to 12 updated removed the user running the import from the www group. Sorry for the noise and thank you for this great peace of software.

@Findus23 Findus23 added answered For when a question was asked and we referred to forum or answered it. and removed Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data labels Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants