collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: An existing connection was forcily closed by the remote host.  (Read 3467 times)

0 Members and 1 Guest are viewing this topic.

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Anyone ever had this error msg?
My bot was running just fine till last night after i modified some codes in memberlist.php
then bot will not run command in guild chat
when i send pm to bot, it will reply but my toon won't receive it
though if u look at bot log it will show bot did reply w/ result etc
then i will receive this error about connection thing..

really need some help here tysm :)

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #1 on: March 28, 2006, 01:05:43 pm »
Process of elimination. If the last thing you modified was a module, rename the module by placing a underscore infront of its name so it don't get loaded. Do this with one module at a time and restart.

If the problem goes away on one of those renamed you know which module is the cause of the AOchat server closing the bots connection.

Tip however: Increase the time (in milliseconds) between tells that the bot is allowed. I.E. in Bot.conf increase $tell_delay =

Mines set to 2300 btw. Also check $max_blobsize. I forget what the stock setting is but I moved mine up to 14000 with no problems for the last 6 months. Reason I note that is if a blob is small and you have a module returning alot of info to be output the server may see it as spam with a low tell delay. Increasing both delay and blob size will keep the chat server from freaking out and booting the bot.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #2 on: March 28, 2006, 06:36:34 pm »
It could also mean that you had another instance of the bot running, hence the existing connections.

I would believe that you were trying to open a new connection, while you had one already open. Try closing off all the bots, then start it up, and see if that fixes it.

If you need further help, please post the code you added/changed, then we would have a better idea as to what might be wrong.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #3 on: March 28, 2006, 11:16:58 pm »
well I tried to restart my pc where the bot is running and still not fixed so i don't think there is another bot running at same time but who knows.  ???

also, I tried to empty mysql server database and restore it then reboot my pc. it seems to fix my problem if i do that and i tried three times and worked 3 times so i have no idea what is wrong.

i will try replace the _ in front of each module 1 at a time and change the setting in conf folder hopefully it will help.

i will report w/ the result in couple days and let you guys know what is wrong w/ it  :-X

note: I also noticed that now if i change any code in any module, it will break my bot and i will have to empty mysql db then restore and reboot my pc to make it work.  :-\ (even after i change the codes back to what it was b4 i changed in module, bot will still not working)
« Last Edit: March 28, 2006, 11:21:58 pm by buff »

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #4 on: March 29, 2006, 04:58:21 am »
changed stuff as Xenixa recommend but still not working
upgrade from php4 to php5 w/ latest version and played w/ mysql server abit but nothing works

abit frustrated here :/

got screenie here if u guys can help
-----------------------------------------------------


Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #5 on: March 29, 2006, 06:06:51 am »
If you're sending that to tells:

$this -> bot -> send_tell($who_you_are_sending_to, $msg);

And for org chat,

$this -> bot -> send_gc($msg);

I have a feeling you're missing a key argument in the commands :) That is, if you didn't do anything to the code in bot.php.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #6 on: March 29, 2006, 09:12:12 pm »
 ???
a lil bit confused what you mean by missing argument in commands.
where should i check for the tells and org chats??
in each module?

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #7 on: March 30, 2006, 01:21:01 am »
Can you post the bit of code you added/changed?

could tell you exactly where something might have gone wrong :)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #8 on: March 30, 2006, 06:04:36 am »
didn't modify any codes after the bot had problem.
I changed the codes i modified in memberlist.php back to original codes after bot wouldn't respond.

I did notice another thing thou
my bot won't work everytime i restart bot and if i go to mysql db and delete someone from members table and boot my bot, it will update and add the member that got deleted
then i have to restart bot again, bot will then work
tried it many times and works

I hope this will ring some bell for any of u to help me out what is wrong w/ bot

