2
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
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 ]

Author Topic: [SOLVED] B3 still not responding on Free BSD (and Mac OSX)  (Read 9126 times)

Offline strata

  • Newbie
  • *
  • Posts: 8
[EDITED by MordyT] If you want to skip all the work done in this thread and just download a modded parser that works FOR MAC (may work for FreeBSD, but not tested yet - if you test let me know), click here. You must be running B3 from sources. Simply replace parser.py with that file and it should work fine. Thanks to Djurres for providing the parser.[END EDIT by MordyT]

Everything appears to be configured correctly. B3 is able to access rcon and mysql.
Python is 2.6.6 and all prerequisites are installed. The b3_run.py -s runs correctly.

I start B3 and get no errors.

When i connect to my UrT server, I get messages from B3 but it will not respond to any commands.
After doing some research into this issue, I found that I must set g_logsync to "2" so it will actively
write log entries to disk as they occur. I did this. To confirm that the logs are being written as they
should, I tailed my game log and it is correct. If i say something in public on the UrT server, it instantly
reflects what I said in the log.

However, B3 still does not respond to !iamgod nor any other command!

I am beginning to think this is because I am not an Ubuntu Zombie.


b3.log: http://www.pastie.org/1960536
« Last Edit: October 30, 2011, 09:32:32 PM by MordyT »

Offline Spruehwurstheinz

  • Sr. Member
  • ****
  • Posts: 234
Re: B3 still not responding
« Reply #1 on: May 23, 2011, 01:04:53 PM »
can you please post your b3.xml without passwords?

Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #2 on: May 23, 2011, 01:29:36 PM »

Offline Spruehwurstheinz

  • Sr. Member
  • ****
  • Posts: 234
Re: B3 still not responding
« Reply #3 on: May 23, 2011, 01:31:48 PM »
please check if the games log file is written there and provides the infos like chat commands: /usr/home/urt/.q3a/q3ut4/riyadh_snipers.log

Offline MordyT

  • Moderator
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: B3 still not responding
« Reply #4 on: May 23, 2011, 02:35:47 PM »
What happened here?

Code: [Select]
110523 03:14:14 BOT     Start reading...
110523 03:14:14 DEBUG   AUTODOC: saving html documentation
110523 03:14:14 DEBUG   AUTODOC: get commands with level <= 100
110523 03:14:14 DEBUG   Writing to /usr/dropswitch/web/urt.boomheadshot.org/b3.html
110523 03:15:00 VERBOSE RCON sending (184.95.39.109:27960) status
110523 03:15:00 VERBOSE StatusPlugin: Building XML status
110523 03:15:00 DEBUG   StatusPlugin: Writing XML status to /usr/home/urt/status.xml
110523 03:15:21 BOT     Shutting down...
110523 03:15:21 VERBOSE AdvPlugin: Warning: No handle func for AdvPlugin
110523 03:15:21 INFO    StatusPlugin: B3 stop/exit.. updating status
110523 03:15:21 DEBUG   StatusPlugin: Writing XML status to /usr/home/urt/status.xml
110523 03:15:21 VERBOSE PunkbusterPlugin: Warning: No handle func for PunkbusterPlugin
110523 03:15:21 BOT     Shutting down database connections...
110523 03:15:21 INFO    STDOUT Goodbye
110523 03:15:21 INFO    STDOUT
Why is it shutting down? Did you close the session in putty?
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #5 on: May 23, 2011, 02:51:12 PM »
Yes Here is some of the output in the game log:

  0:43 ClientBegin: 0
  0:46 say: 0 strata: !iamgod
  ... serveral more !iamgod (like 50 of them)

At the end of the b3.log where it shuts down is when I ctrl-c'd after i saw that nothing is happening when i try to send it commands like !iamgod

Offline MordyT

  • Moderator
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: B3 still not responding
« Reply #6 on: May 23, 2011, 03:06:33 PM »
Erm, you have to wait a few minutes after starting the bot before it responds...

If you look at the code I quoted above, you can see... it started reading the log, got the status, then got shutdown...
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline 82ndAB.Bravo17

  • Dev. Team
  • Hero Member
  • *
  • Posts: 2528
Re: B3 still not responding
« Reply #7 on: May 23, 2011, 04:02:01 PM »
Delete the game log file and make sure that it is getting written to, it could be an old copy of the file.

Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #8 on: May 23, 2011, 11:46:35 PM »
Deleted the game log file and confirmed that it is writing to the new file.
My g_logsync is set to "2" and it is writing properly. I am going to wait 15 minutes before I try to send B3 !iamgod

I am beginning to wonder if there is an underlying issue with B3 on BSD systems. Though it is stated that hacks of core B3 code are not supported, nothing was said afaik about B3 running on OS other than Windows and Linux.

No hacks to B3 or any other software on my server were needed to get B3 running so I'm guessing most likely I'm
doing something wrong or less likely there is something deep in the code that is not working as it should due to subtle OS
differences.

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: B3 still not responding
« Reply #9 on: May 24, 2011, 12:11:56 AM »
My guess would be that B3 does not succeed in detecting updates made to your game log file.

Here is a quick hack you can do to the B3 core code :

Open up b3/parser.py and search for :
Code: python [Select]

filestats = os.fstat(self.input.fileno())


replace with :
Code: python [Select]

filestats = os.fstat(self.input.fileno())
self.verbose2(filestats)


then change the log level down to 8 in your b3.xml
Code: [Select]
<set name="log_level">8</set>

finally restart the bot. you should see something similar to :

Quote
110524 00:10:12   VERBOS2   nt.stat_result(st_mode=33206, st_ino=27584547717753165L, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=68277L, st_atime=1305356265L, st_mtime=1306188609L, st_ctime=1305356265L)
110524 00:10:12   VERBOS2   nt.stat_result(st_mode=33206, st_ino=27584547717753165L, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=68277L, st_atime=1305356265L, st_mtime=1306188609L, st_ctime=1305356265L)
110524 00:10:12   VERBOS2   nt.stat_result(st_mode=33206, st_ino=27584547717753165L, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=68322L, st_atime=1305356265L, st_mtime=1306188612L, st_ctime=1305356265L)
110524 00:10:12   CONSOLE   2011-05-24 00:10:12 : Unknown command 'test'
110524 00:10:13   VERBOS2   nt.stat_result(st_mode=33206, st_ino=27584547717753165L, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=68322L, st_atime=1305356265L, st_mtime=1306188612L, st_ctime=1305356265L)
110524 00:10:13   VERBOS2   nt.stat_result(st_mode=33206, st_ino=27584547717753165L, st_dev=0, st_nlink=1, st_uid=0, st_gid=0, st_size=68322L, st_atime=1305356265L, st_mtime=1306188612L, st_ctime=1305356265L)


Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #10 on: May 24, 2011, 01:14:21 AM »
Ok after adding that line of code into parser.py, st_size increases instantly when I do anything on the UrT server. (when stuff gets written to the game log) looks like the only reason for the filestat is to make sure the log file was not truncated unexpectedly.

Perhaps the parser is not getting what it is supposed to? Can someone please paste some output from their UrT server game log? I want to compare it to mine. It might be possible my log is slightly different and is confusing B3.
I am running the UrT server code from Rambetter's repository, that I compiled as a native for NetBSD. Not the stock Linux binary that comes from Frozen Sand.

Here is some output from my server log: http://www.pastie.org/1963694

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: B3 still not responding
« Reply #11 on: May 24, 2011, 10:15:09 AM »
oh, unofficial ioUrTded build :s
The B3 iourt41 parser is meant to work with official ioUrTded only. If you have a UrT server running as a mod over quake3, B3 won't work (minor differences in log format)

I guess it is the same thing here.

IIRC, issue with non-official ioUrTded build was around players IP addresses that would come with or without the port.


If you set the log_level to 9, do you see any "CONSOLE" line in your b3.log ?

Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #12 on: May 24, 2011, 01:19:57 PM »
Log level 9 shows no CONSOLE lines when i type commands on the UrT server.
I am going to run the official binary under Linux compat and compare the logs to see if there are any differences.
If I see anything, I will patch the server code to reflect the Frozen Sand server. Why not patch B3? 1. I have already made some mods to the server and 2. I am trying to keep B3 untainted :)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: B3 still not responding
« Reply #13 on: May 24, 2011, 02:52:21 PM »
Then I suspect we are hitting this bug : http://bugs.python.org/issue8893
as B3 is using the "readlines()" method : https://github.com/courgette/big-brother-bot/blob/master/b3/parser.py#L998

If this is the case, could you try the following hack :

in b3/parser.py, search for :
Code: python [Select]

        return self.input.readlines()


replace with :
Code: python [Select]
 
        return [self.input.readline()]

Offline strata

  • Newbie
  • *
  • Posts: 8
Re: B3 still not responding
« Reply #14 on: May 24, 2011, 10:56:20 PM »
Didn't think of that at first. If I am not seeing CONSOLE lines in b3.log with loglevel 9, then I am assuming nothing is reaching the parser at all? It appears readlines is returning with no data. Here are my findings. Looks like my Python have a disease :)

This is a Linux Mint box:
[email protected] ~ $ uname -sr; python 8893.py
Linux 2.6.35-28-generic
read     :  ['oink', 'oink']
readlines:  ['oink\n', 'oink\n']
readline : 

This is the server I am trying to run B3 on:
olidammara [~]$ uname -sr; python 8893.py
NetBSD 5.1.0_PATCH
read     :  []
readlines:  []
readline : 

The bug pertained to a Solaris system that was at least returning data via 'readline'. In my case, nothing is returning. Both 2.6 and 2.7 are installed -- each of which exhibit the same result.

 


Rate this page +1 at Google Search