Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when connecting to Piwik: <urlopen error [Errno -2] Name or service not known> #11943

Closed
triffic-tang opened this issue Aug 8, 2017 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@triffic-tang
Copy link

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
Copy link
Member

Findus23 commented Aug 8, 2017

Hi,

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

@mneudert
Copy link
Member

mneudert commented Aug 8, 2017

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
Copy link
Author

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

@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

4 participants