@jkjha opened this Issue on July 6th 2018

This is embarrassing.. my matomo instance has suddenly stopped working today and it is throwing this error on UI when I visit the url:

syntax error, unexpected ''/var/www/html/plugins/VisitTi' (T_ENCAPSED_AND_WHITESPACE), expecting ')'

I am loosing my critical important tracking data. Assuming this is free and reliable, we started using this but now I am stuck.

Business support is too costly and we can't afford that.. can anyone please have a look into this urgently.

My Matomo version is 3.4.0

Let me know if you need more information.

@Findus23 commented on July 6th 2018 Member

Quick answer: look into the file the error mentions. Maybe it got corrupted.

Alternative would be replacing al files except for the config with the latest Matomo download (or even better download 3.4.0 from http://builds.matomo.org and after you fixed the issue update Matomo)

@jkjha commented on July 6th 2018

The problem is I have limited matomo server access , so I can't perform write operations there. Is there a way I can solve this from UI (browser)..

@huang0808 commented on July 6th 2018

I see your erro informaton, you firstly deactivate the plugin(var/www/html/plugins/VisitTi). Login Server, and enter your application run ./console plugin:deactivate pluginname.

@Findus23 commented on July 6th 2018 Member

@jkjha
It would also help to see the full error. (e.g. from the php error_log)

There is no VisitTi, but just a VisitTime plugin. You can try disabling the plugin, but that isn't really a sulution as this plugin is quite required.

I would contact someone who has write access to your server

@jkjha commented on July 6th 2018

Thanks @Findus23 I have requested for write access to the server.. may be in some time I will get that..
I can disable the plugin as you suggested once I get the access.
But any suggestion how I can have a real fix for this?
I will provide more info in some time

@jkjha commented on July 6th 2018

here is more error.. I am not able to even deactivate the plugin

user<a class='mention' href='https://github.com/host'>@host</a>-server:/var/www/html$ ./console plugin:deactivate VisitTime
Uncaught exception: syntax error, unexpected ''/var/www/html/plugins/VisitTi' (T_ENCAPSED_AND_WHITESPACE), expecting ')'
in /var/www/html/tmp/cache/tracker/eagercache-340-ui.php line 4709
<a href='/0'>#0</a> /var/www/html/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PhpFileCache.php(63): Doctrine\Common\Cache\PhpFileCache->includeFileForId('eagercache-340-...')
<a href='/1'>#1</a> /var/www/html/vendor/piwik/cache/src/Backend/File.php(54): Doctrine\Common\Cache\PhpFileCache->doContains('eagercache-340-...')
<a href='/2'>#2</a> /var/www/html/vendor/piwik/cache/src/Backend/Chained.php(41): Piwik\Cache\Backend\File->doContains('eagercache-340-...')
<a href='/3'>#3</a> /var/www/html/vendor/piwik/cache/src/Eager.php(49): Piwik\Cache\Backend\Chained->doFetch('eagercache-340-...')
<a href='/4'>#4</a> /var/www/html/config/global.php(46): Piwik\Cache\Eager->__construct(Object(Piwik\Cache\Backend\Chained), 'eagercache-340-...')
<a href='/5'>#5</a> [internal function]: DI\Definition\Source\DefinitionFile->{closure}(Object(DI\Container))
<a href='/6'>#6</a> /var/www/html/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array(Object(Closure), Array)
<a href='/7'>#7</a> /var/www/html/vendor/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php(81): Invoker\Invoker->call(Object(Closure), Array)
<a href='/8'>#8</a> /var/www/html/vendor/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php(58): DI\Definition\Resolver\FactoryResolver->resolve(Object(DI\Definition\FactoryDefinition), Array)
<a href='/9'>#9</a> /var/www/html/vendor/php-di/php-di/src/DI/Container.php(287): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\FactoryDefinition), Array)
<a href='/10'>#10</a> /var/www/html/vendor/php-di/php-di/src/DI/Container.php(124): DI\Container->resolveDefinition(Object(DI\Definition\FactoryDefinition))
<a href='/11'>#11</a> /var/www/html/core/Container/StaticContainer.php(80): DI\Container->get('Piwik\\Cache\\Eag...')
<a href='/12'>#12</a> /var/www/html/core/Cache.php(56): Piwik\Container\StaticContainer::get('Piwik\\Cache\\Eag...')
<a href='/13'>#13</a> /var/www/html/core/Plugin.php(134): Piwik\Cache::getEagerCache()
<a href='/14'>#14</a> /var/www/html/core/Plugin/Manager.php(971): Piwik\Plugin->__construct()
<a href='/15'>#15</a> /var/www/html/core/Plugin/Manager.php(932): Piwik\Plugin\Manager->makePluginClass('CorePluginsAdmi...')
<a href='/16'>#16</a> /var/www/html/core/Plugin/Manager.php(853): Piwik\Plugin\Manager->loadPlugin('CorePluginsAdmi...')
<a href='/17'>#17</a> /var/www/html/core/Plugin/Manager.php(838): Piwik\Plugin\Manager->reloadActivatedPlugin('CorePluginsAdmi...', Array)
<a href='/18'>#18</a> /var/www/html/core/Plugin/Manager.php(690): Piwik\Plugin\Manager->reloadActivatedPlugins()
<a href='/19'>#19</a> /var/www/html/core/Plugin/Manager.php(105): Piwik\Plugin\Manager->loadPlugins(Array)
<a href='/20'>#20</a> /var/www/html/core/Console.php(204): Piwik\Plugin\Manager->loadActivatedPlugins()
<a href='/21'>#21</a> /var/www/html/core/Console.php(66): Piwik\Console::initPlugins()
<a href='/22'>#22</a> /var/www/html/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
<a href='/23'>#23</a> /var/www/html/console(27): Symfony\Component\Console\Application->run()
<a href='/24'>#24</a> {main}
@jkjha commented on July 6th 2018

