mySQL Issues

This is the place for general discussion about Warcraft3 XP, including install help.

Moderator: Forum Moderator

Locked
BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

mySQL Issues

Post by BenderNZ » Mon Aug 08, 2005 8:51 pm

Hi,

I'm having problems with getting the wc3 plugin to work with mySQL - our current version is fine but the new version doesn't want to play nicely...

Here's the server log:

Code: Select all

L 08/09/2005 - 14:40:09: Server cvar "public_slots_free" = "16"
L 08/09/2005 - 14:40:10: [AMXX] Native error in "dbi_connect" on line 8154 (file "warcraft3.sma").
L 08/09/2005 - 14:40:10: [MYSQL] Recieved invalid parameter.
L 08/09/2005 - 14:40:10: [AMXX] Native error in "dbi_query" on line 8161 (file "warcraft3.sma").
L 08/09/2005 - 14:40:10: [MYSQL] Invalid database handle -2
./hlds_run: line 424: 15177 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Tue Aug  9 14:40:10 NZST 2005: Server restart in 10 seconds
I searched the invalid database handle error and came up with a thread which found the mySQL db settings were wrong, but in this case I am absolutely positively sure they're correct (and they work with the current, older version of the plugin fine).

I have recompiled the plugin with mysql support.

Any insight?

AMX Version is 1.01 (I tried 1.5 but that was a no go)
I've tried the SQL modules provided with 1.01, and the SQL modules provided in the separate package.

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Tue Aug 09, 2005 6:38 am

Use the main mysql module, not the SQLLite. ALso, please post your warcraft3.cfg

I know 2.6 will work with mysql, so we just have to figure out why its giving you trouble. MySQL did not change in this release.
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Tue Aug 09, 2005 8:32 am

Hello, BenderNZ:

If you have changed the AMX Mod X version and/or configuration confirm that you are using the same modules as the previous working version/configuration.

Please double-check that your connection parameters to the database are correct.

This

Code: Select all

L 08/09/2005 - 14:40:10: [AMXX] Native error in "dbi_connect" on line 8154 (file "warcraft3.sma").
L 08/09/2005 - 14:40:10: [MYSQL] Recieved invalid parameter.
L 08/09/2005 - 14:40:10: [AMXX] Native error in "dbi_query" on line 8161 (file "warcraft3.sma").
L 08/09/2005 - 14:40:10: [MYSQL] Invalid database handle -2
indicates a possible error in your connection to the database (maybe IP, user, password or table), while this

Code: Select all

./hlds_run: line 424: 15177 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
is either unrelated or is the result of trying to connect to a 4.0.x MySQL server with the AMX Mod X modules for 4.1.x or the other way around.

Also if you use MySQL for admins, disable the Warcraft 3 XP plugin, start your server and watch the log to see if it's reading the admins from the database to rule out MySQL server problems.

I hope this helps,
Lazarus

BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

Post by BenderNZ » Tue Aug 09, 2005 10:25 pm

Started installing from scratch again.

Just typing in the steps as I'm doing them so you can see -

Downloaded:
http://optusnet.dl.sourceforge.net/sour ... .01.tar.gz
http://optusnet.dl.sourceforge.net/sour ... .01.tar.gz
Uncompressed both files into cstrike (so they appear as cstrike/addons/amxmodx)

Downloaded:
http://www.ferretbox.com/plugins/warcraft3_2.6.zip
Uncompressed into cstrike again.

Opened warcraft3.cfg and changed the following (what I list is what I changed them to):

Code: Select all

#define SHORT_TERM 0
#define MYSQL_ENABLED 1
#define LANG_ENG 1
#define MYSQL_AUTO_PRUNING 0
#define STARTINGLEVEL 0
#define EXPANDED_RACES 1
#define ROUNDEND_SAVEALL 1
Everything else in the file is exactly as it comes in the zip.

Compiled:

Code: Select all

./amxxsc warcraft3.sma -o../plugins/warcraft3.amxx
Welcome to the AMX Mod X 1.00-272 Compiler.
Copyright (c) 1997-2004 ITB CompuPhase, AMX Mod X Team

Done.
No compile time errors...

Went into amxmodx/configs

Edited plugins.ini to say:

Code: Select all

scrollmsg.amxx
warcraft3.amxx
Yes that's all that's in it - we use AdminMOD for our admins, but I have disabled it for the sake of making sure that it isn't causing the issues.

