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

"no host given" while importing nginx logs #6164

Closed
multiformeingegno opened this issue Sep 8, 2014 · 1 comment
Closed

"no host given" while importing nginx logs #6164

multiformeingegno opened this issue Sep 8, 2014 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@multiformeingegno
Copy link

Here's the command I used:

python /var/www/default/piwik/misc/log-analytics/import_logs.py --url=//blablabla/piwik/ /var/www/blablabla/logs/access.log.gz --idsite=1

And I got:

Traceback (most recent call last):
  File "/var/www/default/piwik/misc/log-analytics/import_logs.py", line 1714, in <module>
    resolver = config.get_resolver()
  File "/var/www/default/piwik/misc/log-analytics/import_logs.py", line 638, in get_resolver
    return StaticResolver(self.options.site_id)
  File "/var/www/default/piwik/misc/log-analytics/import_logs.py", line 974, in __init__
    'SitesManager.getSiteFromId', idSite=self.site_id
  File "/var/www/default/piwik/misc/log-analytics/import_logs.py", line 957, in call_api
    return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
  File "/var/www/default/piwik/misc/log-analytics/import_logs.py", line 946, in _call_wrapper
    raise Piwik.Error(message)
__main__.Error: no host given

My nginx logs format is:

$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"
@multiformeingegno
Copy link
Author

Sorry, I forgot the http: protocol in --url=

@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Sep 8, 2014
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Sep 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants