BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: Zeephonz on June 26, 2008, 12:12:32 am

Title: AOChat: not expecting login (again)
Post by: Zeephonz on June 26, 2008, 12:12:32 am
I decided to move my org bot across from the Windows PC to a *nix box. The *nix box is running PHP v5.2.5 (cli version), MySQL and has Bebot 0.4.3 copied across to it.

Everything connects properly to the SQL database, a php -m shows BCMath etc loaded, but again I see that horrible message "AOChat: not expecting login" popping up.

Start up the Windows one, everything is fine, switch back, same error. I have looked at every thread on this here, tried all suggestions relevant to my versions, but to no avail.

What could possibly be causing this?
Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on June 26, 2008, 03:35:32 am
The instant suspect is conf/Bot.conf

Not that, unlike windows, *nix filenames are case sensitive so bot.conf is not the same file as Bot.conf. If the file is all lower case it will never be loaded.

Also check the file permissions.

I will look at adding fatal errors when config files are not found or cannot be loaded, but for now you'll just have to double check the files manually.

Never mind that. That file is required so it should be fatal if not found.

Need to do a bit more research.

But please do double check the username and password that is in conf/Bot.conf

Also please include distro, kernel, architecture and build version of PHP.
Title: Re: AOChat: not expecting login (again)
Post by: Temar on June 26, 2008, 04:41:07 am
unless u are right but he uses multi bots but its loading the default file because of cant find argument.Bot.conf
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 26, 2008, 05:55:51 am
I run the bot from the directory it's installed in, and it's the only bot on this machine.

Here's the main load of information you are looking for...

Bebot 0.4.3 - installed
MySQL 5.0.51b

> php -v
PHP 5.2.4 (cli) (built: Aug 31 2007 23:57:08)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

> php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
dbase
dom
exif
fbsql
filter
ftp
gd
gettext
hash
iconv
imap
json
ldap
libxml
mbstring
mcrypt
memcache
mhash
ming
mssql
mysql
mysqli
oci8
odbc
OpenBase Module
openssl
pcntl
pcre
pdf
PDO
pdo_mysql
PDO_OCI
pdo_pgsql
pdo_sqlite
pgsql
posix
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
SQLite
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

> Starting the bot gives...

_/_/_/      _/_/_/  _/_/_/      _/_/        _/_/   

         An Anarchy Online Chat Automaton         

             v.0.4.3 - PHP 5.2.4     

===================================================

Connected to MySQL