Edited modules.ini to say:

Code: Select all

fun_amxx_i386.so
engine_amxx_i386.so
mysql_amxx_i386.so
cstrike_amxx_i386.so
Again that is all that is in it.

Went into addons/metamod.
Created plugins.ini.

Code: Select all

linux addons/amxmodx/dlls/amxmodx_mm_i386.so
#linux addons/adminmod/dlls/admin_MM_i386_mysql.so
(AdminMOD is commented out until I have WC3 working)

Created folder 'dlls'
Downloaded http://optusnet.dl.sourceforge.net/sour ... nux.tar.gz
Decompressed.

That should be everything setup...

Opened server.cfg in cstrike and added:

Code: Select all

//WC3 Settings
mp_allowchangerace 1
mp_savexp 1
mp_xpmultiplier 0.30
mp_weaponxpmodifier 1
sv_allowwar3vote 0
sv_wc3icons 0
//mySQL Settings for WC3
amx_mysql_host 219.88.255.178
amx_mysql_user wc3
amx_mysql_pass *REMOVED*
amx_mysql_db warcraft3
[/code]

Should be everything now.

Added -dll addons/metamod/dlls/metamod_i386.so to hlds_run command line.

Started server:

Code: Select all

Console initialized.
Protocol version 47
Exe version 1.1.2.5/Stdio (cstrike)
Exe build: 17:07:54 Aug  3 2005 (3205)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 219.88.241.80:27015

   Metamod version 1.17.4  Copyright (c) 2001-2004 Will Day <[email protected]>
   Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type `meta gpl' for details.


   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/10/2005 - 16:20:35: -------- Mapchange --------
[WC3] Forcing unmodified player models
[WC3] Using Engine Module, Long Term XP Modus, saving xp with: vault[0] mysql[1]
Cmd_AddCommand: fullupdate already defined

couldn't exec addons/amxmodx/configs/mysql.cfg
Executing Server Config
Server logging data to file logs/L0810070.log
L 08/10/2005 - 16:20:37: Log file started (file "logs/L0810070.log") (game "cstrike") (version "47/1.1.2.5/Stdio/3205")
L 08/10/2005 - 16:20:37: Server cvar "sv_aim" = "0"
L 08/10/2005 - 16:20:37: Server cvar "sv_maxrate" = "20000"
L 08/10/2005 - 16:20:37: Server cvar "sv_maxspeed" = "320"
L 08/10/2005 - 16:20:37: Server cvar "sv_minrate" = "4000"
L 08/10/2005 - 16:20:37: Server cvar "sv_airaccelerate" = "3"
L 08/10/2005 - 16:20:37: Server cvar "sv_region" = "5"
L 08/10/2005 - 16:20:37: Server cvar "mp_chattime" = "1"
L 08/10/2005 - 16:20:37: Server cvar "sv_allowupload" = "0"
L 08/10/2005 - 16:20:37: Server cvar "mp_xpmultiplier" = "0.30"
Scrolling message displaying frequency: 3:20 minutes
Executing SBS ban file sbs/sbs1.cfg
removeid: couldn't find STEAM_0:0:1419541
removeid: couldn't find STEAM_0:0:2413884
Adding master server 69.28.151.178:27010
Adding master server 69.28.151.162:27010
Connection to Steam servers successful.
L 08/10/2005 - 16:20:39: [AMXX] Run time error 10 (native) (plugin "warcraft3.amxx") - debug not enabled.
L 08/10/2005 - 16:20:39: [MYSQL] Recieved invalid parameter.
L 08/10/2005 - 16:20:39: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quotes).
L 08/10/2005 - 16:20:39: [AMXX] Run time error 10 (native) (plugin "warcraft3.amxx") - debug not enabled.
L 08/10/2005 - 16:20:39: [MYSQL] Invalid database handle -2
L 08/10/2005 - 16:20:39: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quotes).
./hlds_run: line 424: 15745 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Wed Aug 10 16:20:39 NZST 2005: Server restart in 10 seconds
Wed Aug 10 16:20:43 NZST 2005: Server Quit
Added debug after warcraft3.amxx in plugins.ini

Started server again:

Code: Select all

Console initialized.
Protocol version 47
Exe version 1.1.2.5/Stdio (cstrike)
Exe build: 17:07:54 Aug  3 2005 (3205)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 219.88.241.80:27015

   Metamod version 1.17.4  Copyright (c) 2001-2004 Will Day <[email protected]>
   Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type `meta gpl' for details.


   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/10/2005 - 16:22:01: -------- Mapchange --------