Code: [Select]
<?
  /*
   * Something written by wolfbiter
   */
   
  $ml = new memberList($bot);

  $commands["tell"]["memberlist"] = &$ml;

  class memberlist {
    var $bot;
    var $online;
    function memberlist (&$bot) {$this -> bot = &$bot;}
    function tell($name,$msg) {$this -> bot -> send_tell($name,$this->list_members($name,$msg));}
    function list_members($name,$msg) {
        unset($admins,$leaders,$members);
        $text = explode(" ",$msg);
        if ($text[1] == "prof" || $text[1] == "profession") { $sql="select nickname,profession,level from members order by 'profession','nickname','level' asc";}
        elseif ($text[1] == "level") {$sql="select nickname,profession,level from members order by 'level','profession','nickname' ASC";}
        else {$sql="select nickname,profession,level from members order by 'nickname','profession','level' asc";}
        $rawlist = $this->bot->db->select($sql);
        $memberstot = count($rawlist);
        foreach ($rawlist as $member) {
            $name = $member[0];
            $namelist[$name]['level'] = $member[2];
            $namelist[$name]['prof'] = $member[1];
            $admin = $this -> bot -> admin -> in_group($name, "admin");
            $leader = $this -> bot->admin -> in_group($name, "raidleader");
            if ($admin) {$admins[] = $name;}
            elseif ($leader) {$leaders[] = $name;}
            else {$members[] = $name;}
        }
$output= "<font color=#FFFF66>Order by [ <a href='chatcmd:///tell <botname> !memberlist'>Name</a> ] [ <a href='chatcmd:///tell <botname> !memberlist level'>Level</a> ] [ <a href='chatcmd:///tell <botname> !memberlist prof'>Profession</a> ]<br><br>";
    if (count($admins) > 0) {
        $output.='<font color=#99CCCC>[<u>Admins</u>]';
    foreach($admins as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC>";}
}
if (count($leaders) > 0) {
        $output.='<br><br><font color=#99CCCC>[<u>Leaders</u>]';
    foreach($leaders as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC>";}
}
if (count($members) > 0) {
        $output.='<br><br><font color=#99CCCC>[<u>Members</u>]';
    foreach($members as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC>";}
}
$return = $this->bot->make_blob($memberstot." Members",$output);
return $return;
    }
  }
?>
« Last Edit: March 30, 2006, 10:37:05 am by buff »

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #9 on: March 30, 2006, 05:30:06 pm »
Fix this line:
$ml = new memberList($bot);
to:
$ml = new memberlist($bot);

It's also set to only tells. It won't do anything with org commands unless you set it to.

Should add:
$commands["gc"]["memberlist"] = &$ml;

And add the function gc ($name, $msg)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #10 on: March 31, 2006, 03:42:09 am »
changed $ml = new memberlist($bot);

also added the following:
$commands["gc"]["memberlist"] = &$ml;
in class:
function gc ($name, $msg) {$this -> bot -> send_gc($this->list_members($name,$msg));}

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #11 on: March 31, 2006, 06:38:50 am »
Did that work?

Errors?

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline buff

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #12 on: March 31, 2006, 10:48:13 am »
tested out
it works in guildchat
no error

but my bot still has same issue :P
everytime i reboot my bot
i will have to remove 1 member in my memberlist
and wait for bot to add the member
then reboot bot again in order for bot to function
it's weird cuz it started doing this few days ago and now it stays like that :/
i'm thinking if it has something to do w/ members table in mysql that is causing this problem :/

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #13 on: March 31, 2006, 01:36:23 pm »
Drop the members table completely so a members table doesn't exsist on your mysql server. When you start up the bot it should setup/create a new members table and get all the members. After that there shouldn't be a problem when restarting. If you do have a problem on a restart then I have no clue what's going on other than a bad SQL config.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: An existing connection was forcily closed by the remote host.
« Reply #14 on: March 31, 2006, 06:28:44 pm »
Possible that your "bot" is inside the members table, don't make the bot a member ;)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 413
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal