Raised This Month: $12 Target: $400
 3% 

Bans do not get added to the website . . .


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 11-28-2015 , 19:30   Bans do not get added to the website . . .
Reply With Quote #1

NOTICE:
I am currently experiencing this problem with the new alpha version of Sourcebans 2.0.

I recently installed SourceBans to my server and tried banning myself for 10 minutes and checked SourceBans for the ban but it was not added there. I followed the SourceBans Manual but did it doesn't seem to be working for me. Here is some files for you to look at as a reference.

/csgo/addons/sourcemod/configs/databases.cfg
Code:
"Databases"
{
	"driver_default"		"mysql"
	
	"sourcebans"
	{
		"driver"		"mysql"
		"host"		"208.146.35.54"
		"database"		"[database name]"
		"user"		"heartfx"
		"pass"		"[my password]"
		//"timeout"		"0"
		"port"			"3306"
	}
	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"		"sourcemod-local"
	}
}
/csgo/addons/sourcemod/configs/sourcebans/sourcebans.cfg
Code:
/**
* sourcebans.cfg
*
* This file contains settings for the SourceBans Source Server Plugin
* @author SteamFriends Development Team
* @version 0.0.0.$Rev: 74 $
* @copyright SteamFriends (www.steamfriends.com)
* @package SourceBans
*/

"SourceBans"
{
	"Config"
	{
		// Website address to tell where the player to go for unban, etc
		"Website"			"http://heartfx.org/sourcebans"

		// Allow or disallow admins access to addban command
		"Addban"			"1"

		// Allow or disallow admins access to unban command
		"Unban"				"1"
        
        // The Tableprefix you set while installing the webpanel. (default: "sb")
		"DatabasePrefix"	"sb"

		// How many seconds to wait before retrying when a players ban fails to be checked. Min = 15.0 Max = 60.0
		"RetryTime"			"45.0"
		
		// How often should we process the failed ban queue in minutes
		"ProcessQueueTime"	"5"

		// Should the plugin automaticaly add the server to sourcebans 
		// (servers without -ip being set on startup need this set to 0)
		"AutoAddServer"		"1"

		// Enable backing up config files after getting admins from database (1 = enabled, 0 = disabled)
		"BackupConfigs"	"1"

		// Enable admin part of the plugin (1 = enabled, 0 = disabled)
		"EnableAdmins"	"1"
        
		// Require the admin to login once into website
		"RequireSiteLogin"	"0"

		// This is the ID of this server (Check in the admin panel -> servers to find the ID of this server)
		"ServerID"		"1"
	}

	/*
	 * Generic menu options for if a reason isn't supplied in a ban
	 * Without a supplied reason the ban will never be written to the database
	 */
	"BanReasons"
	{
		"Hacking"	"Hacking"
		"Exploit"	"General Exploit of Game/Map/Server"
		"TK"	"Team Killing"
		"TF"	"Team Flashing"
		"CommSpam"	"Spamming Mic/Chat"
		"BadSpray"	"Inappropriate Spray"
		"BadLang"	"Inappropriate Language"
		"BadName"	"Inappropriate Name"
		"IgnoreAdmin"	"Ignoring Admins"
        "Stacking"	"Team Stacking"
		"Own Reason"	"Own Reason"
	}
	
	/*
	 * Submenu options for when "Hacking" is selected
	 * If "Hacking" is removed from the menu above this will not be accessable
	 */
	"HackingReasons"
	{
		"Aimbot"	"Aimbot"
		"Antirecoil"	"Anti Recoil"
		"Wallhack"	"Wallhack"
		"Spinhack"	"Spinhack"
		"Speedhack"	"Speedhack"
		"Multi-Hack"	"Multi-Hack"
		"No Smoke"	"No Smoke"
		"No Flash"	"No Flash"
	}
}
For some reason I also have a 2nd sourcebans.cfg file:
/csgo/addons/sourcemod/configs/sourcebans.cfg
Code:
/**
 * SourceBans Configuration File
 *
 * @author GameConnect
 * @version 2.0.0
 * @copyright SourceBans (C)2007-2013 GameConnect.net.  All rights reserved.
 * @package SourceBans
 * @link http://www.sourcebans.net
 */