[WC3] Forcing unmodified player models
[WC3] Using Engine Module, Long Term XP Modus, saving xp with: vault[0] mysql[1]
Cmd_AddCommand: fullupdate already defined

couldn't exec addons/amxmodx/configs/mysql.cfg
Executing Server Config
Server logging data to file logs/L0810071.log
L 08/10/2005 - 16:22:04: Log file started (file "logs/L0810071.log") (game "cstrike") (version "47/1.1.2.5/Stdio/3205")
L 08/10/2005 - 16:22:04: Server cvar "sv_aim" = "0"
L 08/10/2005 - 16:22:04: Server cvar "sv_maxrate" = "20000"
L 08/10/2005 - 16:22:04: Server cvar "sv_maxspeed" = "320"
L 08/10/2005 - 16:22:04: Server cvar "sv_minrate" = "4000"
L 08/10/2005 - 16:22:04: Server cvar "sv_airaccelerate" = "3"
L 08/10/2005 - 16:22:04: Server cvar "sv_region" = "5"
L 08/10/2005 - 16:22:04: Server cvar "mp_chattime" = "1"
L 08/10/2005 - 16:22:04: Server cvar "sv_allowupload" = "0"
L 08/10/2005 - 16:22:04: Server cvar "mp_xpmultiplier" = "0.30"
Scrolling message displaying frequency: 3:20 minutes
Executing SBS ban file sbs/sbs1.cfg
removeid: couldn't find STEAM_0:0:1419541
removeid: couldn't find STEAM_0:0:2413884
Adding master server 207.173.177.11:27010
Adding master server 69.28.151.178:27010
Connection to Steam servers successful.
L 08/10/2005 - 16:22:06: [AMXX] Native error in "dbi_connect" on line 8154 (file "warcraft3.sma").
L 08/10/2005 - 16:22:06: [MYSQL] Recieved invalid parameter.
L 08/10/2005 - 16:22:06: [AMXX] Native error in "dbi_query" on line 8161 (file "warcraft3.sma").
L 08/10/2005 - 16:22:06: [MYSQL] Invalid database handle -2
./hlds_run: line 424: 15763 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Wed Aug 10 16:22:06 NZST 2005: Server restart in 10 seconds
Noticed:
couldn't exec addons/amxmodx/configs/mysql.cfg
in the above log.

Added:

Code: Select all

amx_mysql_host 219.88.255.178
amx_mysql_user wc3
amx_mysql_pass *REMOVED*
amx_mysql_db warcraft3

//amxx prefix to be sure
amxx_mysql_host 219.88.255.178
amxx_mysql_user wc3
amxx_mysql_pass *REMOVED*
amxx_mysql_db warcraft3
to addons/amxmodx/configs/mysql.cfg

Started server again:

Code: Select all

games@games1:~/steam1$ ./run
Auto detecting CPU
Using Pentium II Optimised binary.
Auto-restarting the server on crash
Updating server using Steam.
Checking bootstrapper version ...
Updating Installation
Checking/Installing 'Counter-Strike Base Content' version 16

Checking/Installing 'Linux Server Engine' version 18

Checking/Installing 'Half-Life Base Content' version 8

HLDS installation up to date

Console initialized.
Protocol version 47
Exe version 1.1.2.5/Stdio (cstrike)
Exe build: 17:07:54 Aug  3 2005 (3205)
STEAM Auth Server
couldn't exec language.cfg
Server IP address 219.88.241.80:27015

   Metamod version 1.17.4  Copyright (c) 2001-2004 Will Day <[email protected]>
   Metamod comes with ABSOLUTELY NO WARRANTY; for details type `meta gpl'.
   This is free software, and you are welcome to redistribute it
   under certain conditions; type `meta gpl' for details.


   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/10/2005 - 16:25:27: -------- Mapchange --------
[WC3] Forcing unmodified player models
[WC3] Using Engine Module, Long Term XP Modus, saving xp with: vault[0] mysql[1]
Cmd_AddCommand: fullupdate already defined