this is the content from the cache (eagercache-340-ui.php)

    'PluginVisitTimeReports\\Piwik\\Plugin\\Report' =>
    array (
      '/var/www/html/plugins/VisitTime/Reports/GetByDayOfWeek.php' => 'Piwik\\Plugins\\VisitTime\\Reports\\GetByDayOfWeek',
      '/var/www/html/plugins/VisitTime/Reports/GetVisitInformationPerLocalTime.php' => 'Piwik\\Plugins\\VisitTime\\Reports\\GetVisitInformationPerLocalTime',
      '/var/www/html/plugins/VisitTime/

I had pasted last few lines.. as you can see this array seems uncomplete

@fdellwing commented on July 6th 2018 Contributor

As this is a cache file, you should be able to fix that by simply deleting the file.

@jkjha commented on July 6th 2018

yes, i was scared of deleting it.. but after simply deleting this it worked well.
Thanks for your time.
Meanwhile, can you please help me understand why this had happened.

@fdellwing commented on July 6th 2018 Contributor

That is an interesting question, but I don't think it is worth the time (if it does not happen again of course).

@jkjha commented on July 6th 2018

yes, you may be right.
I am closing this PR, if anyone else faces this issue, feel free to reopen it.
Really appreciate @fdellwing @Findus23 @huang0808 for your timely help.

@jkjha commented on July 7th 2018

OK, so I was able to find the root cause of this and able to reproduce this scenario.
This happens when server storage gets filled and there is no space to write in the cache log... that's why piwik could not write complete log inside cache "eagercache-340-ui.php" , and it causes syntax error.

Cleaning up the cache files and freeing up some more space, fixed this issue.

@jkjha commented on July 7th 2018

my bad, reopened by mistake.

@fdellwing commented on July 9th 2018 Contributor

@tsteur @mattab Should Matomo handle this case? Could be hard, but maybe..mh..if tmp dir has less than N mb free space, don't write anything there and show a integrity warning? I think there is not really a nice way to handle this, sadly.

@mattab commented on August 28th 2018 Member

@fdellwing Good idea, something like this would be possible I think :+1: maybe a new diagnostic that checks there is at least a few Mb of free disk so we can write caches etc. Could you maybe create a new issue as this one is closed?

This Issue was closed on July 7th 2018
Powered by GitHub Issue Mirror