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

All visitor ip address and provider is same #7059

Closed
chungsm opened this issue Jan 21, 2015 · 9 comments
Closed

All visitor ip address and provider is same #7059

chungsm opened this issue Jan 21, 2015 · 9 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@chungsm
Copy link

chungsm commented Jan 21, 2015

I have installed the Piwik 2.10 on RedHat server. I copied the iis logs and apache access logs into the Redhat Server. Both iis logs and apache access logs are imported locally into the database successfully and the visitors' information are displayed normally.
I have installed Python 2.7.5 and copied import_logs.py in another Windows 2008 R2 Server. And I have remotely imported the iis logs from the Windows Server into the Piwik on the RedHat Server. But all visitors' ip addresses are same as that of the Winodws Server and providers are also the same.
I have tried to solve the problem but failed.
Please give me advice.
Thanks in advance.

@tsteur
Copy link
Member

tsteur commented Jan 22, 2015

Can you post a few example log lines here? Otherwise you might want to ask this question in Forum: http://forum.piwik.org/

@chungsm
Copy link
Author

chungsm commented Jan 22, 2015

Thanks for your reply.
Here they are.
IIS log (W3C format):-
#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2015-01-21 10:33:14
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2015-01-21 10:33:14 1xx.1xx.2x.130 GET /xxxx/demo_video/ - 80 - 1xx.1xx.2x.x27 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.99+Safari/537.36 304 0 0 2184
2015-01-21 10:33:14 1xx.1xx.2x.130 GET /xxxx/demo_video/style-720x480.css - 80 - 1xx.1xx.2x.x27 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.99+Safari/537.36 304 0 0 46
2015-01-21 10:33:14 1xx.1xx.2x.130 GET /xxxx/demo_video/global.js - 80 - 1xx.1xx.2x.x27 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.99+Safari/537.36 304 0 0 202
2015-01-21 10:33:14 1xx.1xx.2x.130 GET /xxxx/demo_video/images/cu_bg.jpg - 80 - 1xx.1xx.2x.x27 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.99+Safari/537.36 304 0 0 187

The address, 1xx.1xx.2x.130 is the IP address of Windows Server and the address, 1xx.1xx.2x.x27 is the IP address of the client' s PC.

I run the following command in cmd in Windows Server.
python import_logs.py --url=http://arthxx.xxx.xxx.edu.xx/piwik/ d:\xxxx\iis_log\W3SVC1\u_ex150120.log --token-auth=fxx07b4xxxx81e85a120943fxx9a8375 --idsite=3 --recorders=4 --enable-http-errors --enable-http-redirects --enable-static --enable-reverse-dns --enable-http-redirects

Thanks in advance.

@tsteur
Copy link
Member

tsteur commented Jan 22, 2015

Thx! This seems to work fine for me. Make sure to append the option --log-format-name=iis, although it worked without it as well I think. Also make sure the IP addresses of your visitors are actually different. In those 4 lines they had all the same IP but changed it. Maybe also have a look here: http://piwik.org/docs/geo-locate/

I tried it on a Ubuntu with Python 2.7.6 there is a chance it does not work on a windows server. Maybe someone else can try to reproduce it?

Can you maybe try to run the import logs script against your Piwik from a Linux?

@tsteur tsteur closed this as completed Jan 22, 2015
@tsteur tsteur reopened this Jan 22, 2015
@chungsm
Copy link
Author

chungsm commented Jan 22, 2015

Thanks for reply.
You ae right. It is ok in Linux Server.

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 22, 2015
@tsteur
Copy link
Member

tsteur commented Jan 22, 2015

Thx! Must be a bug then. Not sure re milestone, putting it into 2.11 for now but might have to move it later.

I think we should also run the log importer tests on travis automated. Just executed them locally and getting this error:

..Fatal error: cannot automatically determine the log format using the first 100000 lines of the log file. 
Maybe try specifying the format with the --log-format-name command line argument.

I will create an issue for this

@chungsm
Copy link
Author

chungsm commented Jan 23, 2015

Thank you very much.

@diosmosis diosmosis self-assigned this Jan 26, 2015
@diosmosis
Copy link
Member

@chungsm I've tested the log importer on windows server 2012 R2 and it works. I can't reproduce the bug you're experiencing.

Can you try the latest log importer script: https://raw.githubusercontent.com/piwik/piwik/master/misc/log-analytics/import_logs.py ?

Note: If the token auth is incorrect (ie, it isn't for a super user or a user w/ admin access to the site the visits are for) the IP address will default to the IP of the machine sending the request.

@mattab
Copy link
Member

mattab commented Feb 7, 2015

Hi @chungsm
could you let @diosmosis if you still have a bug? if not you can close the issue, thanks!

@mattab
Copy link
Member

mattab commented Feb 9, 2015

Please see solution in this FAQ: https://matomo.org/faq/troubleshooting/faq_17710/

@mattab mattab closed this as completed Feb 9, 2015
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Feb 9, 2015
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

4 participants