@thanatos11 opened this issue on July 22nd 2015

I am trying to implement Piwik, without JavaScript just for the log processing. After setting up all the environment, and requirements. All tests said there is no problem, from the piwik system check.

The log lines look like this:

219.xxx.x.xxx - - [27/Feb/2015:17:27:44 +0800] "GET /Style/Home/css/css.css?v= HTTP/1.1" 200 2518 "http://micheal.thesamename.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" - 219.xxx.x.xxx - - [27/Feb/2015:17:27:44 +0800] "GET /Style/Home/css/style.css?v= HTTP/1.1" 200 2518 "http://micheal.thesamename.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36" -

The command used for the script is like this:

python import_logs.py --url=http://piwik.thesamename.com --idsite=1234 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-bots D:\logs\micheal2.access.thesamename.com

What I get in return is a Fatal error:

Fatal error: cannot get the main URL of this site: An unexpected website was found in the request: website was set to id '1234'

The environment for the machine is this: Windows 7. Php 5.5.12 Python 2.7

What may be the problem? I cannot figure this out. Can you guys tell me if you met this before, maybe there is a simple solution and I can't see it.

Thank you in advance.

@thanatos11 commented on July 22nd 2015

It seemed that the regex did not correctly parse the host and url. Once that was fixed and ran in debug mode I could get some data.

python import_logs.py --url=http://piwik.thesamename.com --debug --idsite=1 --add-sites-new-hosts D:\logs\micheal2.access.thesamename.com

@tsteur commented on July 22nd 2015

So it works now?

@mattab commented on July 22nd 2015

Hi @thanatos11

. Once that was fixed and ran in debug mode I could get some data.

Did you fix something in Piwik log importer?

if you think we should change something in the log importer, please create a bug report at: https://github.com/piwik/piwik-log-analytics/issues/

@thanatos11 commented on July 23rd 2015

No, just parse the regex in the request. Forgot to write in the comment.

This issue was closed on July 22nd 2015
Powered by GitHub Issue Mirror