"core" commands missing


#1

Usinig Piwik 2.0.2
Trying to get automated reports to work - to be sent monthly.

Following instructions on: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
using something like (customised to our installation of course)


/usr/bin/php5 /path/to/piwik/console core:archive --url=http://example.org/piwik/

The cron call fails.
Calling from the command line fails too. I get:


[InvalidArgumentException]
  There are no commands defined in the "core" namespace.

Just calling


/usr/bin/php5 /path/to/piwik/console core

I get:


[InvalidArgumentException]
  Command "core" is not defined.

Doing a plain “console”, I get

…piwik/console


Console Tool

Usage:
  [options] command [arguments]

Options:
  --help           -h Display this help message.
  --quiet          -q Do not output any message.
  --verbose        -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  --version        -V Display this application version.
  --ansi              Force ANSI output.
  --no-ansi           Disable ANSI output.
  --no-interaction -n Do not ask any interactive question.

Available commands:
  help                                   Displays help for a command
  list                                   Lists commands
development
  development:sync-ui-test-screenshots   This command is intended for Piwik core developers. It copies all processed screenshot tests on Travis to the expected screenshot directory.
generate
  generate:api                           Adds an API to an existing plugin
  generate:command                       Adds a command to an existing plugin
  generate:controller                    Adds a Controller to an existing plugin
  generate:plugin                        Generates a new plugin/theme including all needed files
  generate:settings                      Adds a plugin setting class to an existing plugin
  generate:test                          Adds a test to an existing plugin
  generate:theme                         Generates a new plugin/theme including all needed files
  generate:visualizationplugin           Generates a new visualization plugin including all needed files
git
  git:commit                             Commit
  git:pull                               Pull Piwik repo and all submodules
  git:push                               Push Piwik repo and all submodules
log
  log:watch                              Outputs the last parts of the log files and follows as the log file grows. Does not work on Windows
tests
  tests:coverage                         Run all phpunit tests and generate a combined code coverage
  tests:run                              Run Piwik PHPUnit tests one group after the other
translations
  translations:createpull                Updates translation files
  translations:fetch                     Fetches translations files from oTrance to tmp/oTrance
  translations:languagecodes             Shows available language codes
  translations:languagenames             Shows available language names
  translations:plugins                   Shows all plugins that have own translation files
  translations:set                       Sets new translations for a given language
  translations:update                    Updates translation files

No core: commands are shown.
Thanks for any clues
JC


#2

I took the plunge and upgraded to 2.7.0 (my 1st upgrade)
That seems to have worked (very impressive)
and now the core:archive command works


(Matthieu Aubry) #3

Very nice to hear this!


#4

I have the same issue on v2.11.2 and I cannot downgrade because of the database changes. What can I dot?
I already have opened a issue on github but it seems that this is not a common problem so I can’t find any hints to fix it.

Please help.


#5

Hi,

Just to let you know.

I’m on a Synology NAS and have a cron doing:

chown -R http:http /volume1/web/abc.xyz.ZZ && /usr/bin/php /volume1/web/abc.xyz.ZZ/console core:archive --url=http://abc.xyz.ZZ/

The chown was needed because somehow and sometimes the owner of some dirs was changed to root.root and then it all stopped working.
Now it does process all without hickups.
Version 2.11.2

Regards,
Denozo


#6

Your cron is running as a root user, thats why all the files the jobs is creating (in piwik/tmp) are belonging to the root user, and the the http user can´t read them when you work in your browser. Thats why it snot working. Use ACLs

But I´m running piwik as wwwrun only, I even uploaded the zip as wwwrun and unpacked with a php script to avoid those filesystem issues.


#7

Hi Jochenb,

I know about this. The cronjob is already running as http user.
It has something to do with the updates or jobs done by the Synology. Never bothered to investigate further.
I just gave my 2cents for it can cause the Piwik cronjob to fail altogether.

Regards,
Denozo


#8

I had this problem too, it seems to have been caused by my webserver user taking ownership of some directories in piwik/tmp which caused the console to not be able to write to them. I chmod -R 777 piwik/tmp and it worked.