Executing Server Config
Server logging data to file logs/L0810072.log
L 08/10/2005 - 16:25:28: Log file started (file "logs/L0810072.log") (game "cstrike") (version "47/1.1.2.5/Stdio/3205")
L 08/10/2005 - 16:25:28: Server cvar "sv_aim" = "0"
L 08/10/2005 - 16:25:28: Server cvar "sv_maxrate" = "20000"
L 08/10/2005 - 16:25:28: Server cvar "sv_maxspeed" = "320"
L 08/10/2005 - 16:25:28: Server cvar "sv_minrate" = "4000"
L 08/10/2005 - 16:25:28: Server cvar "sv_airaccelerate" = "3"
L 08/10/2005 - 16:25:28: Server cvar "sv_region" = "5"
L 08/10/2005 - 16:25:28: Server cvar "mp_chattime" = "1"
L 08/10/2005 - 16:25:28: Server cvar "sv_allowupload" = "0"
L 08/10/2005 - 16:25:28: Server cvar "mp_xpmultiplier" = "0.30"
Scrolling message displaying frequency: 3:20 minutes
Executing SBS ban file sbs/sbs1.cfg
removeid: couldn't find STEAM_0:0:1419541
removeid: couldn't find STEAM_0:0:2413884
Adding master server 69.28.151.178:27010
Adding master server 69.28.151.162:27010
Connection to Steam servers successful.
L 08/10/2005 - 16:25:30: [AMXX] Native error in "dbi_connect" on line 8154 (file "warcraft3.sma").
L 08/10/2005 - 16:25:30: [MYSQL] Recieved invalid parameter.
L 08/10/2005 - 16:25:30: [AMXX] Native error in "dbi_query" on line 8161 (file "warcraft3.sma").
L 08/10/2005 - 16:25:30: [MYSQL] Invalid database handle -2
./hlds_run: line 424: 15782 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
So I'll be darned if I know what the issue is :?

BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

Post by BenderNZ » Tue Aug 09, 2005 10:50 pm

Noticed you mentioned it could be due to using mySQL 4.10, I tried upgrading our sql server to 4.1 but that didn't help :(


Our current WC3 installation works:

Code: Select all

Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] AMX              RUN   -    amx_mm_i686.so    v0.9.7    ini  ANY   ANY
 [ 2] Adminmod         RUN   -    admin_MM_i386_my  v2.50.59  ini  Start Start
 [ 3] FUN              RUN   -    fun_mm_i686.so    v0.9.8    cmd  ANY   ANY
3 plugins, 3 running
Loaded plugin 'WARCRAFT 3' successfully
Currently loaded plugins:
      description      stat pend  file              vers      src  load  unlod
 [ 1] AMX              RUN   -    amx_mm_i686.so    v0.9.7    ini  ANY   ANY
 [ 2] Adminmod         RUN   -    admin_MM_i386_my  v2.50.59  ini  Start Start
 [ 3] FUN              RUN   -    fun_mm_i686.so    v0.9.8    cmd  ANY   ANY
 [ 4] WARCRAFT 3       RUN   -    war3_mm_i386.so   v1.2      cmd  ANY   Pause
4 plugins, 4 running
[WC3] Forcing unmodified player models
[WC3] Using WC3 Module, Long Term XP Modus, saving xp with: vault[0] mysql[1]

amx list
Currently loaded plugins:
       name               version  author            file             status
 [  1] Warcraft 3 XP      pre-2.2  AMX Community     warcraft3.amx    running
 [  2] Scrolling Message  0.9      default           scrollmsg.amx    running
2 plugins, 2 running

Old version I know but we kept with it because the new versions like FT/extended etc were a bit unstable and CPU heavy.

Just some other info incase it helps:

Code: Select all

games@games1:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-13)
Debian Sarge (Stable)
mySQL 4.1

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Wed Aug 10, 2005 1:04 am

Hello, BenderNZ:

Please, try out the SQL Modules. Since you updated MySQL to 4.1.x, also check "/etc/mysql/my.cnf" and please report back the [mysqld] section namely the bind-address and old_passwords settings.

Check out "/var/log/mysql.log", "/var/log/mysql.err" and inside the "/var/log/mysql" dir to see if you catch any error message. You might have to temporary uncomment the log lines in the [mysqld] section of the "/etc/mysql/my.cnf" file.

