2
World Countries Demographic show N/A
Problem reported by Dev Sev - 1/24/2021 at 1:58 PM
Not A Problem
Smarterstats Works fine however for demographics i can only see World Countries N/A. Other countries are not loading. this started to happen after i have migrated to the new server 2019, old server was 2016. 
How can i resolve this issue? please advice refer screenshot.  I have tried the following but dint helped:
- reprocess log files
- restart IIS services
- Repair smarterstats application from control panel.

11 Replies

Reply to Thread
0
Kyle Kerst Replied
Employee Post
Good afternoon, I hope you're doing well today. I've reviewed your issue report and this could be caused by a couple of possibilities. Can you please make sure the public IP address of the requesting user is present in the log files you are reading in? We have seen issues in the past involving NA showing for countries due to the IP address not being present in the log file, or the log files reflecting the NAT/Private IP address instead of the public address. I hope this helps!
Kyle Kerst
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Dev Sev Replied
Hi Kyle,

Sure can you advice the location for this:
Can you please make sure the public IP address of the requesting user is present in the log files you are reading in? 

Other parts of the stats works fine its only on "World Countries" showing N/A instead of showing other countries.

Thanks,
Dev
0
Kyle Kerst Replied
Employee Post
You'll need to open the IIS/Apache log files which are being read in to SmarterStats. Within those log files you should see the IP address associated with each request (each line) and this is what SmarterStats is looking at when performing geolocation lookups. If you don't see an IP address here, see the same IP address repeated, etc, this will be interpreted as NA in the finished reports. 
Kyle Kerst
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Dev Sev Replied
Great!  i found out the IP address each line has, now I need to add this to smarter stats config, kindly advice the smarterstats path/file where I will need to check/update this IP?
0
Dev Sev Replied
Hi Kyle, Never heard back from you I would appreciate a response ?
0
Kyle Kerst Replied
Employee Post
Good morning, and thanks for your patience as I was out for the weekend and did not see your response until today. There is no need to add this to the configuration, we're just trying to confirm if the data is present first. 

Do you see different IP addresses on each line, the same IP address, etc? Are the IP addresses being shown internal or external IP addresses and different than your server's IP?
Kyle Kerst
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Dev Sev Replied
Hi Kyle,

Many Thanks for your email, I have checked the logs file the site was pointing to:
C:\inetpub\logs\LogFiles\W3SVC10

Upon checking I can confirm all IP on each line are the same. IP is the same IP that I use to login using my RDP host. This is also a Private IP. We are doing a VPN to access to this RDP machine.

Furthermore, I did a self-diagnostic and everything looks alright. I even ran site tuning and SEO.  
Does it take some time for the demographics to appear after migrating to new server? as it has been 2 weeks now?

On my AppConfig.xml  I can see the below IP is as below, is this fine?
 <RemoteServer ServerID="1" ServerName="xxxxxxxxxxx" IP="127.0.0.1" ServiceKey="xxxxxxxxxxxxxx" />
xxxxxxx - removed from above.. I have clicked on ResetSecureLink.bat couple of time but I doubt its related to this.

Hence not only demographics world countries is showing "N/A"  but I can also see "Phrases by source" not appearing as well, but maybe both are related.

Happy to hear back from you.

0
Kyle Kerst Replied
Employee Post
Thanks for your follow up on this. Since your logs are showing the same internal IP for each line entry, this confirms the root cause of the problem. Those logs should reflect the public IP of the user who requested the web site, and so SmarterStats is failing to show these details because it knows this is an internal address and does not have a geolocation like a public IP would. 

This is usually because the network the web server is on is using Network Address Translation to convert public IP access to private IP access, and so your server is not aware of the public IP. To correct this your web server would need to log the public IP of the requesting user, then these should show geolocation information in your finished report. 
Kyle Kerst
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Dev Sev Replied
Hi Kyle,

May thanks for your message on advising the cause of this issue.
On this case our Networking Technician requested:
"how can IIS (Version 10) on windows 2019 server get the real ip address of the client if the server is sitting behind a NAT router or Firewall. "

Appreciate your feedback on this.
1
Gabriele Maoret - SERSIS Replied
Hi Dev Sev!

The answer to your last question is: you have to configure your firewall (the one that do the NAT behind that you are...) to do that correctly.

It's not an IIS or a ST issue, it's your firewall that need to be configured in the right way.

And of course it depends on the make and model of firewall, so you need to ask support for that specific firewall

0
Kyle Kerst Replied
Employee Post
Good morning, and thanks for your comments on this. Gabriele is correct, the NAT environment can be modified in such a way that the public IP is directly present on the IIS server so that the original requesting IP is present in the log files when they are written. 

Alternatively I believe we also have support for X-Forwarded-For headers in the IIS log files, so you should be able to enable this header in IIS logging (and your firewall configuration) and SmarterStats should be able to read these values in the logs and correlate the correct IP address. Enabling X-Forwarded-For is detailed here for reference but you may need to confirm your firewall/NAT environment supports this header as well, and that it is named X-Forwarded-For so everything lines up:


Hope this helps!
Kyle Kerst
Technical Support Specialist
SmarterTools Inc.
(877) 357-6278
www.smartertools.com

Reply to Thread