AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   Frequently Asked Questions (FAQ) (https://forums.alliedmods.net/showthread.php?t=201556)

 Mavrick4283 11-23-2012 13:44

Frequently Asked Questions (FAQ)

Greetings

And welcome to the first created FAQ entry on this side of the forum.
Below you will find a small index page with questions and the link to a possible answer.

Please note that although most questions have been formed to cover most issues, they can deviate a bit from the actual problem you as a user are experiencing.
I simply ask you to take your time reading, since most issues are solved in the answer.

If for any reason the question you have is not answered in the faq below, please use the forum's search function first! Threads that repeat questions already answered will be closed / moved / deleted / burned alive / send to my dog for consumption! You have been warned!!

If you have an addition to the FAQ, please send me a PM with at least the question and answer.

Regards,

HLstatsX:CE Modteam

First
While this FAQ has been around for a while now, it's been written for version 1.6.10.
It might work with versions below that as well, though I can't guarantee nor support it!

Thanks to Rawh for the original FAQ section.

 Mavrick4283 11-23-2012 13:44

Re: Frequently Asked Questions (FAQ)

Q: Are there any manuals for installing HlStatsX:ce ?

A: Yes there are! Please click on any link to go to that manuals page.

Installation Manual (Link Disabled)

 Mavrick4283 11-23-2012 13:45

Re: Frequently Asked Questions (FAQ)

Q: How can I resolve the 0/0 players notation on the website?
Q: How can I resolve the 366573:0:0 maptime notation on the website?
Q: My server is getting the error: "NOT ALLOWED SERVER"

A: This can be because of a few issues:
1. Take a look at the Hosting Blacklist? Is your webhoster mentioned? If so, stop everything you are trying to do, it won't work, get a different hoster!!!
2. Is the Daemon running?
3. Is the port that the Daemon is listening on open? (is it firewalled or are you perhaps behind a router?)
4. Do you have the correct modtype for the gameserver you are running? (ie. DoD:S and not DoD gold)
5. Is the server you wish to include in the stats also filled in as a gameserver under the gametab (admin section)?
6. Have you added the loggaddress to the config?
Either add the following to the server.cfg or the autoexec.cfg file:
HL2
Code:

logaddress_add ip:port
HL1
Code:

logaddress_add ip port
ip and port being the ip and port your hlstats daemon is running on. If this is the same machine, be sure to use the internal ip (192.168.100.185 for example, do not use 127.0.0.1!).
7. The server's rcon password is not the same with that it is configured with.
Go to the gameslist and click on the gamemod you are hosting.
Click on the tab called "edit server" and then on the link called "configure".
A new page should be shown in which is a textbox with the option of filling in a rcon password.
Make sure the rcon on both this textfield and your gameserver are the same.
8. RESTART the daemon

 Mavrick4283 11-23-2012 13:50

Re: Frequently Asked Questions (FAQ)

Q: I'm getting errors with Geo::IP::PurePerl. What is it? What does it require?
Q: The users country flags do not work, I only get the default flags, why?

A: HlstatsX:CE has the option of allowing country flags. It requires certain programs in order for this to work. Geo::IP::PurePerl is such a package and can be installed in a different of ways:

Via linux command line (cli)
To install Geo::IP::PurePerl via cli you will need to be root and type the following:
Code:

perl -MCPAN -e 'install Geo::IP::PurePerl'
Via Cpanel

Via CPAN
Again go to a linux command line. Do the following as root:
Code:

cpan install Geo::IP::PurePerl
It should now be installed.

With ppm on Windows.
If using ActivePerl, open Perl Package Manager. Search for Geo-IP-PurePerl. Mark for Install. Run marked actions.
If Geo-IP-PurePerl is not found, you may need to add a repository for it.

After installing Geo::IP::PurePerl you will need to set the method you are going to use with the flags.
Go to the /scripts/GeoLiteCity/ directory, and execute the file called "install_binary.sh". It might be nessecary to chmod the file to +x (execute) before you will be able to run it. This will download the GeoLiteCity.dat.

Now the only thing left is to go to your stats website, login as admin, choose "HLstatsX:CE Settings", browse down to "award settings" and select "GeoIP lookup via binary file" option. Restart the daemon afterwards!

 Mavrick4283 11-23-2012 13:52

Re: Frequently Asked Questions (FAQ)

Q: What is this GeoLiteCity.dat file and how do I get it?

A: GeoLiteCity.dat is a file that is used for Geo-ip lookups (country flags in stats). It is one of the options in the HlstatsX:CE settings tab of the website interface (after being logged in as admin).

Currently HLX:CE supports looking up IP location through the GeoLiteCity.dat file or through the MySQL database. We highly recommend that you use the GeoLiteCity.dat file instead of the database as these lookups can be quite intensive.

If you are on a Linux system, we have provided the necessary script to obtain the GeoLiteCity.dat file. We do not have a Windows script at this time.

On a Linux system follow these steps:
1. SSH to the server you installed the "scripts" folder on and change directory into "scripts/GeoLiteCity".
2. At the shell type "./install_binary.sh"
3. This will download the binary and decompress it properly.
4. Verify that your setting in HLX:CE admin console is set to use the GeoLiteCity.dat file and not the database

You can schedule, using CRON, that script to run on a monthly or weekly basis if you wish. The script will download a new copy every time from the GeoLiteCity web site and automatically update your .dat file.

On a Windows machine you must manually obtain the file and extract it as GeoLiteCity.dat.

To do this:
1. Change your directory to that where you hlstats.pl file is stored in. There should be a directory there called "GeoLiteCity". Change to this directory.
4. Using 7zip (or another program that can handle .gz files) extract the file GeoLiteCity.dat into the GeoLiteCity directory.

 Mavrick4283 11-23-2012 13:54

Re: Frequently Asked Questions (FAQ)

Q: Can I host the website and gameserver on a Dynamic IP?

A: Tricky question! Yes, it might be possible and also it might not be possible.

If the gameserver and stats website is on the same machine but keeps on having an other outside (read: on the internet) IP, then you can do the following:
• Set it all up as explained in one of the manuals you can find here.
• Register the pc that is hosting the gameserver with dynamic address at DynDNS.
• Enter the admin part of your statswebsite.
• Go to the "Game Settings" part and click on the mod/game you are hosting.
• Click the add server link. Fill in those parts as described here:
Code:

Server Address: Fill in the local ip address (do NOT use 127.0.0.1). Server Port: Fill in the gameservers gameport. Server Name: Fill in the name of the gameserver. Rcon Password: Fill in the rcon password you have set on the gameserver. Public Address: Fill in the gameservers DynDNS host + port (host:ip). Game Mod: Are you running a mod for adminning or someting else? Select it out of the dropdown menu.
• Restart the Daemon
• Give other people the link to the DynDNS host you created.

 Mavrick4283 11-23-2012 13:56

Re: Frequently Asked Questions (FAQ)

Q: Anyone know of any good hosts I can get hlstatsx:ce installed & run on?

A: There have been numerous of posts around the forum which give out examples of places you can host them at.
The list you will find here isn't conclusive or in any way facilitated by us. The links have just been gathered by the mod team and put in one post for your convienince.

Whitelist (please check these!)

Blacklist:

 Mavrick4283 11-23-2012 13:58

Re: Frequently Asked Questions (FAQ)

Q: Can I import earlier created log files into the database?
Q: Is it possible to run hlstatsx:ce without realtime updating?
Q: Can I ftp my files over from an other machine to import them into the database?

A: Yes!

To do this manually on a linux host, you would use the follow syntax

From the hlstats.pl directory
Code:

cat /path/to/logfiles/* | /usr/bin/perl ./hlstats.pl -s -t --norcon --server-ip YourServerIp --server-port 27015
On Windows
Code:

type c:\path\to\logfiles\*.log | c:\path\to\perl.exe c:\path\to\hlstats.pl -s -t --norcon --server-ip YourServerIp --server-port 27015
Also, Woody has made a wonderful perl tool which allows you all to do this automatically through ftp. As of 1.6.1 this tool is included in "scripts/hlstatsftp".

 Mavrick4283 11-23-2012 13:59

Re: Frequently Asked Questions (FAQ)

Q: Can I disable stats / logging on specific maps?

A: Yes, most mods support this. You can delete the logaddress for hlx in a map.cfg file (where map is the name of the map you wish to disable it on) and it should stop logging to the daemon when that map is on.

HL2:
Code:

logaddress_del IP:PORT (or logaddress_delall)
HL1:
Code:

logaddress_del IP PORT

 Mavrick4283 11-23-2012 14:00

Re: Frequently Asked Questions (FAQ)

Q: Is it possible to create my own heatmaps?

A: The original maintainer of the HLX:CE heatmaps package is no longer working on the development. No developerment has happened with the Heatmaps package, and it has stalled out. We are not officially supporting this module anymore.

 Mavrick4283 11-23-2012 14:00

Re: Frequently Asked Questions (FAQ)

Q: Is there a list known of ingame (plugin) commands?

A: Yes, there are 3 ways of getting the ingame commands:
2. When on the server you can type 'help' (when the sourcemod plugin is loaded), the motd window should appear with a list of commands available.
3. When on the server you can type 'hlx' (when the sourcemod plugin is loaded), next hit ESC and a menu should appear with commands.

 Mavrick4283 11-23-2012 14:01

Re: Frequently Asked Questions (FAQ)

Q: The ingame plugin isn't working.
Q: The ingame plugin gives a 404 page.

A: This could be because of a nummer of reasons:

• The rcon password the server and the hlstats webpage aren't the same.
The perl daemon sends the commands to the gameservers via rcon. If the rcon passwords aren't correct, the daemon can be banned by the server and not be able to send out the menu. (listip shows ipbans at the gameserver).
• The stats url isn't defined / isn't defined correctly.
The perl daemon sets the hlstatsurl to the url you have currently set the website up with. This url is send towards the gameservers via rcon from the perl daemon. If the hlstatsurl (which is found under "game settings --> mod --> edit servers --> configuration") isn't set to the correct url, the gameserver will not be ab/list]le to pull up the menu and show this ingame in the motd window.
• If you change this be sure to restart the perl daemon AND the gameserver!!

 Mavrick4283 11-23-2012 14:02

Re: Frequently Asked Questions (FAQ)

Q: The daemon won't run, getting errors with ^M lines in the configuration file.

A: You edited the config file on a windows machine with either microsoft word or wordpad.

Windows, for some reason, finds in necessary to end all the lines with a ^M tag. While this tag isn't shown while editing in wordpad, on linux you can seem them clearly. You will need to de-windows-fy the configuration file. Under linux this can be done by installing "tofrodos".

After installing the above package, simply type the following:
Code:

dos2unix <dosfile> <outputfile>
Where "<dosfile>" should have the name of the file with the ^M markings and "<outputfile>" the name of the file you wish to store the changes in!

 Mavrick4283 11-23-2012 14:03

Re: Frequently Asked Questions (FAQ)

Q: Can't setup UDP socket on port 27500: Address already in use

A: It seems the port is already in use. This can be because of several reasons:

• Hlstats is already running.
If you started hlstats via the 'run_hlstats' command, try to locate the 'hlstats.pid' file, in your scripts dir. If this file is present, it means hlstats is already running.
You can use './run_hlstats stop' to stop the current hlstats daemon.
• Some other program is running on that port.
With linux, you can type 'netstat -a | grep 27500' to see if the port is already open. With 'ps aux | grep hlstats' you can see if hlstats is already running for example

 Mavrick4283 11-23-2012 14:06

Re: Frequently Asked Questions (FAQ)

Q: I'm getting the following error: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'".

A: This means that the mysql server you have installed doesn't seem to run or isn't placing the mysql socket file in the correct location.

On a linux machine you can do the following:
1. Locate the mysql config file (usually located in /etc/mysql/, called 'my.cnf').
2. Edit the file with a text editor and search for the string "socket = /var/run/mysqld/mysqld.sock".
3. If socket is pointing towards something different, please change the string to the above and save your config file.
4. Restart the mysql server (/etc/init.d/mysql restart).
5. Browse to the /var/run/mysqld/ directory and do a directory listing (ls) to see if the mysqld.sock file is placed there!

A different, but less likely situation, could be that the socket file is placed there but the server itself can't connect to the localhost. Instead of using localhost as mysqlserver address, revert back to the ip 127.0.0.1 or simply use the ip address that the machine has been given if it is directly connected to the internet.

Also check to make sure that the machine isn't running a firewall (which would commonly be called 'iptables' on a linux machine) and blocks any incoming traffic to port 3306 (default sql port). You can do a listing with 'iptables -L -n'. Remember you can only edit the iptables settings if you are using 'sudo' or 'root' itself!

 Mavrick4283 11-23-2012 14:07

Re: Frequently Asked Questions (FAQ)

Q: I'm having issues with locked tables in mysql, why is this?
Q: My MYSQL command seems to hog 99% cpu all the time, why is this?
Q: I had to kill hlstats.pl and restart it before stats got updated again, why is this?

A: Your HLX:CE daemon may be geting overloaded with the number of log lines coming in.

Each gameserver, when sending their logs to the hlstats.pl daemon, spam the daemon quite a lot. The hlstats.pl daemon in turn builds sql injections from those loglines and sends this to your mysql server, which in turn tries to execute them and fill the database. When a high number of game servers are installed on one daemon, latency may be seen from the end users. Most mysql databases, which you as user use, aren't setup for this amount of data and begin to stop the immidiate flow of injections in order to keep it's head above water.

In order to fix this the best thing you could do is start up a multiple of HLX:CE Daemons. For more information, visit our wiki page on Controlling the HLX:CE Daemon (Link Removed)

Next in line would be your gameservers. Change some of your log lines to now use the higher port numbers as set up in the previous step.

 Mavrick4283 11-23-2012 14:09

Re: Frequently Asked Questions (FAQ)

Q: What are these SuperLogs plugins I keep hearing about and where can I get them?

A: SuperLogs are a collection of logging plugins written by psychonic that are seperate and apart from the HLX:CE project.

SuperLogs plugins, while not required for operation on most games for HLX:CE, provide advanced weapon logging for many of the popular Valve games. These plugins are not HLX:CE specific. They follow the Half-Life Logging Format specified by Valve, and as such can be used by any of the statistics generating systems, not just HLX:CE (although we're sure you want to use ours!).

SuperLogs are available as source code in our repository. However, as these plugins are not officially part of the HLX:CE project, they are typically not dealt with in great detail here on our forums or web site. More information is available on our wiki: http://forums.alliedmods.net/showthread.php?t=204510

NOTE: A few of these plugins require SDK Hooks for some advanced logging (such as Team Fortress 2). SDK Hooks is not written by the HLX:CE development team and can be found separately on the SourceMod web site.

 Mavrick4283 11-23-2012 14:09

Re: Frequently Asked Questions (FAQ)

Q: The daemon gives the error "No data since 120 seconds".

A: Means the daemon isn't getting any gameserver log data to process.

Check your firewall settings for both the gameserver as the daemon.
UDP port 27500 must be open for the daemon (incoming and outgoing traffic).
TCP port 27015 must be open for the gameserver (incoming and outgoing traffic).

This often will require you to communicate with the host of your daemon and ask them to open up a firewall port.
Be sure to mention 'incoming and outgoing'-traffic, seeing some only unblock outgoing.

 Mavrick4283 11-23-2012 14:09

Re: Frequently Asked Questions (FAQ)

Q: I want to create separate stats per server of one mod. How can I do this?
Q: My gameservers are running plugins on one mod. How do I get these servers to separate their stats?

A: Follow the steps below:

1. Login to your hlx:ce website via the admin shortcut.
2. Scroll to the right side of the screen, to the section called 'Tools'.
3. Select 'Duplicate Game settings'.
4. Select the gametype you wish to clone / duplicate and give it a new name.
Note: Do not use a '/', '\' or ' ' (empty space) in your gametype-name!
Instead of a ' ' you can use a '_'!
5. Add the server(s) to your newly created gametype.
6. Enjoy the new gametype with stats based on the server(s) you added!
7. Drink your milk and become a strong and wiser man/woman/robot!

 Mavrick4283 11-23-2012 14:10

Re: Frequently Asked Questions (FAQ)

Q: My mysql server gives a 'Server error: Access denied for user 'user'@'host' (using password: YES)' error.
Q: My mysql server won't let my webserver connect.
Q: My mysql server only allows connections from localhost.

A:On a linux machine you can do the following:

1. Locate the mysql config file (usually located in /etc/mysql/, called 'my.cnf').
2. Edit the file with a text editor and search for the string "bind-address=".
3. My guess is the file only has "bind-address=127.0.0.1" set, change that into "bind-address=your.internet.ip.address".
4. Exit and save the text editor.
5. Restart the mysql server (/etc/init.d/mysql restart).
6. Restart the daemon and wait for the servers to connect!

 Mavrick4283 11-23-2012 14:10

Re: Frequently Asked Questions (FAQ)

Q: Help, my mysql table is crashed!
Q: Repairing my mysql table does not work!

A:Use the following command in sql / phpmyadmi

Code:

REPAIR TABLE <crashed table name> OPTIMIZE TABLE <crashed table name>
Replace '<crashed table name>' with your table name.

 All times are GMT -4. The time now is 07:50.