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

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

Closed
thanatos11 opened this issue Jul 22, 2015 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@thanatos11
Copy link

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

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

tsteur commented Jul 22, 2015

So it works now?

@mattab
Copy link
Member

mattab commented Jul 22, 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/

@mattab mattab closed this as completed Jul 22, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jul 22, 2015
@thanatos11
Copy link
Author

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

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

3 participants