In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsInstallation Support (Moderator: MordyT)SQL connection failed
Pages: [1]   Go Down
  Print  
Author Topic: SQL connection failed  (Read 779 times) Bookmark and Share
Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« on: August 20, 2010, 03:28:15 PM »

I used a linux installer to install on my linux server.
Python 2.5 is installed
Everything went through without a problem.

However when i start the B3 bot it does not connect to my SQL DB
I know my SQL login credentials are correct. And it gives me these errors


Code:
Using config file: /home/soldier/.gameservers/cod4_1/B3/b3/conf/b3.xml
Using external plugin directory: /home/soldier/.gameservers/cod4_1/B3/b3/extplugins
Activating log   : /home/soldier/.gameservers/cod4_1/B3/b3/b3.log
Connecting to DB : FAILED!
Using Gamelog    : /home/soldier/.gameservers/cod4_1/main/games_mp.log
Traceback (most recent call last):
  File "/home/soldier/.gameservers/cod4_1/B3/b3/run.py", line 152, in main
    run(config=options.config, nosetup=options.nosetup)
  File "/home/soldier/.gameservers/cod4_1/B3/b3/run.py", line 116, in run
    b3.start(config, nosetup)
  File "/home/soldier/.gameservers/cod4_1/B3/b3/__init__.py", line 154, in start
    console = parser(conf)
  File "/home/soldier/.gameservers/cod4_1/B3/b3/parser.py", line 283, in __init__
    self.input.seek(0, os.SEEK_END)
AttributeError: 'module' object has no attribute 'SEEK_END'

i have no idea why.
any help would be appreciated
« Last Edit: August 20, 2010, 04:43:42 PM by 0re0z » Logged

XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #1 on: August 20, 2010, 04:56:38 PM »

Do you have python-mysqldb installed?
Logged

Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« Reply #2 on: August 20, 2010, 05:01:06 PM »

Do you have python-mysqldb installed?

I didn't before, but I just did

I tried  apt-get install python-mysqldb     and server does not recognize command
I tried yum install python-mysqldb    and it says no package with that name.

I did follow these instructions to install it manually
Code:
To install MySQLdb module, download it from MySQLdb Download page and proceed as follows:

$ gunzip MySQL-python-1.2.3.tar.gz
$ tar -xvf MySQL-python-1.2.3.tar
$ cd MySQL-python-1.2.3
$ python setup.py build
$ python setup.py install

Note: Make sure you have root privilege to install above module.

but I still get the same errors when i try to start bot
« Last Edit: August 20, 2010, 05:10:45 PM by 0re0z » Logged
XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #3 on: August 20, 2010, 05:08:37 PM »

which linux distribution are you using?
« Last Edit: August 20, 2010, 05:20:14 PM by Freelander » Logged

Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« Reply #4 on: August 20, 2010, 05:16:40 PM »

which linux distribution are you using?

as far as i know
Redhat and the OS is centos-5
Logged
XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #5 on: August 20, 2010, 05:20:23 PM »

can you send your b3.xml after removing your passwords!
Logged

Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« Reply #6 on: August 20, 2010, 05:21:10 PM »

can you send your b3.xml after removing your passwords!

Code:
<?xml version="1.0"?>
<configuration>
  <settings name="b3">
    <set name="parser">cod4</set>
    <set name="database">mysql://root:********@localhost/soldier_b3</set>
    <set name="bot_name">B3</set>
    <set name="bot_prefix">^0(^2b3^0)^7:</set>
    <set name="time_format">%I:%M%p %Z %m/%d/%y</set>
    <set name="time_zone">EST</set>
    <set name="log_level">9</set>
    <set name="logfile">/home/soldier/.gameservers/cod4_1/B3/b3/b3.log</set>
  </settings>
  <settings name="server">
    <set name="rcon_password">******</set>
    <set name="port">28962</set>
    <set name="game_log">/home/soldier/.gameservers/cod4_1/main/games_mp.log</set>
    <set name="public_ip">69.197.152.133</set>
    <set name="rcon_ip">127.0.0.1</set>
    <set name="punkbuster">on</set>
  </settings>
  <settings name="autodoc">
    <set name="type">html</set>
    <set name="maxlevel">100</set>
    <set name="destination"></set>
  </settings>
  <settings name="messages">
    <set name="kicked_by">%s^7 was kicked by %s^7 %s</set>
    <set name="kicked">%s^7 was kicked %s</set>
    <set name="banned_by">%s^7 was banned by %s^7 %s</set>
    <set name="banned">%s^7 was banned %s</set>
    <set name="temp_banned_by">%s^7 was temp banned by %s^7 for %s^7 %s</set>
    <set name="temp_banned">%s^7 was temp banned for %s^7 %s</set>
    <set name="unbanned_by">%s^7 was un-banned by %s^7 %s</set>
    <set name="unbanned">%s^7 was un-banned %s</set>
  </settings>
  <settings name="plugins">
    <set name="external_dir">/home/soldier/.gameservers/cod4_1/B3/b3/extplugins/</set>
  </settings>
  <plugins>
    <plugin name="censor" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_censor.xml"/>
    <plugin name="spamcontrol" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_spamcontrol.xml"/>
    <plugin name="admin" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_admin.xml"/>
    <plugin name="tk" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_tk.xml"/>
    <plugin name="stats" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_stats.xml"/>
    <plugin name="pingwatch" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_pingwatch.xml"/>
    <plugin name="adv" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_adv.xml"/>
    <plugin name="status" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_status.xml"/>
    <plugin name="welcome" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_welcome.xml"/>
    <plugin name="punkbuster" config="/home/soldier/.gameservers/cod4_1/B3/b3/conf/plugin_punkbuster.xml"/>
    <plugin name="xlrstats" config="/home/soldier/.gameservers/cod4_1/B3/b3/extplugins/conf/xlrstats.xml"/>
  </plugins>
