Piwik 2.1.0 - Archive.php: Got invalid response from API request


#1

Hello,

I have also problems with archive.php since Piwik 2.1.0.

I am running the process on Synology NAS and thisi is the error message :

======================================================================

ps: invalid option – 'e’
BusyBox v1.16.1 (2014-03-06 14:29:34 CST) multi-call binary.

Usage: ps

Report process status

Options:
w Wide output

Error in the last Piwik archive.php run:
The Piwik URL Sign in - Piwik does not seem to be pointing to a Piwik server. Response was ‘’.

Here is the full errors output:


INIT
Piwik is installed at: Sign in - Piwik
Running Piwik 2.1.1-b10 as Super User: spocky
ERROR: Got invalid response from API request: http://piwik.lejardindeschimeres.org/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.

===============================================

The problem seems coming from the fact that the commande “ps -e” is used somewhere but under Synology the “e” option is not valid. Would it be possible to help me to locate where this command is used in the script in order to get rid-off the “e” option ?

Best Regards,
Bruno


(Matthieu Aubry) #2

The line is here: matomo/Process.php at master · matomo-org/matomo · GitHub

but really we should fix the actual bug. do you know what linux version you use? can you try uname -a command?

how do we detect that the server is running Synology NAS ?


#3

Hello,

This is the answer from “uname -a”

— Linux DiskStation 3.2.40 #4458 SMP Thu Mar 20 22:09:30 CST 2014 x86_64 GNU/Linux synology_cedarview_412+

Looks like the word “synology” is included in the answer.

Regards,
Bruno


#4

Hello,

I can confirm that after removing the “-e” option the archive script if functional again on Synology NAS.

Thanks for your help. If you need extra inputs from my side dont hesitate to ask.

Regards,
Bruno.


(Matthieu Aubry) #5

Thanks Bruno, I created and fixed this bug: Archiving should work on Synology NAS devices · Issue #4957 · matomo-org/matomo · GitHub

please put back the -e first, then test the patch and report if it still does not work, thanks!


#6

Hello,

It doesn’t work but I know why :slight_smile:

The command php_uname() returns " Linux DiskStation 3.2.40 #4458 SMP Thu Mar 20 22:09:30 CST 2014 x86_64 ", it doesn’t return exactly what uname -a does in a terminal (don’t ask me why …)

So, I replaced your line $uname=php_uname() by $uname = shell_exec(‘uname -a’) and BINGO ! we got what uname -a is returning in a shell.

Regards,
Bruno


(Matthieu Aubry) #7

Thanks for letting me know: is it better: Refs #4957 Proper fix (thanks for feedback!) · matomo-org/matomo@0d716d4 · GitHub ?


#8

That’s Perfect :slight_smile:

Regards,
Bruno