我正在尝试将日志文件导入 Matomo,但从自述文件或教程中确实有很大帮助。根据提供的信息,我尝试了以下命令,但出现错误。
D:\Projects\temp>python C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py --url=https://test.com/analytics/index.php --user=admin --password=admin --idsite=6 daily.2019-04-10-0.log
2019-04-16 19:18:32,811: [INFO] Error when connecting to Matomo: <urlopen error [Errno 11001] getaddrinfo failed>
2019-04-16 19:18:32,811: [INFO] Retrying request, attempt number 2
2019-04-16 19:18:42,826: [INFO] Error when connecting to Matomo: <urlopen error [Errno 11001] getaddrinfo failed>
2019-04-16 19:18:42,842: [INFO] Retrying request, attempt number 3
2019-04-16 19:18:52,858: [INFO] Error when connecting to Matomo: <urlopen error [Errno 11001] getaddrinfo failed>
2019-04-16 19:18:52,858: [INFO] Max number of attempts reached, server is unreachable!
Traceback (most recent call last):
File "C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py", line 2614, in <module>
resolver = config.get_resolver()
File "C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py", line 1079, in get_resolver
return StaticResolver(self.options.site_id)
File "C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py", line 1603, in __init__
'SitesManager.getSiteFromId', idSite=self.site_id
File "C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py", line 1586, in call_api
return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
File "C:\xampp\htdocs\analystics\misc\log-analytics\import_logs.py", line 1573, in _call_wrapper
raise Matomo.Error(message, code)
__main__.Error: [Errno 11001] getaddrinfo failed
实际上链接https://test.com/analytics/index.php是在浏览器上工作的,所以很明显 Matomo 已经启动并运行了。