Can you also post your full command line when invoking hlds_run, please? I'm curious about why you did:
BenderNZ wrote:Added -dll addons/metamod/dlls/metamod_i386.so to hlds_run command line
and not use the liblist.gam method.

Also regarding the command line, please run "apt-get install gdb" and start hlds_run with the "-debug" option.

Finally check your database for permission settings for user "[email protected]" to access the warcraft3 database and its tables, also check the password settings for the same user. And triple check that the password you set in "addons/amxmodx/configs/mysql.cfg " is correct.

I hope this helps,
Lazarus

BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

Post by BenderNZ » Wed Aug 10, 2005 2:10 am

Lazarus Long wrote:Hello, BenderNZ:

Please, try out the SQL Modules.
Done - no luck.

Code: Select all


   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/10/2005 - 19:55:56: -------- Mapchange --------
[WC3] Forcing unmodified player models
[WC3] Using Engine Module, Long Term XP Modus, saving xp with: vault[0] mysql[1]
Cmd_AddCommand: fullupdate already defined

Executing Server Config
Server logging data to file logs/L0810097.log
L 08/10/2005 - 19:56:12: Log file started (file "logs/L0810097.log") (game "cstrike") (version "47/1.1.2.5/Stdio/3205")
L 08/10/2005 - 19:56:12: Server cvar "sv_aim" = "0"
L 08/10/2005 - 19:56:12: Server cvar "sv_maxrate" = "20000"
L 08/10/2005 - 19:56:12: Server cvar "sv_maxspeed" = "320"
L 08/10/2005 - 19:56:12: Server cvar "sv_minrate" = "4000"
L 08/10/2005 - 19:56:12: Server cvar "sv_airaccelerate" = "3"
L 08/10/2005 - 19:56:12: Server cvar "sv_region" = "5"
L 08/10/2005 - 19:56:12: Server cvar "mp_chattime" = "1"
L 08/10/2005 - 19:56:12: Server cvar "sv_allowupload" = "0"
L 08/10/2005 - 19:56:12: Server cvar "mp_xpmultiplier" = "0.30"
Scrolling message displaying frequency: 3:20 minutes
couldn't exec addons/adminmod/config/adminmod.cfg
Executing SBS ban file sbs/sbs1.cfg
removeid: couldn't find STEAM_0:0:1419541
removeid: couldn't find STEAM_0:0:2413884
Adding master server 69.28.151.162:27010
Adding master server 69.28.151.178:27010
Connection to Steam servers successful.
L 08/10/2005 - 19:56:21: [AMXX] Native error in "dbi_connect" on line 8154 (file "warcraft3.sma").
L 08/10/2005 - 19:56:21: [MYSQL] Recieved invalid parameter.
L 08/10/2005 - 19:56:21: [AMXX] Native error in "dbi_query" on line 8161 (file "warcraft3.sma").
L 08/10/2005 - 19:56:21: [MYSQL] Invalid database handle -2
./hlds_run: line 424: 16026 Segmentation fault      $HL_CMD
Add "-debug" to the ./hlds_run command line to generate a debug.log to help with solving this problem
Wed Aug 10 19:56:21 NZST 2005: Server restart in 10 seconds
Wed Aug 10 19:56:22 NZST 2005: Server Quit
Since you updated MySQL to 4.1.x, also check "/etc/mysql/my.cnf" and please report back the [mysqld] section namely the bind-address and old_passwords settings.
Definately should be seutp correctly, our mysql server also holds the databases for our forums/website/adminmod users etc.

As requested though:

Code: Select all

old_passwords   = 1
bind-address   = *
And the netstat output to show mySQL is listening:

Code: Select all

web1:~# netstat -nlpt | grep mysqld
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN     21256/mysqld
Check out "/var/log/mysql.log", "/var/log/mysql.err" and inside the "/var/log/mysql" dir to see if you catch any error message. You might have to temporary uncomment the log lines in the [mysqld] section of the "/etc/mysql/my.cnf" file.
Had a look, I can see the queries on the old warcraft3 server - but the new version (2.6) doesn't make the query at all (eg no entries in the log for it).
Can you also post your full command line when invoking hlds_run, please? I'm curious about why you did:
BenderNZ wrote:Added -dll addons/metamod/dlls/metamod_i386.so to hlds_run command line
and not use the liblist.gam method.

