@triffic-tang opened this Issue on August 8th 2017

Hi, there
I am going to use Log Analytics tool of Piwik, but error occurs:

suse11-configserver:/home/webapp/piwik/misc/log-analytics # python import_logs.py --url=http://piwik.gyj.com --login=xxx --password=xxx /home/webapp/piwik/logs/access_log_s3.log
2017-08-08 11:09:36,895: [INFO] Error when connecting to Piwik: <urlopen error [Errno -2] Name or service not known>
Traceback (most recent call last):
File "import_logs.py", line 2383, in
config = Configuration()
File "import_logs.py", line 919, in init
self._parse_args(self._create_parser())
File "import_logs.py", line 899, in _parse_args
self.options.piwik_token_auth = self._get_token_auth()
File "import_logs.py", line 938, in _get_token_auth
_url=self.options.piwik_api_url,
File "import_logs.py", line 1413, in call_api
return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
File "import_logs.py", line 1397, in _call_wrapper
if errors == config.options.max_attempts:
NameError: global name 'config' is not defined

Can you explain why, thank you very much.

@Findus23 commented on August 8th 2017 Member

Hi,

My guess would be be because there is no piwik instance behind this URL. http://piwik.gyj.com

@mneudert commented on August 8th 2017 Member

I think the error might additionally be (or have been?) a missing DNS entry.

The <urlopen error [Errno -2] Name or service not known> happens when the domain name cannot be resolved. You should check it is reachable by using ping or dig or whatever you have at hand.

But as @Findus23 already mentioned there does not seem to be a piwik instance at the location you mentioned...

@triffic-tang commented on August 9th 2017

Yeah, Thank you so much @Findus23 @mneudert.
As you mentioned, I forget to set vhost configuration in apache httpd.conf.

This Issue was closed on August 9th 2017
Powered by GitHub Issue Mirror