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

[Database Problem] Server and Site Doesnt Communicate


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ciscoderp
New Member
Join Date: Jun 2015
Old 09-11-2015 , 04:51   [Database Problem] Server and Site Doesnt Communicate
Reply With Quote #1

Im having an issue with my website communicating with the server.

The website can see the server is online, but I can not access RCON, sm_ban doesnt register to the website when I perform it in game. If I manually add a ban in, it will say "Player Not in the server" (Even when they are), then "Ban" them, but it wont kick them or if they rejoin, it wont keep them out.

In console I get this error when I try to run sm_ban:

[SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
[SM] Displaying call stack trace for plugin "sourcebans.smx":
[SM] [0] Line 530, sourcebans.sp::CommandBanIp()


My SB page voice.chcory.com/sb

My VPS and Web server are on the same machine.
Im not running Sourcebans 2.0 (im running the 1.4)


Here is my Database.cfg:

Code:
"Databases"
{
    "driver_default"        "mysql"
    
    "sourcebans"
    {
        "driver"            "mysql"
        "host"                "localhost"
        "database"            "*******"
        "user"                "********"
        "pass"                "********"
        //"timeout"            "0"
        "port"            "3306"
    }
    
    "storage-local"
    {
        "driver"            "sqlite"
        "database"            "sourcemod-local"
    }
}
Here is my 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"            "voice.chcory.com"

        // 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"        "0"

        // 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"
    }
}
I created a Database named **** using the command "Create Database **** "

I dont know what else to do, My server ID in sourcebans.cfg matches the server id in the web admin panel.
ciscoderp is offline
Cruckes
Member
Join Date: Jun 2014
Location: Finland
Old 09-12-2015 , 05:08   Re: [Database Problem] Server and Site Doesnt Communicate
Reply With Quote #2

Is there connection between your server and MySQL database?
Cruckes is offline
Horsedick
AlliedModders Donor
Join Date: Sep 2011
Old 09-13-2015 , 10:52   Re: [Database Problem] Server and Site Doesnt Communicate
Reply With Quote #3

Make sure ports are open on the host... you can check this with the diagnostics file.
Horsedick is offline
ciscoderp
New Member
Join Date: Jun 2015
Old 09-13-2015 , 23:44   Re: [Database Problem] Server and Site Doesnt Communicate [SOLVED]
Reply With Quote #4

Had to open Ports

I opened up port 3306 and 27015 on both the server / mysql host.

Works like a charm now.
ciscoderp is offline
mufin
BANNED
Join Date: Aug 2015
Old 10-28-2015 , 08:34   Re: [Database Problem] Server and Site Doesnt Communicate
Reply With Quote #5

im having this trouble too but i can ban i can mute and it will show but its showing a lot of errors

Quote:
L 10/28/2015 - 13:20:20: Error log file session closed.
L 10/28/2015 - 13:20:20: SourceMod error session started
L 10/28/2015 - 13:20:20: Info (map "surf_derpis_ksf") (file "errors_20151028.log")
L 10/28/2015 - 13:20:20: [sb_admcfg.smx] Error(s) detected parsing addons\sourcemod\configs\sourcebans\sb_admins .cfg
L 10/28/2015 - 13:20:20: [sb_admcfg.smx] (line 7) Unknown group "owner"
L 10/28/2015 - 13:20:24: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 10/28/2015 - 13:20:24: [SM] Displaying call stack trace for plugin "SourceSleuth.smx":
L 10/28/2015 - 13:20:24: [SM] [0] Line 166, SourceSleuth.sp::OnClientPostAdminCheck()
mufin is offline
snoopass
Junior Member
Join Date: Aug 2009
Old 10-29-2015 , 05:31   Re: [Database Problem] Server and Site Doesnt Communicate
Reply With Quote #6

The page where the link is in german, but maybe it helps yes :

http://counterstrike.4pforen.4player...20badd4ef21e2e

For me it has helped.
snoopass 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 11:50.


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