Code: Select all

#!/bin/sh

export LD_LIBRARY_PATH=/home/games/steam2:$LD_LIBRARY_PATH

while true; do
./hlds_run +ip 219.88.241.80 -port 27016 -game cstrike +maxplayers 17 +map de_aztec -pingboost 3 -autoupdate -dll addons/metamod/dlls/metamod_i386.so
done;
I use the -dll string because when Valve release updates the update tool used to always damn overwrite everything so having the -dll switch on the command line forces it.
Also regarding the command line, please run "apt-get install gdb" and start hlds_run with the "-debug" option.
Debug Output:

Code: Select all

----------------------------------------------
CRASH: Wed Aug 10 20:05:26 NZST 2005
Start Line: ./hlds_i686 +ip 219.88.241.80 -port 27016 -game cstrike +maxplayers 17 +map de_aztec -pingboost 3 -autoupdate -dll addons/metamod/dlls/metamod_i386.so
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `./hlds_i686 +ip 219.88.241.80 -port 27015 -game cstrike +maxplayers 16 +map de_'.
Program terminated with signal 11, Segmentation fault.
#0  0x439816e6 in ?? ()
#0  0x439816e6 in ?? ()
End of crash report
----------------------------------------------
Finally check your database for permission settings for user "[email protected]" to access the warcraft3 database and its tables, also check the password settings for the same user. And triple check that the password you set in "addons/amxmodx/configs/mysql.cfg " is correct.

Code: Select all

games@games1:~$ mysql warcraft3 --user=wc3 -p --host=219.88.255.178
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 55 to server version: 4.1.11-Debian_4-log
Connects okay from the command line.


Thanks for the help.

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Wed Aug 10, 2005 5:15 am

Hello, BenderNZ:
BenderNZ wrote:I use the -dll string because when Valve release updates the update tool used to always damn overwrite everything so having the -dll switch on the command line forces it.
Oh, I see. No need to do it anymore, from some time now it stoped trying to override the liblist.gam file.

Regarding your problem, we'll have to wait to see what ferret has to say about it, 'cause I think you covered it all and I also can't find any pitfall remaining.

If I were you I would try just one more thing to rule AMX Mod X out completelly and say for sure it's Warcraft 3 XP related:

Edit "addons/amxmodx/configs/plugins.ini" and add

Code: Select all

admin_sql.amxx
admincmd.amxx
adminhelp.amxx
then edit "addons/amxmodx/configs/sql.cfg" and set it like

Code: Select all

amx_sql_host	"219.88.255.178"
amx_sql_user	"wc3"
amx_sql_pass	"<user password>"
amx_sql_db	"warcraft3"
amx_sql_table	"admins"
after which follow this post's instructions on creating and sample populating the admins table (point IV.2). Restart your server and watch the logs to see if it reads the admins from the database to pinpoint if it's AMX Mod X or Warcraft 3 XP related.

By the way, great job in reporting your problem, I must say it was the best report I've seen.

Regards,
Lazarus

BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

Post by BenderNZ » Wed Aug 10, 2005 6:21 am

Hmmm.

Disabled warcraft3.amxx and just put the 3 admin plugins in as suggested.

If I move sql.cfg away so that amx can't find it and uses defaults:

Code: Select all

   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/11/2005 - 00:16:16: -------- Mapchange --------

Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
couldn't exec addons/amxmodx/configs/sql.cfg
L 08/11/2005 - 00:16:21: [MYSQL] DB Connection failed(2003): Can't connect to MySQL server on '127.0.0.1' (111)
[AMXX] SQL error: can't connect: 'Can't connect to MySQL server on '127.0.0.1' (111)'
[AMXX] Loaded 0 admins from file
Executing Server Config
Server logging data to file logs/L0811001.log
L 08/11/2005 - 00:16:21: Log file started (file "logs/L0811001.log") (game "cstrike") (version "47/1.1.2.5/Stdio/3205")
The server starts fine and just whinges that it can't find the sql server.

But:

If I put sql.cfg back (so that it has the settings)

Code: Select all

   AMX Mod X version 1.01 Copyright (c) 2004-2005 AMX Mod X Development Team
   AMX Mod X comes with ABSOLUTELY NO WARRANTY; for details type `amxx gpl'.
   This is free software and you are welcome to redistribute it under
   certain conditions; type 'amxx gpl' for details.

