Installing Sourcebans

Connect with other users about what to run on your webhosting (and how to run it) here.
Bigsplash
A semi-regular
A semi-regular
Posts: 29
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Dec 01, 2014 10:32 am

Installing Sourcebans

Post by Bigsplash »

I am in the process of installing sourcebans, I have followed the instructions and uploaded to the website.
I have checked marked allow external connections.
Hostname is mysite.nfoservers.com
After doing the http://mysite.nfoservers.com/sourcebans/install/ I enter all the info into the next screen but after I get to owner information I get an error

"CDbConnection failed to open the DB connection."

At this point I have not installed anything on my gameserver.
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

You are not entering the right database information when it asks you.

The username and password for it are located on the "Databases" tab, and the host/server should be localhost.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Hi Soya

thank you so much for your fast reply I got the website part going but it doesn't show any stats.

L 12/26/2014 - 10:32:03: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))

this is what I have in databases.cfg I copied this info from my website filemanager tab

{
"driver_default" "mysql"

"sourcebans"
{
"driver" "mysql"
"host" "hosted31.nfoservers.com" // The host where your mysql server is located
"database" "my_sourceban" // The name of the database
"user" "myusername" // The name of the user that the plugin should use to connect
"pass" "mypassword" // The password for this user
}
}
Image
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

I have made some changes and now no longer have any error logs, however when I go to my sourceban site http://dust2.site.nfoservers.com/sourcebans/index.php it doesn't show any bans even though I have a ban log in /cstrike/addons/sourcemod/logs.

below is my database.cfg

"Databases"
{

"psstats"
{
"driver" "mysql"
"host" "mysite.stats-ps3.nfoservers.com"
"database" "my_database"
"user" "myusername"
"pass" "mypassword"
//"timeout" "0"
"port" "3306"
}
"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
"Databases"
{
"driver_default" "mysql"

"sourcebans"
{
"driver" "mysql"
"host" "localhost" // from website on nfo
"database" "my_sourceban" // nfo website database
"user" "myusername" // myusername for access to nfo website
"pass" "mypassword" // The password for nfo website

}


}
Image
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Started from scratch still nothing shows up on the sourceban site.

http://awpwnage2.site.nfoservers.com/so ... /dashboard
Image
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

The site is showing both servers however the bans are not showing up.

here is the sourcemod error
L 12/27/2014 - 13:42:33: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))

I believe that maybe my database.cfg file might have some problem.
Image
User avatar
hiimcody1
Former staff
Former staff
Posts: 1616
Joined: Wed Dec 28, 2011 4:59 pm

Re: Installing Sourcebans

Post by hiimcody1 »

change it from localhost to the address your Databases tab says to use for external connections. It's usually something like <youridhere>.site.nfoservers.com

Yours is probably dust2.site.nfoservers.com
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

This is what I have right now:

"sourcebans"
{
"driver" "mysql"
"host" "awpwnage2.site.nfoservers.com" // The host where your mysql server is located
"database" "awpwnage2_sourcebans" // The name of the database
"user" "secretusername" // The name of the user that the plugin should use to connect
"pass" "secretpassword" // The password for this user
"port" "3306"

}
sourcemod log shows

L 12/27/2014 - 15:23:06: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))
L 12/27/2014 - 15:35:37: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))
L 12/27/2014 - 15:53:51: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))
L 12/27/2014 - 16:11:42: [sourcebans.smx] Could not connect to the database. ([2003]: Can't connect to MySQL server on 'localhost' (10061))
Image
User avatar
Edge100x
Founder
Founder
Posts: 13112
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Installing Sourcebans

Post by Edge100x »

That suggests that it's not reading the file correctly. Did you restart the server after the last change?
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Yes I did :(

Would sourceban read off of my ban list once it is enabled correctly? Or will it only show bans executed through sourcebans?
Image
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

I wonder if there is something off with my database.cfg file? Maybe missing a bracket or something not sure what all this stuff is in here?

"Databases"
{

"psstats"
{
"driver" "mysql"
"host" "palaganza.stats-ps3.nfoservers.com"
"database" "xxxxxxxxx"
"user" "xxxxxxxxx"
"pass" "xxxxxxxxxxxx"
//"timeout" "0"
"port" "3306"
}
"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}
"Databases"
{
"driver_default" "mysql"

"sourcebans"
{
"driver" "mysql"
"host" "awpwnage2.site.nfoservers.com" // The host where your mysql server is located
"database" "xxxxxxxxx_sourcebans" // The name of the database
"user" "xxxxxxxx" // The name of the user that the plugin should use to connect
"pass" "xxxxxcNbGn" // The password for this user
"port" "3306"

}


}
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

Yes there is. You have "Databases" twice(along with some stray brackets).

Use this format instead, of course filling in your information:

Code: Select all

"Databases"
{

"psstats"
{
"driver"	"mysql"
"host"	"palaganza.stats-ps3.nfoservers.com"
"database"	"xxxxxxxxx"
"user"	"xxxxxxxxx"
"pass"	"xxxxxxxxxxxx"
//"timeout"	"0"
"port"	"3306"
}
"driver_default"	"mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"default"
{
"driver"	"default"
"host"	"localhost"
"database"	"sourcemod"
"user"	"root"
"pass"	""
//"timeout"	"0"
//"port"	"0"
}

"storage-local"
{
"driver"	"sqlite"
"database"	"sourcemod-local"
}

"clientprefs"
{
"driver"	"sqlite"
"host"	"localhost"
"database"	"clientprefs-sqlite"
"user"	"root"
"pass"	""
//"timeout"	"0"
//"port"	"0"
}

"sourcebans"
{
"driver"	"mysql"
"host"	"awpwnage2.site.nfoservers.com"	// The host where your mysql server is located
"database"	"xxxxxxxxx_sourcebans"	// The name of the database
"user"	"xxxxxxxx"	// The name of the user that the plugin should use to connect
"pass"	"xxxxxcNbGn"	// The password for this user
"port"	"3306"
}
}
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Soja great catch :)

downloaded edited database.cfg deleted error logs rebooted server.

Still not showing banlist :(

getting this now in the logs
L 12/27/2014 - 20:28:29: [sourcebans.smx] Failed to query database. (Unknown column 'ip' in 'where clause')
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

Go through the install process again, it seems like the database structure wasn't made properly when you installed the first time.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Soja thanks so much for trying to help me, but it seems I am running from one problem to another :(

Well the saga continues, this is what I have done.

Logged into NFO Website control panel - Databases tab deleted data base "awpwnage2_sourcebans" created new database "awpwnage2_sb".
Image

Connected to website via filezilla using login info from NFO Website control panel - File manage tab.
Deleted folder /public/sourcemod.

Downloaded zip file from https://github.com/GameConnect/SourceBans extraced folder, uploaded "web" folder into newly created folder sourcebans (public/sourcebans)

CHMOD the following files/folders to 777:



/demos
/images/games
/images/maps
/themes_c


Image
Image
Image
Image
Image
Image
Post Reply