I just installed matomo on a new server and transferred my old server’s database. Everything looks good. I can see all my data and the system check is clean including MySQL drivers. When I run the archive application, I get this error:
ERROR [2023-11-14 19:07:21] 131279 Uncaught exception: /srv/matomo/libs/Zend/Db/Adapter/Pdo/Abstract.php(144): SQLSTATE[HY000] [2002] No such file or directory [Query: , CLI mode: 1]
[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] No such file or directory
Yet, the system check shows this:
PHP version >= 7.2.5
8.2.11
PDO extension
PDO\MYSQL extension
MYSQLI extension
Other required extensions
zlib
json
filter
hash
session
Required functions
debug_backtrace
eval
hash
gzcompress
gzuncompress
pack
Required PHP configuration (php.ini)
session.auto_start = 0
max_execution_time = 0 OR = -1 OR >= 30
Directories with write access
There are no errors in the detail report. I went through all of the searches i could think of and nothing newer than 2020 and no relevant help. I’m stuck. I’m running a new Ubuntu Bitnami instance on AWS.
Thanks
I changed the database location from “localhost” to “127.0.0.1” Now archiving runs, but I’m getting an error during the archiving run. I suspect a bad record in the database, but not sure how to find it. Here is the error:
INFO [2023-11-15 19:40:39] 323861 Skipped Archiving website id 1, period = year, date = 2023-01-01, segment = ‘’, 0 visits found. Time elapsed: 0.855s
INFO [2023-11-15 19:40:39] 323861 Finished archiving for site 1, 4 API requests, Time elapsed: 4.609s [1 / 3 done]
INFO [2023-11-15 19:40:39] 323861 Start processing archives for site 2.
Then, I get this error message at the end of the run:
INFO [2023-11-15 19:40:39] 323861 SUMMARY OF ERRORS
INFO [2023-11-15 19:40:39] 323861 Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2023-01-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:"The unserialization has failed! - in plugin Actions. #0 /srv/matomo/core/ArchiveProcessor/Loader.php(289): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins() #1 /srv/matomo/core/ArchiveProcessor/Loader.php(181): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive() #2 /srv/matomo/core/ArchiveProcessor/Loader.php(164): Piwik\ArchiveProcessor\Loader->insertArchiveData() #3 /srv/matomo/core/ArchiveProcessor/Loader.php(104): Piwik\ArchiveProcessor\Loader->prepareArchiveImpl() #4 /srv/matomo/core/Context.php(75): Piwik\ArchiveProcessor\Loader->Piwik\ArchiveProcessor\{closure}() #5 /srv/matomo/core/ArchiveProcessor/Loader.php(108): Piwik\Context::changeIdSite() #6 /srv/matomo/plugins/CoreAdminHome/API.php(294): Piwik\ArchiveProcessor\Loader->prepareArchive() #7 [internal function]: Piwik\Plugins\CoreAdminHome\API->archiveReports() #8 /srv/matomo/core/API/Proxy.php(244): call_user_func_array() #9 /srv/matomo/core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}() #10 /srv/matomo/core/API/Proxy.php(335): Piwik\Context::executeWithQueryParameters() #11 /srv/matomo/core/API/Request.php(267): Piwik\API\Proxy->call() #12 /srv/matomo/plugins/API/Controller.php(45): Piwik\API\Request->process() #13 [internal function]: Piwik\Plugins\API\Controller->index() #14 /srv/matomo/core/FrontController.php(637): call_user_func_array() #15 /srv/matomo/core/FrontController.php(169): Piwik\FrontController->doDispatch() #16 /srv/matomo/core/dispatch.php(32): Piwik\FrontController->dispatch() #17 /srv/matomo/index.php(25): require_once(’/srv/matomo/cor…‘) #18 /srv/matomo/core/CliMulti/RequestCommand.php(79): require_once(’/srv/matomo/ind…‘) #19 /srv/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\CliMulti\RequestCommand->execute() #20 /srv/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run() #21 /srv/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand() #22 /srv/matomo/core/Console.php(108): Symfony\Component\Console\Application->doRun() #23 [internal function]: Piwik\Console->originDoRun() #24 /srv/matomo/core/Console.php(147): call_user_func() #25 /srv/matomo/core/Access.php(670): Piwik\Console->Piwik\{closure}() #26 /srv/matomo/core/Console.php(148): Piwik\Access::doAsSuperUser() #27 /srv/matomo/core/Console.php(87): Piwik\Console->doRunImpl() #28 /srv/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun() #29 /srv/matomo/console(32): Symfony\Component\Console\Application->run() #30 {main}, caused by: The unserialization has failed! #0 /srv/matomo/core/DataTable.php(1461): Piwik\DataTable->unserializeRows() #1 /srv/matomo/core/DataTable.php(1936): Piwik\DataTable->addRowsFromSerializedArray() #2 /srv/matomo/core/ArchiveProcessor.php(400): Piwik\DataTable::fromSerializedArray() #3 /srv/matomo/core/ArchiveProcessor.php(375): Piwik\ArchiveProcessor->getAggregatedDataTableMapFromBlobs() #4 /srv/matomo/core/ArchiveProcessor.php(232): Piwik\ArchiveProcessor->aggregateDataTableRecord() #5 /srv/matomo/plugins/Actions/Archiver.php(649): Piwik\ArchiveProcessor->aggregateDataTableRecords() #6 /srv/matomo/core/Plugin/Archiver.php(108): Piwik\Plugins\Actions\Archiver->aggregateMultipleReports() #7 /srv/matomo/core/ArchiveProcessor/PluginsArchiver.php(173): Piwik\Plugin\Archiver->callAggregateMultipleReports() #8 /srv/matomo/core/ArchiveProcessor/Loader.php(289): Piwik\ArchiveProcessor\PluginsArchiver->callAggregateAllPlugins() #9 /srv/matomo/core/ArchiveProcessor/Loader.php(181): Piwik\ArchiveProcessor\Loader->prepareAllPluginsArchive() #10 /srv/matomo/core/ArchiveProcessor/Loader.php(164): Piwik\ArchiveProcessor\Loader->insertArchiveData() #11 /srv/matomo/core/ArchiveProcessor/Loader.php(104): Piwik\ArchiveProcessor\Loader->prepareArchiveImpl() #12 /srv/matomo/core/Context.php(75): Piwik\ArchiveProcessor\Loader->Piwik\ArchiveProcessor\{closure}() #13 /srv/matomo/core/ArchiveProcessor/Loader.php(108): Piwik\Context::changeIdSite() #14 /srv/matomo/plugins/CoreAdminHome/API.php(294): Piwik\ArchiveProcessor\Loader->prepareArchive() #15 [internal function]: Piwik\Plugins\CoreAdminHome\API->archiveReports() #16 /srv/matomo/core/API/Proxy.php(244): call_user_func_array() #17 /srv/matomo/core/Context.php(28): Piwik\API\Proxy->Piwik\API\{closure}() #18 /srv/matomo/core/API/Proxy.php(335): Piwik\Context::executeWithQueryParameters() #19 /srv/matomo/core/API/Request.php(267): Piwik\API\Proxy->call() #20 /srv/matomo/plugins/API/Controller.php(45): Piwik\API\Request->process() #21 [internal function]: Piwik\Plugins\API\Controller->index() #22 /srv/matomo/core/FrontController.php(637): call_user_func_array() #23 /srv/matomo/core/FrontController.php(169): Piwik\FrontController->doDispatch() #24 /srv/matomo/core/dispatch.php(32): Piwik\FrontController->dispatch() #25 /srv/matomo/index.php(25): require_once(’/srv/matomo/cor…‘) #26 /srv/matomo/core/CliMulti/RequestCommand.php(79): require_once(’/srv/matomo/ind…‘) #27 /srv/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(25 … un()\n#37 /srv/matomo/console(32): Symfony\Component\Console\Application->run()\n#38 {main}"}’
ERROR [2023-11-15 19:40:39] 323861 1 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2023-11-15 19:40:39] 323861 Uncaught exception: /srv/matomo/core/CronArchive.php(631): 1 total errors during this script execution, please investigate and try and fix these errors. [Query: , CLI mode: 1]
[Exception]
1 total errors during this script execution, please investigate and try and fix these errors.
core:archive [–url=“…”] [–skip-idsites[=“…”]] [–skip-all-segments] [–force-idsites[=“…”]] [–skip-segments-today] [–force-periods[=“…”]] [–force-date-last-n[=“…”]] [–force-date-range[=“…”]] [–force-idsegments=“…”] [–concurrent-requests-per-website[=“…”]] [–concurrent-archivers[=“…”]] [–max-websites-to-process=“…”] [–max-archives-to-process=“…”] [–disable-scheduled-tasks] [–accept-invalid-ssl-certificate] [–php-cli-options[=“…”]] [–force-all-websites] [–force-report[=“…”]]
Hi @bobwalter
Did you also update Matomo version? Which version do you run?
Closing this topic in favor of:
I noted a previous problem when archiving “Year” data for a single site. I noticed that I get exactly the same error for any of three sites I track. I checked the database and can’t find any issues with the numeric archive data for 2023 (sited in the error). Below is the output of a typical run.
INFO [2023-11-15 19:40:39] 323861 Skipped Archiving website id 1, period = year, date = 2023-01-01, segment = ‘’, 0 visits found. Time elapsed: 0.855s
INFO [2023-11-15 19:40:39] 323861 Finished archivi…