</configuration>
Logged
XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #7 on: August 20, 2010, 05:32:16 PM »

All looks ok. Can you send the full log from beginning to shutdown?
Logged

Beta Testers
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD2
Posts: 63
Offline Offline
« Reply #8 on: August 20, 2010, 05:42:18 PM »

B3 1.3 Bug,
you need python 2.6 since B3 1.3
update your python version,
and all should be fine
 Wink
Logged
Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« Reply #9 on: August 20, 2010, 05:51:23 PM »

i thought it was 2.5 i had installed but it was actually 2.7
i dl'd directly from http://www.python.org/download/

but if you are saying that B3 sorta updated / downgraded my python then i can reinstall the 2.7
Logged
XLRstats dev.
Dev. Team
*
OS: Linux
Type: Home user
Gameservers: COD5, COD7, BF3
Posts: 947
Offline Offline
WWW
Support Specialty: XLRstats webfront
« Reply #10 on: August 20, 2010, 05:53:38 PM »

B3 1.3 Bug,
you need python 2.6 since B3 1.3
update your python version,
and all should be fine
 Wink

Thanks! I forgot about that. Wink  It's in the documentaiton as well. Follow the steps here pls -> http://wiki.bigbrotherbot.net/doku.php/support:faq#b3_doesn_t_support_python_24_and_i_m_on_centos_now_what
« Last Edit: August 20, 2010, 05:55:22 PM by Freelander » Logged

Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: COD4
Posts: 6
Offline Offline
« Reply #11 on: August 20, 2010, 06:05:22 PM »

I'm having a little issue with my server provider at the moment.
I'll give it a shot when things get straightened out and get back to yall

thanks, yall have been so much help so far!
Logged
Newbie
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 9
Offline Offline
WWW
« Reply #12 on: August 29, 2010, 09:03:42 PM »

I had exactly the same problem a few months ago. Centos yum is dependent upon an older version on Python and you must do a parallel installation to avoid breaking it.

The wiki Freelander points to was the fix.

Good luck!
Logged
Jr. Member
**
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 14
Offline Offline
« Reply #13 on: August 30, 2010, 05:04:22 AM »

just tried to setup server on my comp with b3 and I get Database connection failed. I have installed python v. 2.6.5-2.11 and pythonmysql v.1.2.2-90.1. OS is opensuse. I had no such problems with previous versions  Undecided
Here's start of b3.log:

Code:
100830 14:48:08 BOT    www.BigBrotherBot.com (b3) v1.3.3 [posix] (Daniel)
100830 14:48:08 BOT    Python: 2.6.5 (r265:79063, Jul  5 2010, 11:47:21)
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]]
100830 14:48:08 BOT    Starting Iourt41Parser v1.7.12 for server 127.0.0.1:27960
100830 14:48:08 BOT    --------------------------------------------
100830 14:48:08 BOT    Attempting to connect to database mysql://ja:******@localhost/b3...
100830 14:48:08 ERROR Database connection failed, working in remote mode: (2002, "Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)") - [('/home/user/urtserver/b3/b3/storage.py', 207, 'connect', 'self.db = self.getConnection()'), ('/home/user/urtserver/b3/b3/storage.py', 161, 'getConnection', "return MySQLdb.connect(host=self.dsnDict['host'], port=self.dsnDict['port'], user=self.dsnDict['user'], passwd=self.dsnDict['password'], db=self.dsnDict['path'][1:])"), ('/usr/lib/python2.6/site-packages/MySQLdb/__init__.py', 71, 'Connect', 'return Connection(*args, **kwargs)'), ('/usr/lib/python2.6/site-packages/MySQLdb/connections.py', 170, '__init__', 'super(Connection, self).__init__(*args, **kwargs2)')]
100830 14:48:08 BOT    Game log /home/user/urtserver/q3ut4/games.log
100830 14:48:08 BOT    Starting bot reading file /home/user/urtserver/q3ut4/games.log

Any ideas?
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal