PDA

View Full Version : B3 can't run... Cod2



songo
16th February 2013, 19:34
Hi,

I install b3 from this tutorial: http://www.youtube.com/watch?v=j4QUkwf2pXQ

And I have a problem... When i enter command /etc/init.d/b3 start I have communition:
* Starting [ OK ]

but when I write command /etc/init.d/b3 status I have communition:
* stopped
I have system : 5.1.67-0ubuntu0.11.10.1

Please, help me!

Earliboy
16th February 2013, 19:42
Did you checked the error log? (Do you use one?)

songo
16th February 2013, 19:53
Yes:

130216 23:29:30 BOT 'www.bigbrotherbot.net (b3) v1.8.2 [posix] [Seda]'
130216 23:29:30 BOT 'Python: 2.7.2+ (default, Oct 4 2011, 20:03:08) \n[GCC 4.6.1]'
130216 23:29:30 BOT 'Default encoding: ascii'
130216 23:29:30 BOT 'Starting Cod2Parser v1.3.0 for server 91.121.255.26:28960'
130216 23:29:30 BOT '--------------------------------------------'
130216 23:29:30 BOT 'Attempting to connect to database
130216 23:29:30 ERROR "Database connection failed, working in remote mode: connect() argument 3 must be string, not None - [('/home/cod2server/b3-1.8.2/b3/storage/database.py', 239, 'connect', 'self.db = self.getConnection()'), ('/home/cod2server/b3-1.8.2/b3/storage/database.py', 184, 'getConnection', 'use_unicode = True)'), ('/usr/lib/pymodules/python2.7/MySQLdb/__init__.py', 81, 'Connect', 'return Connection(*args, **kwargs)'), ('/usr/lib/pymodules/python2.7/MySQLdb/connections.py', 187, '__init__', 'super(Connection, self).__init__(*args, **kwargs2)')]"

Mitch
16th February 2013, 21:35
Yes:

130216 23:29:30 BOT 'www.bigbrotherbot.net (b3) v1.8.2 [posix] [Seda]'
130216 23:29:30 BOT 'Python: 2.7.2+ (default, Oct 4 2011, 20:03:08) \n[GCC 4.6.1]'
130216 23:29:30 BOT 'Default encoding: ascii'
130216 23:29:30 BOT 'Starting Cod2Parser v1.3.0 for server 91.121.255.26:28960'
130216 23:29:30 BOT '--------------------------------------------'
130216 23:29:30 BOT 'Attempting to connect to database
130216 23:29:30 ERROR "Database connection failed, working in remote mode: connect() argument 3 must be string, not None - [('/home/cod2server/b3-1.8.2/b3/storage/database.py', 239, 'connect', 'self.db = self.getConnection()'), ('/home/cod2server/b3-1.8.2/b3/storage/database.py', 184, 'getConnection', 'use_unicode = True)'), ('/usr/lib/pymodules/python2.7/MySQLdb/__init__.py', 81, 'Connect', 'return Connection(*args, **kwargs)'), ('/usr/lib/pymodules/python2.7/MySQLdb/connections.py', 187, '__init__', 'super(Connection, self).__init__(*args, **kwargs2)')]"
Your configuration for the database is something wrong with. The error says that the 3rd argument must be a string (text) for remote connection.

Check the b3.xml config in b3/conf. There will be something like this:


<!-- Your database info: [mysql]://[db-user]:[db-password]@[db-server[:port]]/[db-name] -->
<set name="database">mysql://b3:pass@localhost/b3</set>

songo
17th February 2013, 12:21
How checked mysql ? (db-server and port)

PS: When I write command : mysql I have this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Earliboy
17th February 2013, 12:35
This error means you use the wrong DB User or Password.
Try to logon with the password or set an new one.

songo
17th February 2013, 13:07
OK I login to mysql... Why my b3 can't run...?

Earliboy
17th February 2013, 13:26
Did you checked if its the right password in the b3 config?

songo
17th February 2013, 13:48
Hmm... how change mysql password?

Earliboy
17th February 2013, 13:51
Do you use PHPMyAdmin? Or just mysql by console?

songo
17th February 2013, 13:57
I use phpmyadmin...

songo
17th February 2013, 13:59
In b3.xml I must have ip: 91.121.255.26, 91.121.255.26:3306, localhost, localhost:3306?

Help me

kung foo man
17th February 2013, 16:11
If your b3 is running on the same machine as the mysql-daemon, just write 127.0.0.1:3306

songo
17th February 2013, 16:22
ok! b3 running ;P And I have this problem:

My bot do not read commands (!b3,!admins)

Why?

EvoloZz
17th February 2013, 16:26
Something wrong in your config, that can also happen if you are hosting locally,
You could get better replies on b3 forum: http://forum.bigbrotherbot.net/

songo
17th February 2013, 16:28
Good here :P Why no read commands?

PS: My games_mp.log no work... No save logs...

IzNoGoD
17th February 2013, 17:25
g_logsync or smthing...

Tally
17th February 2013, 17:41
Good here :P Why no read commands?

PS: My games_mp.log no work... No save logs...

Log files have nothing to do with B3. You need to add settings to your server config file:


set g_logsync "2" // 0 = no log, 1 = buffered, 2 = continuous, 3 = append
set g_log "games_mp.log" // Name of log file, default is games_mp.log

IzNoGoD
17th February 2013, 21:35
Log files have nothing to do with B3. You need to add settings to your server config file:


set g_logsync "2" // 0 = no log, 1 = buffered, 2 = continuous, 3 = append
set g_log "games_mp.log" // Name of log file, default is games_mp.log


True, and false.

True if you meant that B3 does not create the logfiles
False if you meant that B3 does not need the logfiles.


B3 needs the logfile to function properly (ie read the chat) and pick up on the commands.

The settings you posted seem correct and should indeed fix the b3 stuff :)

Mitch
17th February 2013, 21:58
Good here :P Why no read commands?

PS: My games_mp.log no work... No save logs...
What operating system are you using? Because i know that you need to patch your python in freeBSD to get this working. (link (http://forum.bigbrotherbot.net/installation-support/b3-still-not-responding/msg24389/#msg24389))
(...forgot the first post...)

And of course if there are no logs B3 got nothing to read.

Earliboy
17th February 2013, 23:22
To finally fix this thread:
1. B3 without logfiles? Ha, how to read the chat then? The chat gets saved in the logfile (Games_mp.log ..) so b3 need to read that file to see what players are doing.

Set in your server.cfg:


set logfile "1"
set g_logsync "1"
set g_log "games_mp.log"


Needed lines in B3:
Set this between <settings name="b3"> and </settings>


<set name="database">mysql://user:pass@localhost/dbname</set>
<set name="log_level">22</set>
<set name="logfile">log/b3.log</set>




<settings name="server">
<set name="rcon_password">default_rcon</set>
<set name="port">28960</set>
<set name="game_log">/home/FOLDER/.callofduty2/main/games_mp.log</set>
<set name="public_ip">127.0.0.1</set>
<set name="rcon_ip">127.0.0.1</set>

Important: If you use an FsGames folder, change /main/ to it!
Rename the 127.0.0.1 to your root IP (where the cod2 server is running on)

Important about Database:
Make an new user for b3, give it only rights to the b3 database itself and create the user with an new database.
Go to the new database, click on SQL, go in FTP to b3/sql/ open b3.sql and copy&paste all in the phpmyadmin sql. Save it and run b3.
Do not forget to create an folder named Log in the b3 folder. After you started b3, check the log files. If no errors, b3 should work.

I hope i could help you a littlebit, if it still not work, contact me via xfire: earliboy and i help you via teamviewer. I will explain whats wrong on here if i can fix it via teamviewer.

Greetings
Earli

songo
18th February 2013, 22:21
Thx men! :)