"SourceBans"
{
	"Config"
	{
		// Website address to tell where the player to go for unban, etc
		"Website"						"http://heartfx.org/sourcebans"
		
		// Allow or disallow admins access to sm_addban command
		"Addban"						"1"
		
		// Allow or disallow admins access to sm_unban command
		"Unban"							"1"
		
		// The table prefix you set while installing the webpanel. Default: "sb_"
		"DatabasePrefix"		"sb_"
		
		// How many seconds to wait before retrying when a players ban fails to be checked. Min = 15.0 Max = 60.0
		"RetryTime"					"45.0"
		
		// How often should we process the failed ban queue in minutes
		"ProcessQueueTime"	"5"
		
		// Require the admin to login once into the webpanel
		"RequireSiteLogin"	"0"
		
		// If your game server is behind NAT or -ip is not set on startup,
		// enter the public IP address or hostname of your game server below
		"ServerIP"					""
	}
	
	/*
	 * Menu options for ban times
	 */
	"BanTimes"
	{
		"Permanent"
		{
			"flags"		""
			"length"	"0"
		}
		"10 Minutes"
		{
			"flags"		""
			"length"	"10"
		}
		"30 Minutes"
		{
			"flags"		""
			"length"	"30"
		}
		"1 Hour"
		{
			"flags"		""
			"length"	"60"
		}
		"4 Hours"
		{
			"flags"		""
			"length"	"240"
		}
		"1 Day"
		{
			"flags"		""
			"length"	"1440"
		}
		"1 Week"
		{
			"flags"		""
			"length"	"10080"
		}
	}
	
	/*
	 * Menu options for if a reason isn't supplied in a ban
	 * Without a supplied reason the ban will never be written to the database
	 */
	"BanReasons"
	{
		"1"	"Hacking"
		"2"	"General Exploit of Game/Map/Server"
		"3"	"Team Killing"
		"4"	"Team Flashing"
		"5"	"Spamming Mic/Chat"
		"6"	"Inappropriate Spray"
		"7"	"Inappropriate Language"
		"8"	"Inappropriate Name"
		"9"	"Ignoring Admins"
		"0"	"Team Stacking"
		"11"	"Own Reason"
	}
	
	/*
	 * Submenu options for when "Hacking" is selected
	 * If "Hacking" removed from the menu above this will not be accessible
	 */
	"HackingReasons"
	{
		"1"	"Aimbot"
		"2"	"Anti Recoil"
		"3"	"Wallhack"
		"4"	"Spinhack"
		"5"	"Speedhack"
		"6"	"Multi-Hack"
		"7"	"No Smoke"
		"8"	"No Flash"
	}
}
It seems that the website and gameserver is not connecting to eachother because nothing is working in between them. I have tried adding admins to the server via the SourceBan page and the individuals that I gave admin didn't receive it. I looked in other threads and tried the solution for others but that didn't really work out for me. If you recommend me to I suppose that I can do another re install of everything SourceBans related and follow the manual again but would like to make it easier for myself by finding the issue here and fixing the small issue we're having with the database maybe?

Thank you in advance,
lowheartrate

UPDATE: I re installed it just now still getting same problem. I banned myself for 10 minutes and when I go back to my SourceBans page no bans are displayed.

I looked at the logs in /csgo/addons/sourcemod/logs and the recent logs doesn't show any errors when the server starts but when I go to ban someone it gives me the following errors:
Code:
L 11/28/2015 - 22:21:56: [sourcebans.smx] Failed to query database. (Unknown column 'ip' in 'where clause')
L 11/28/2015 - 22:28:13: [sb_bans.smx] Failed to insert the ban into the database: Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_bans`, CONSTRAINT `ban_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE SET NULL)
L 11/28/2015 - 22:28:13: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:43:03: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:44:40: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:46:00: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:47:27: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:48:56: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:50:10: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:51:41: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:53:10: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:53:50: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:55:08: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:58:23: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 22:59:35: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:02:43: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:04:18: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:06:39: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:08:08: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:10:01: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:11:54: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:15:47: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:20:18: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:21:25: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:22:38: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:26:12: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:30:45: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:32:13: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:35:19: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:37:17: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:38:28: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:43:11: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:47:07: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:49:17: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:50:24: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:53:26: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:54:59: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))
L 11/28/2015 - 23:59:21: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (`heartfx_bans`.`sb_actions`, CONSTRAINT `action_server` FOREIGN KEY (`server_id`) REFERENCES `sb_servers` (`id`) ON DELETE CASCADE))

Last edited by lowheartrate; 12-09-2015 at 02:32. Reason: Providing error logs
lowheartrate is offline
Cruckes
Member
Join Date: Jun 2014
Location: Finland
Old 12-06-2015 , 05:46   Re: Bans do not get added to the website . . .
Reply With Quote #2

Does your MySQL-user have premissions for database?
Cruckes is offline
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 12-06-2015 , 07:29   Re: Bans do not get added to the website . . .
Reply With Quote #3

Quote:
Originally Posted by Cruckes View Post
Does your MySQL-user have premissions for database?
Not really sure rather or not it does, How can I check?
lowheartrate is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-06-2015 , 07:31   Re: Bans do not get added to the website . . .
Reply With Quote #4

Quote:
Originally Posted by Cruckes View Post
Does your MySQL-user have premissions for database?
That has nothing to do with the MYSQL errors. The errors the MYSQL server say that permissions are correct but a table constraint wasn't met, the first error says a column couldn't be found.

Last edited by WildCard65; 12-06-2015 at 07:32.
WildCard65 is offline
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 12-08-2015 , 20:48   Re: Bans do not get added to the website . . .
Reply With Quote #5

Quote:
Originally Posted by WildCard65 View Post
That has nothing to do with the MYSQL errors. The errors the MYSQL server say that permissions are correct but a table constraint wasn't met, the first error says a column couldn't be found.
Do you know how I can fix this?
Also, I forgot to mention that I am using Sourcebans 2.0 and am having this problem.

Last edited by lowheartrate; 12-09-2015 at 02:31. Reason: Gave more information as to what version of Sourcebans I am using...
lowheartrate is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-10-2015 , 08:50   Re: Bans do not get added to the website . . .
Reply With Quote #6

Quote:
Originally Posted by lowheartrate View Post
Do you know how I can fix this?
Also, I forgot to mention that I am using Sourcebans 2.0 and am having this problem.
https://github.com/GameConnect/SourceBans/issues/49
https://github.com/GameConnect/SourceBans/pull/46
WildCard65 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 04:23.


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