Raised This Month: $76 Target: $400
 19% 

GeoIP2 in HLXCE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdulsami34
Member
Join Date: Oct 2017
Old 02-21-2019 , 20:25   GeoIP2 in HLXCE
Reply With Quote #1

The GeoLite Legacy has discontinued, Could anyone help me out with the new GeoLite2 and how to make it work with HLX
abdulsami34 is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 02-22-2019 , 16:15   Re: GeoIP2 in HLXCE
Reply With Quote #2

Hello,
install GeoIP2 :: Database :: Reader (https://metacpan.org/pod/GeoIP2:atabase::Reader) via CPAN.

PHP Code:
Module Install Instructions
To install GeoIP2
::Database::Readersimply copy and paste either of the commands in to your terminal

cpanm
                    cpanm GeoIP2
::Database::Reader
CPAN shell
                    perl 
-MCPAN -e shell
                    install GeoIP2
::Database::Reader 
And update your scripts https://github.com/NomisCZ/hlstatsx-...master/scripts to latest
__________________



Steam: NomisCZ

Last edited by NomisCZ; 02-22-2019 at 16:18.
NomisCZ is offline
r3v
Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 03-02-2019 , 03:55   Re: GeoIP2 in HLXCE
Reply With Quote #3

Then i install:cpan , install GeoIP2::Database::Reader . My hlstatsx is not working...

PHP Code:
2019-03-02 13:36:59:                       - MYSQLConnecting to MySQL database 'hlstatsx' on 'localhost' as user 'root' ... connected ok
2019
-03-02 13:36:59:                       - CONFIGReading database config...
2019-03-02 13:36:59:                       - CONFIGI have found the following server configs in database:
2019-03-02 13:36:59:                       - S_CONFIGxx.xxx.xxx.xxx:27016
2019
-03-02 13:37:00:                       - HLSTATSXHLstatsX:CE 1.6.19 starting...
2019-03-02 13:37:00:                       - UDPOpening UDP listen socket on port 27500 ... ok
2019
-03-02 13:37:00:                       - HLSTATSXTracking Trend of the stats are enabled
2019
-03-02 13:37:00:                       - HLSTATSXMaximum Skill Change on all servers are 25 points
2019
-03-02 13:37:00:                       - HLSTATSXMinimum Skill Change on all servers are 2 points
2019
-03-02 13:37:00:                       - HLSTATSXMinimum Players Kills on all servers are 50 kills
2019
-03-02 13:37:00:                       - HLSTATSXPlayers chat logging is enabled
2019
-03-02 13:37:00:                       - HLSTATSXBroadcasting public chat is disabled
2019
-03-02 13:37:00:                       - HLSTATSXEvent queue size is set to 10
2019
-03-02 13:37:00:                       - HLSTATSXHLstatsX:CE is now running (Normal modedebug level 1)
2019-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 SERVERConnecting to rcon on xx.xxx.xxx.xxx:27016 ... ok
2019
-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 TRCONTrying to get rcon access (auth)
2019-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 TRCONTrying to get rcon access (auth)
2019-03-02 13:37:37:  xx.xxx.xxx.xxx:27016 SERVERServer running map: /1224991873/$2000$
The IP address you provided (xx.xxx.xxx.xxx:27016is not a valid IPv4 or IPv6 address at /usr/local/share/perl/5.18.2/MaxMind/DB/Reader/Role/Reader.pm line 39. 

Last edited by r3v; 03-02-2019 at 06:40.
r3v is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: $this->Czech_Republic
Old 03-02-2019 , 16:52   Re: GeoIP2 in HLXCE
Reply With Quote #4

Quote:
Originally Posted by r3v View Post
Then i install:cpan , install GeoIP2:atabase::Reader . My hlstatsx is not working...

PHP Code:
2019-03-02 13:36:59:                       - MYSQLConnecting to MySQL database 'hlstatsx' on 'localhost' as user 'root' ... connected ok
2019
-03-02 13:36:59:                       - CONFIGReading database config...
2019-03-02 13:36:59:                       - CONFIGI have found the following server configs in database:
2019-03-02 13:36:59:                       - S_CONFIGxx.xxx.xxx.xxx:27016
2019
-03-02 13:37:00:                       - HLSTATSXHLstatsX:CE 1.6.19 starting...
2019-03-02 13:37:00:                       - UDPOpening UDP listen socket on port 27500 ... ok
2019
-03-02 13:37:00:                       - HLSTATSXTracking Trend of the stats are enabled
2019
-03-02 13:37:00:                       - HLSTATSXMaximum Skill Change on all servers are 25 points
2019
-03-02 13:37:00:                       - HLSTATSXMinimum Skill Change on all servers are 2 points
2019
-03-02 13:37:00:                       - HLSTATSXMinimum Players Kills on all servers are 50 kills
2019
-03-02 13:37:00:                       - HLSTATSXPlayers chat logging is enabled
2019
-03-02 13:37:00:                       - HLSTATSXBroadcasting public chat is disabled
2019
-03-02 13:37:00:                       - HLSTATSXEvent queue size is set to 10
2019
-03-02 13:37:00:                       - HLSTATSXHLstatsX:CE is now running (Normal modedebug level 1)
2019-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 SERVERConnecting to rcon on xx.xxx.xxx.xxx:27016 ... ok
2019
-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 TRCONTrying to get rcon access (auth)
2019-03-02 13:37:32:  xx.xxx.xxx.xxx:27016 TRCONTrying to get rcon access (auth)
2019-03-02 13:37:37:  xx.xxx.xxx.xxx:27016 SERVERServer running map: /1224991873/$2000$
The IP address you provided (xx.xxx.xxx.xxx:27016is not a valid IPv4 or IPv6 address at /usr/local/share/perl/5.18.2/MaxMind/DB/Reader/Role/Reader.pm line 39. 
There is a problem with local IPs (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) subnets. Server probably does not have a public IP address. I'll try to fix this problem ...
__________________



Steam: NomisCZ
NomisCZ is offline
r3v
Member
Join Date: Feb 2016
Location: Lithuania, Vilnius
Old 03-10-2019 , 03:16   Re: GeoIP2 in HLXCE
Reply With Quote #5

Quote:
Originally Posted by NomisCZ View Post
There is a problem with local IPs (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) subnets. Server probably does not have a public IP address. I'll try to fix this problem ...
Are you working on fix? Or maybe revert old GeoIP?
r3v is offline
nikooo777
AlliedModders Donor
Join Date: Apr 2010
Location: Lugano, Switzerland
Old 03-10-2019 , 13:52   Re: GeoIP2 in HLXCE
Reply With Quote #6

Please be careful eveyone when updating the scripts with the above changes.

the charset is changed from utf8 to utf8mb4, which is great, but if you database isn't adjusted then you'll end up with errors such as:

Code:
DBD::mysql::st execute failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=' at .//HLstats.plib line 185.
Unable to execute query:

                        SELECT
                                playerId
                        FROM
                                hlstats_PlayerNames
                        WHERE
                                playerId = 1180307
                                AND name ='{����} ��������'

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
__________________
nikooo777 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:40.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode