PIWIK: Archive Cron funktioniert nach Portupgrade nicht mehr: Lösung
Nachdem ich auf dem Server diverse Ports auf die neuste Version geupgraded hatte, funktionierte plötzlich der archive.php Cronjob nicht mehr. Folgender Fehler tauchte auf:
Starting archiving INFO [2014-02-17 12:05:03] [f4860] --------------------------- INFO [2014-02-17 12:05:03] [f4860] INIT INFO [2014-02-17 12:05:03] [f4860] Querying Piwik API at: http://analyze.example.com/index.php INFO [2014-02-17 12:05:03] [f4860] Running Piwik 2.0.4-b12 as Super User: sunci INFO [2014-02-17 12:10:03] [f4860] ERROR: Got invalid response from API request: http://analyze.example.com/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'curl_exec: Connection timed out after 300220 milliseconds' INFO [2014-02-17 12:10:03] [f4860] ERROR: The Piwik URL http://analyze.example.com/index.php does not seem to be pointing to a Piwik server. Response was ''. Error in the last Piwik archive.php run: The Piwik URL http://analyze.example.com/index.php does not seem to be pointing to a Piwik server. Response was ''. Here is the full errors output: --------------------------- INIT Querying Piwik API at: http://analyze.example.com/index.php Running Piwik 2.0.4-b12 as Super User: teslina ERROR: Got invalid response from API request: http://analyze.example.com/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'curl_exec: Connection timed out after 300220 milliseconds' ERROR: The Piwik URL http://analyze.example.com/index.php does not seem to be pointing to a Piwik server. Response was ''. Done archiving
Das Problem lag an CURL selber und nicht am PHP/Nginx upgrade, wie zuerst vermutet. Denn auch auf Google konnte ich nicht mehr zugreifen:
# curl http://www.google.com -m5 --verbose
* Rebuilt URL to: http://www.google.com/ * Hostname was NOT found in DNS cache * Adding handle: conn: 0x80310f600 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x80310f600) send_pipe: 1, recv_pipe: 0 * Connection timed out after 5654 milliseconds * Closing connection 0 curl: (28) Connection timed out after 5654 milliseconds
Da curl beim letzten Portupgrade ebenfalls aktualiert wurde, musste das Problem wohl daher kommen:
curl -V curl 7.34.0 (amd64-portbld-freebsd9.0) libcurl/7.34.0 OpenSSL/1.0.1f zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate Largefile NTLM NTLM_WB SSL libz TLS-SRP
Auf der Suche nach einer Lösung, bin ich dann auf diesen Thread gestossen. Es handelt sich hier also klar um einen Curl Bug. Inzwischen ist auch bereits eine aktuallere Version (7.35.0) verfügbar. Also einfach Curl Port upgraden, dann geht der archive.php Script von Piwik wieder.