L 08/11/2005 - 00:18:04: -------- Mapchange --------

Executing AMX Mod X Configuration File
Scrolling message displaying frequency: 10:00 minutes
./hlds_run: line 424: 16427 Segmentation fault      (core dumped) $HL_CMD
debug.cmds:1: Error in sourced command file:
Cannot access memory at address 0xbffff410
email debug.log to [email protected]
Thu Aug 11 00:18:11 NZST 2005: Server restart in 10 seconds
Thu Aug 11 00:18:13 NZST 2005: Server Quit
It coredumps...

Code: Select all

----------------------------------------------
CRASH: Thu Aug 11 00:18:11 NZST 2005
Start Line: ./hlds_i686 +ip 219.88.241.80 -port 27016 -game cstrike +maxplayers 17 +map de_aztec -pingboost 3 -autoupdate -dll addons/metamod/dlls/metamod_i386.so
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `./hlds_i686 +ip 219.88.241.80 -port 27015 -game cstrike +maxplayers 16 +map de_'.
Program terminated with signal 11, Segmentation fault.
#0  0x439816e6 in ?? ()
#0  0x439816e6 in ?? ()
End of crash report
----------------------------------------------
And the sql.cfg file contents:

Code: Select all

amx_sql_host 219.88.255.178
amx_sql_user wc3
amx_sql_pass *hidden*
amx_sql_db warcraft3
amx_sql_table admins
And my test user I added into the db:

auth = test
password = pass
access = i
flags = e


Seems like AMX is invoking the connection attempt to the mySQL server okay, cause it fails when it's 127.0.0.1, but when it is set to the correct server it spews...

User avatar
ferret
Lead Warcraft 3 XP Developer
Posts: 422
Joined: Wed Jul 06, 2005 8:20 am
Location: Atlanta, GA
Contact:

Post by ferret » Wed Aug 10, 2005 6:32 am

Wow. Awesome posts, I must say.

At this point though, I must say, I don't think this is a WC3 XP issue. Something in AMXX's MySQL module is having difficulties on your system it looks like. I would jump onto gamesurge.net IRC and join #amxmodx and ask for BAILOPAN to take a look at this thread, or go post on amxmodx.org referencing this information.

Theoretically, there's no way for an AMXX plugin to crash a server, to my knowledge. Only the modules can cause real runtimes.

I personally don't use MySQL so this is about as far as I can help. I know that the SQL calls made by WC3 XP are valid, but I don't believe they are your issue. The module is causing you the trouble.

Have you checked what level of glibc is installed on your server?
-< www.gamehavoc.com >-

Lazarus Long: And I know you didn't because the Server Files are version 2.2.6 and the file you posted is version 2.2.5, so do as I told you above and don't ever lie to me again or help is gone!

BenderNZ
Peon
Posts: 6
Joined: Mon Aug 08, 2005 8:50 pm
Location: Auckland, New Zealand
Contact:

Post by BenderNZ » Wed Aug 10, 2005 6:41 am

Okay, to make sure it wasn't the mySQL server, I just setup another mySQL server, running on the same machine as the WC3 server (so localhost) - added in the admin user etc and still got the segfault on load (this is without the Warcraft3 plugin).

So perhaps an amxx issue? mysql-client14 is installed (supports mysql 4.1).


Edit: Bet me to it, jumping on IRC now.

User avatar
Lazarus Long
Lead PITA SOB
Posts: 618
Joined: Tue Jul 05, 2005 9:24 pm

Post by Lazarus Long » Wed Aug 10, 2005 10:18 am

BenderNZ wrote:Okay, to make sure it wasn't the mySQL server, I just setup another mySQL server, running on the same machine as the WC3 server (so localhost) - added in the admin user etc and still got the segfault on load (this is without the Warcraft3 plugin).
OK, then it's something with the module itself.
BenderNZ wrote:So perhaps an amxx issue? mysql-client14 is installed (supports mysql 4.1).
In this case, inspite of you having "old_passwords = 1" you must use the SQL Modules, since Debian's support for the older mysqlclient libs is removed from that package onward.

With the new SQL module you should also set "old_passwords = 0" and try it out to see if it works this way (it should I have all my machines set this way).

Best regards,
Lazarus

Locked