matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.83k stars 2.64k forks source link

Log import: invalid_indices / invalid datetime format #13019

Closed L3on1d closed 1 year ago

L3on1d commented 6 years ago

Hi!

During the nginx log import I'm often face this error:

From console:

Fatal error: HTTP Error 500 Internal Server Error, response: {"status":"error","tracked":79,"invalid":0,"invalid_indices":[]} You can restart the import of "access.log" from the point it failed by specifying --skip=200900 on the command line.

In nginx error log:

PHP message: Error in Matomo (tracker): Error query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x98\x9Apa...' for column 'name' at row 1 In query: INSERT INTO mtm_log_action (name, hash, type, url_prefix) VALUES (?,CRC32(?),?,?) Parameters: array ( 0 => 'Wife swop 😚party', 1 => 'Wife swop 😚party', 2 => 8, 3 => NULL, )"

or

"PHP message: Error in Matomo (tracker): Error query: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'visit_total_interactions' at row 1 In query: UPDATE mtm_log_visit SET idvisitor = ?, visit_last_action_time = ?, visit_exit_idaction_url = ?, visit_total_actions = visit_total_actions + 1 , visit_total_interactions = visit_total_interactions + 1 , visit_total_time = ? WHERE idsite = ? AND idvisit = ? Parameters: array ( 0 => '°‘Üñ‰Ubi', 1 => '2018-05-27 19:41:00', 2 => 8212694, 3 => 74461, 4 => 6, 5 => '59079986', )"

Something wrong with log I guess?

mattab commented 6 years ago

Are you using Matomo 3.5.1 ? if you are, please post here the log line that bugs and triggers this error, and the command you used to import?

L3on1d commented 6 years ago

Yes, version 3.5.1.

Command: python /var/www/html/misc/log-analytics/import_logs.py --url=https://mymatomo.com --idsite=6 --recorders=2 access.log

90.195.17.228 - - [30/May/2018:14:43:53 +0000] "POST http://mydomain.com/stories/votej.php HTTP/1.1" 200 85 "https://mydomain.com/s/crossing-the-line-15" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299" 0.531 174.95.43.170 - - [30/May/2018:14:43:53 +0000] "POST http://mydomain.com/stories/votej.php HTTP/1.1" 200 85 "https://mydomain.com/s/does-he-really-want-that-ch-01" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)" 1.032 40.77.167.135 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/s/my-sisters-best-friends-ch-04 HTTP/1.1" 200 14105 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" 0.053 108.66.238.243 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/stories/rltr/check-status.php HTTP/1.1" 200 180 "https://mydomain.com/s/revenge-of-the-cuckold-1?page=2" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Firefox/60.0" 1.094 75.120.114.204 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/stories/make-comment-ajax.php?id=355503&action=getcaptcha HTTP/1.1" 200 106 "https://mydomain.com/s/backseat-lust" "Mozilla/5.0 (Linux; Android 4.4.3; KFSOWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/66.3.1 like Chrome/66.0.3359.158 Safari/537.36" 0.824 75.81.58.95 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/sc/css/common_story_webtv/vZ.css HTTP/1.1" 200 30 "https://mydomain.com/s/the-blossoming-gallows-ch-02?page=2" "Mozilla/5.0 (iPod touch; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1" 0.000 216.169.111.235 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/api/3/tagsportal/categories?params=%7B%22tags%22:[219203],%22period%22:%22all%22,%22language%22:1%7D HTTP/1.1" 200 157 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" 0.210 23.118.109.240 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/sc/js/jquery-1.4.2.min/jquery.tools.min/jquery.scrollTo-min/jquery.cookie.min/cmn/user/rltr/rltr-index/vZ.js HTTP/1.1" 200 109447 "https://mydomain.com/stories/" "Mozilla/5.0 (iPhone; CPU iPhone OS 11_3_1 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/62.0.3202.70 Mobile/15E302 Safari/604.1" 0.002 75.66.162.193 - - [30/May/2018:14:43:53 +0000] "GET http://mydomain.com/newchat/res/notify.mp3 HTTP/1.1" 206 1095 "https://mydomain.com/newchat/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299" 0.000

L3on1d commented 6 years ago

Hi!

Anybody? :)

L3on1d commented 6 years ago

How I understood. This url affecting:

http://mydomain.com/api/3/tagsportal/categories?params=%7B%22tags%22:[219203],%22period%22:%22all%22,%22language%22:1%7D

sgiehl commented 1 year ago

I'll close this one as it's already a couple of years old. @L3on1d If you still have any issues with log importing feel free to create an issue here: https://github.com/matomo-org/matomo-log-analytics