"Error: Not Allowed" when importing access log file


#1

Hello,

I’m getting this error when trying to import server access log file:


root@server:~# python /var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py --url=https://domain.com --idsite=1 /var/log/nginx/domain.access.log
Traceback (most recent call last):
  File "/var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py", line 2099, in <module>
    resolver = config.get_resolver()
  File "/var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py", line 880, in get_resolver
    return StaticResolver(self.options.site_id)
  File "/var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py", line 1221, in __init__
    'SitesManager.getSiteFromId', idSite=self.site_id
  File "/var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py", line 1204, in call_api
    return cls._call_wrapper(cls._call_api, None, None, method, **kwargs)
  File "/var/www/vhosts/domain.com/httpdocs/piwik/misc/log-import_logs.py", line 1193, in _call_wrapper
    raise Piwik.Error(message)
__main__.Error: Not Allowed
root@server:~#

Any idea?


(Matthieu Aubry) #2

Hi there

–url should point to your piwik server URL