Botname [2008-06-26 03:36:46]  [CORE]  [LOAD]  Security.php
Botname [2008-06-26 03:36:46]  [SETTINGS]      [LOAD]  Loaded settings from database.
(all the otherstuff in between loads here cleanly)
Botname [2008-06-26 03:36:50]  [LOGIN] [STATUS]        Connecting
Botname [2008-06-26 03:36:51]  [LOGIN] [STATUS]        Authenticating
Botname [2008-06-26 03:37:15]  [LOGIN] [RESULT]        Error
Botname [2008-06-26 03:37:15]  [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.

... then goes into startup loop, trying again.

Anything else you need?
Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on June 26, 2008, 08:56:24 am
Botname [2008-06-26 03:36:50]  [LOGIN] [STATUS]        Connecting
Botname [2008-06-26 03:36:51]  [LOGIN] [STATUS]        Authenticating
Botname [2008-06-26 03:37:15]  [LOGIN] [RESULT]        Error
Botname [2008-06-26 03:37:15]  [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.

... then goes into startup loop, trying again.

Anything else you need?

I need you to check the user name and password one more time. Also you need to check that the name of the player that the bot assumes is correct.
And if you still think the username/password/toon is right log in to that accout using your regular anarchy client.
And if it still fails after you've corrected the username/password/toon then I'll need a copy of your bot directory after you've removed the username and passwords from your Bot.conf and MySQL.conf files zipped up and sendt here so I can rule out that it's not infact a typo.

Also read this previous post (http://bebot.link/helpful-posts/aochat-not-expecting-login/)
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 26, 2008, 09:23:18 am
Everything verified as per your request, here are the files...

As an update, this is a direct copy of my Windows bot, which works fine, the only difference being the clarification of the PHP binary in StartBot.php

Windows runs, I stop it, *nix version fails, and I can restart the Windows one again no problem.

I don't profess to being a *nix person, but followed the guidelines as per all documentation. Frustrating, but I'm sure you gods can sort it out ;)
Title: Re: AOChat: not expecting login (again)
Post by: Temar on June 26, 2008, 01:44:41 pm
looking at the log it seems to be the username / password
not the Char as the Error is before it tries that
Title: Re: AOChat: not expecting login (again)
Post by: Slacklin on June 26, 2008, 08:41:20 pm
One thing that got me when I used a linux system was the username is case sensitive. That might be another place to look.
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 26, 2008, 10:51:55 pm
One thing that got me when I used a linux system was the username is case sensitive. That might be another place to look.

Ya, I was reading earlier threads on that, and have tried a mix of all lowercase, all uppercase, first upper-rest lower etc. But that was consistent tries between all parts.

I'll try mixing up the case options with each one e.g name lower case, password mixed case etc, in case one is ok and it's failing on the other.

Is there any code that could be inserted into one of the PHP files that could copy the packet being sent to a file, or something like that, that could be analysed to see what is actually going out?
Title: Re: AOChat: not expecting login (again)
Post by: Slacklin on June 26, 2008, 11:57:58 pm
Just do a simple output of what the variable is that is being sent, should be pretty easy to see it.
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 27, 2008, 12:21:05 am
Just do a simple output of what the variable is that is being sent, should be pretty easy to see it.

errr ummm.... someone wanna tell me how?

I'm no PHP coder kinda dude, more of a copy/paste kinda dude.  ;D


Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on June 27, 2008, 06:49:47 am
Everything verified as per your request, here are the files...
Well I put my username and password in bot.conf and mysql.conf and it connected as it should.

What may be an issue is character encoding if you use some special characters. Try removing the lines in the conf files and type them up from scratch.

It may (in theory) be that your php and bcmath is broken. If that is the case re-building php and bcmath from source is an option.

Which distribution are you working with?

Edit: Have you tried all lower-case username?
Edit: When I pourpously enter the wrong username I get the error message you got.
Title: Re: AOChat: not expecting login (again)
Post by: Khalem on June 27, 2008, 10:33:30 am
If his PHP is generating invalid keys to send to the server, he will be getting the same error as you since his password will be wrong on account of PHP messing it up.

I'll see if i can get the time to add some debug strings to the AOChat library later.
Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on June 27, 2008, 01:30:30 pm
Which architecture is the bot running on? It could be caused by 64-bit intigers not overflowing like 32-bit ones. (ie. they will not).
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 28, 2008, 11:21:19 am
OK, the architecture is 32-bit, but it's a Mac G4 (PPC).

Both the Darwin flavour (Mac OSX 10.4.11), and the Debian distro I just installed, come up with the same error.

Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on June 30, 2008, 11:48:18 pm
Further update.... installed the 0.5.2 version of the bot with no dramas, same problem still exists.  :'(

A real shame, coz the rest of the system, databe setups etc really hum along. It would be awesome to get this fixed.
Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on July 01, 2008, 08:33:42 am
OK, the architecture is 32-bit, but it's a Mac G4 (PPC).

Both the Darwin flavour (Mac OSX 10.4.11), and the Debian distro I just installed, come up with the same error.
Unfrotunately I do not own or have access to a Mac so there is no way for me to verify that the keys transacted during the login process are calculated correctly.

What you would need is a test suit to run the calculations on a Mac and on a platform that is known to funciton and verify that the results of the calculations are the same.

I am not sure how to write such a test suit.
Title: Re: AOChat: not expecting login (again)
Post by: Zeephonz on July 01, 2008, 09:45:33 am
Are they keys that are generated the same every time?
Title: Re: AOChat: not expecting login (again)
Post by: Blueeagle on July 02, 2008, 12:15:24 am
http://en.wikipedia.org/wiki/Diffie-Hellman_key_exchange
SimplePortal 2.3.7 © 2008-2024, SimplePortal