Crash bug in tweaked TourGuide???

Crash bug in tweaked TourGuide???

Postby Cale Vinson » Tue May 11, 2010 3:05 pm

Oh look, its me again. :)

We wanted to get a TourGuide Iam running in Caledonia. The TourGuide sample Iam you provide was (almost) perfect - great functionality, and very easy to use, what's not to love? :) The only problem I saw was that it used the "navigate" functions to walk around, and, although I could be wrong, I assumed they needed a navigation map to work. And, as detailed in another thread, navigation-map creation is a little tricky at the moment.

So, for what was basically a demonstrator project, rather than the final version, I went through the "TourGuideBehavior.java" code, and replaced all instances of "navigate" functions with "walk" functions. Resultant code is:

Code: Select all
import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.Node;

import com.avatar_reality.blue_mars.iam.framework.ActivityMode;
import com.avatar_reality.blue_mars.iam.framework.AnimationID;
import com.avatar_reality.blue_mars.iam.framework.Entity;
import com.avatar_reality.blue_mars.iam.framework.Orientation;
import com.avatar_reality.blue_mars.iam.framework.behavior.ActionSequence;
import com.avatar_reality.blue_mars.iam.framework.behavior.ActionSequenceFactory;
import com.avatar_reality.blue_mars.iam.framework.behavior.NavigatingBehavior;
import com.avatar_reality.blue_mars.iam.map.Location;
import com.avatar_reality.blue_mars.iam.util.XMLUtil;
import com.avatar_reality.blue_mars.chat.ChatProcessor;
import com.avatar_reality.blue_mars.chat.ChatRule;
import com.avatar_reality.blue_mars.chat.ChatUtil;

public class TourGuideBehavior
   extends NavigatingBehavior
{
   public static final String NAME = "TourGuideBehaviour";

   private static final double SERVING_DISTANCE = 3;
   private static final double MAX_DISTANCE = 5.0;
   private static final int MAX_WAIT = 30000;
   private static final int WAIT_TO_START = 30000;

   private Logger _logger = Logger.getLogger(TourGuideBehavior.class);

   private ChatProcessor _chatProcessor;
   private String _xmlFile;
   private String _chatlFile;
   private String _cityName;
   private String _theTour;
   private List<Tour> _tourList;
   private ActionSequence _currentSequence;
   private Entity _tourist;
   private Tour _tour;
   private int _poiIndex;
   private long _timeToGoToNext = Long.MAX_VALUE;
   private long _waitStart;
   private long _facingTime;
   private boolean _goToSingleLocation = false;

   public TourGuideBehavior()
   {
      setBehaviorName(NAME);
   }
   
   public String getXmlFile()
   {
      return _xmlFile;
   }

   public void setXmlFile(String fileName)
   {
      _xmlFile = fileName;
   }
   
   public String getChatLFile()
   {
      return _chatlFile;
   }

   public void setChatLFile(String fileName)
   {
      _chatlFile = fileName;
   }
   
   @SuppressWarnings("unchecked")
   public void init()
   {
      _chatProcessor = new ChatProcessor();
      
      _tourList = new ArrayList<Tour>();
      
      try
      {
         XMLUtil.addChatLFile(_chatProcessor, _chatlFile, this, true);

         Document document = XMLUtil.parseXMLDocument(_xmlFile, getClass());
         Node toursNode = document.selectSingleNode("//Tours");
         _cityName = toursNode.selectSingleNode("@cityName").getStringValue();
         List<Node> tourNodes = toursNode.selectNodes("Tour");
         for (Node tourNode : tourNodes)
         {
            Tour tour = new Tour();
            String tourName = tourNode.selectSingleNode("@name").getStringValue();
            tour.setName(tourName);
            ArrayList<PointOfInterest> poiList = new ArrayList<PointOfInterest>();
            tour.setPointList(poiList);
            _tourList.add(tour);
            List<Node> poiNodeList = tourNode.selectNodes("POI");
            for (Node poiNode : poiNodeList)
            {
               PointOfInterest poi = new PointOfInterest();
               String poiName = poiNode.selectSingleNode("@name").getStringValue();
               poi.setName(poiName);
               String x = poiNode.selectSingleNode("@x").getStringValue();
               String y = poiNode.selectSingleNode("@y").getStringValue();
               String z = poiNode.selectSingleNode("@z").getStringValue();
               Location location = new Location(Double.parseDouble(x),Double.parseDouble(y),Double.parseDouble(z));
               poi.setLocation(location);
               List<Node> lines = poiNode.selectNodes("line");
               ArrayList<String> informationList = new ArrayList<String>();
               for (Node lineNode : lines)
               {
                  String line = lineNode.selectSingleNode("@content").getStringValue();
                  informationList.add(line);
               }
               poi.setInformation(informationList);
               poiList.add(poi);
            }
         }         
      }
      catch (Exception exception)
      {
         _logger.error("Exception: "+exception.getMessage());
      }
   }
   
   public void update()
   {
      super.update();
      
      long t = System.currentTimeMillis();

      if (t>_timeToGoToNext && !isGuiding() && isBotIdle() && !getBotLocation().equals(getSpawnLocation()))
         walk(getSpawnLocation());

      if (isGuiding() && isBotIdle() && _tourist!=null && System.currentTimeMillis()>_facingTime)
      {
         face(_tourist.getLocation());
         _facingTime = System.currentTimeMillis();
      }
         
      if (isGuiding() && isBotIdle() && t>_timeToGoToNext && _poiIndex>=_tour.getPointList().size())
      {
         removeBalloons();
         say("This completes our "+_tour.getName()+" tour.");
         say("I hope you enjoyed it and wish you a pleasant stay in "+_cityName);
         stopGuiding();
         _timeToGoToNext = t+6000;
      }
      if (isGuiding() && isBotIdle() && t>_timeToGoToNext)
      {
         _logger.info("Going to next POI "+_tour.getPointList().get(_poiIndex).getName());
         removeBalloons();
         if (_goToSingleLocation==false)
         {
            if (_poiIndex==0)
               choosePhrase("Let's get started.","Shall we start?","OK...");
            else
            {
               choosePhrase("Let's continue",
                     "On to the next location.",
                     "Shall we go on?",
                     "Time to move on.",
                     "Next stop...",
                     "Let's see what else we have...");
            }
         }
         PointOfInterest poi = _tour.getPointList().get(_poiIndex);
         _logger.info("Walk to "+poi.getLocation());
         walk(poi.getLocation());
         _timeToGoToNext = Long.MAX_VALUE;
         return;
      }
      if (isGuiding() && isBotIdle() && !isBotMoving() && _poiIndex<_tour.getPointList().size()
            && isNear(_tour.getPointList().get(_poiIndex).getLocation()))
      {
         _logger.info("arrived at POI "+_tour.getPointList().get(_poiIndex).getName());
         removeBalloons();
         PointOfInterest poi = _tour.getPointList().get(_poiIndex);
         for (String line : poi.getInformation())
            say(line);
         _poiIndex++;
         _timeToGoToNext = System.currentTimeMillis() + 20000;
         if (_goToSingleLocation)
         {
            stopGuiding();
            _goToSingleLocation = false;
            _timeToGoToNext = System.currentTimeMillis() + 60000;
         }
         return;
      }

      if (getActivityMode()==ActivityMode.GUIDING && _tourist.getLocation().getDistance(getBotLocation())>MAX_DISTANCE)
      {
         removeBalloons();
         _logger.info("Need to wait for the tourist");
         stop();
         setActivityMode(ActivityMode.WAITING);
         _waitStart = System.currentTimeMillis();
         choosePhrase("","Come...", "", "It's this way.", "", "Shall we go on?", "", "Trust me, I know where we're going.", "", "I'm sorry, we don't have a 'follow' feature yet.");
         if (Math.random()*10<5)
            face(_tourist.getLocation());
         if (Math.random()*10<2)
            action(AnimationID.AR_TapFoot_01_Female, AnimationID.AR_TapFoot_01_Female_Duration);
      }
      if (getActivityMode()==ActivityMode.WAITING && _tourist.getLocation().getDistance(getBotLocation())>MAX_DISTANCE && System.currentTimeMillis()-_waitStart>MAX_WAIT)
      {
         setActivityMode(ActivityMode.WALKING);
         stopGuiding();
      }
      if (getActivityMode()==ActivityMode.WAITING && _tourist.getLocation().getDistance(getBotLocation())<2)
      {
         removeBalloons();
         _logger.info("Tourist approached, continue..");
         setActivityMode(ActivityMode.GUIDING);
         PointOfInterest poi = _tour.getPointList().get(_poiIndex);
         walk(poi.getLocation());
         choosePhrase("Let's go","", "Just a little further...", "", "Please try to keep up.", "", "Vamos");
      }
      if (t-getBotLastActionTime()>60000 && _tourist!=null && _tourist.getLocation().getDistance(getBotLocation())<SERVING_DISTANCE)
      {
         pickAdvice();
      }
   }

   /**
    *
    */
   private void pickAdvice()
   {
      choosePhrase("You can ask me things like:",
            "Try asking:",
            "You could try:",
            "I respond to things like:",
            "The type of requests I understand are:");
      choosePhrase("Take me to <location>",
            "Which way is the <location>?",
            "What tours are there?",
            "Take me on the <tour-name> tour.",
            "Describe the <tour-name> tour.");
   }
   
   public synchronized void receiveSayAction(final String entityName, final String text)
   {
      Entity entity = findEntity(entityName);
      if (entity.getLocation().getDistance(getBotLocation())>SERVING_DISTANCE || entity.isIam())
         return;
      
      try
      {
         if (!_chatProcessor.processInput(text,entityName))
            say("I'm sorry, I don't understand. I'm a simple bot, so please keep your questions simple. Type 'help' for examples.");
         else
            _tourist = entity;
         if (_tourist!=null && System.currentTimeMillis()>_facingTime)
            face(_tourist.getLocation());
      }
      catch (Throwable exception)
      {
         _logger.error("Exception while parsing: "+exception.getMessage());
         say("Sorry, I had an error processing that.");
      }
   }
   
   public void receiveMoveAction(String entityName, Location fromLocation, Location toLocation, Orientation orientation, double speed)
   {
      if (_tourist!=null && _tourist.getEntityName().equals(entityName) && fromLocation.getDistance(getBotLocation())>15)
         stopGuiding();
   }
   
   public void receiveDisappearAction(String entityName)
   {
      if (_tourist!=null && _tourist.getEntityName().equals(entityName))
         stopGuiding();
   }
   
   private void startGuiding()
   {
      if (_currentSequence==null)
      {
         _logger.trace("request to start guiding");
         ActionSequence guidingSequence = ActionSequenceFactory.getSingleton().createProhibitiveSequence(this);
         guidingSequence.setAllowsAnimationInterrupt(true);
         
         if (requestActionSequence(guidingSequence))
         {
            _logger.trace("request to start guiding granted");
            _currentSequence = guidingSequence;
            _poiIndex = 0;
            setActivityMode(ActivityMode.GUIDING);
         }
         else
            _logger.debug("Sequence request rejected");
      }
   }
   
   private void stopGuiding()
   {
      _theTour = null;
      _logger.info("Stop guiding.");
      setActivityMode(ActivityMode.IDLE);
      if (_currentSequence!=null)
      {
         endActionSequence(_currentSequence);
         _currentSequence = null;
         _tourist = null;
         _tour = null;
      }
   }
   
   private boolean isGuiding()
   {
      return _currentSequence!=null;
   }
   
   public void answerHello(List<StringBuilder> parameters, ChatRule rule)
   {
      removeBalloons();
      stop();
      String entityName = parameters.get(1).toString().trim();
      removeBalloons();
      _tourist = findEntity(entityName);
      if (_tourist==null)
      {
         _logger.error("Couldn't find entity named "+entityName);
         return; // Something strange.
      }
      face(_tourist.getLocation());
      choosePhrase("Welcome to "+_cityName+". I'm a tour-guide. How may I help you?",
            "Hello. If you'd like to know what "+_cityName+" has to offer, take a tour with me. I'm here to show you around.",
            "Hi. To get the most out of your stay here in "+_cityName+", let me be your guide.");
   }

   public void answerBye(List<StringBuilder> parameters, ChatRule rule)
   {
      _theTour = null;
      removeBalloons();
      choosePhrase("Good-bye. Thanks for visiting and please come again soon.",
            "Bye. Don't get lost now.");
      String entityName = parameters.get(1).toString().trim();
      if (_tourist!=null && _tourist.getEntityName().equals(entityName))
      {
         stop();
         walk(getSpawnLocation());
      }
   }
   
   public void answerThanks(List<StringBuilder> parameters, ChatRule rule)
   {
      removeBalloons();
      choosePhrase("You're welcome.", "Have a nice time in "+_cityName+".", "It was my pleasure.");
   }
   
   public void answerStop(List<StringBuilder> parameters, ChatRule rule)
   {
      removeBalloons();
      stopGuiding();
      walk(getSpawnLocation());
   }
   
   public void answerHelp(List<StringBuilder> paramaters, ChatRule rule)
   {
      removeBalloons();
      stop();
      say("You can ask me about tours and locations. You could start with saying:");
      choosePhrase("-What tours are there?","-What tours do you have?", "-List the tours you have.");
   }
   
   public void answerWhatTours(List<StringBuilder> parameters, ChatRule rule)
   {
      _theTour = null;
      String firstName = listTours();
      if (firstName!=null)
      {
         choosePhrase("You can also ask things like:", "Next try asking:", "You can instruct me by typing:");
         choosePhrase("-Describe the "+firstName+" tour.", "-List the "+firstName+" tour", "-Explain the "+firstName+" tour.");
         choosePhrase("-Take me on the "+firstName+" tour.", "-Let's go on the "+firstName+" tour.", "-Show the "+firstName+" tour.");
      }
   }

   /**
    * @param firstName
    * @return
    */
   private String listTours()
   {
      _theTour = null;
      String firstName = null;
      removeBalloons();
      choosePhrase("We have the following tour(s) in "+_cityName+":", "The tour(s) we have available in "+_cityName+" are:");
      for (Tour tour : _tourList)
      {
         say("- "+tour.getName());
         if (firstName==null)
            firstName = tour.getName();
      }
      return firstName;
   }
   
   public void answerDescribeTour(List<StringBuilder> parameters, ChatRule rule)
   {
      Tour tourToDescribe = null;
      _theTour = parameters.get(1).toString();
      for (Tour tour : _tourList)
      {
         if (ChatUtil.looselyMatch(tour.getName(), _theTour))
            tourToDescribe = tour;
      }
      if (tourToDescribe==null)
      {
         say("Sorry, I don't have any tour named '"+_theTour+"'");
         listTours();
         return;
      }
      
      removeBalloons();
      choosePhrase("The locations we'll visit on the "+tourToDescribe.getName()+" tour are: ",
            "What you'll see during the "+tourToDescribe.getName()+" tour:");
      for (PointOfInterest poi : tourToDescribe.getPointList())
         say("- "+poi.getName());
   }
   
   public void answerTakeTour(List<StringBuilder> parameters, ChatRule rule)
   {
      String entityName = parameters.get(parameters.size()-1).toString();
      Tour tourToTake = null;
      String tourName = parameters.get(1).toString().trim();
      for (Tour tour : _tourList)
      {
         if (ChatUtil.looselyMatch(tour.getName(), tourName))
            tourToTake = tour;
      }
      if (tourToTake==null)
      {
         for (Tour tour : _tourList)
         {
            if (ChatUtil.looselyMatch(tour.getName(), tourName))
            {
               if (tourToTake==null)
                  tourToTake = tour;
               else
               {
                  say("I have more than one tour with '"+tourName+"' in it. Please be more specific.");
                  return;
               }
            }
         }
         if (tourToTake==null)
         {
            say("Sorry, I don't have any tour named '"+tourName+"'");
            listTours();
            return;
         }
      }
      
      _tour = tourToTake;
      removeBalloons();
      choosePhrase("OK, let's get started.", "Ready to go on a tour?");
      say("Anytime you'd like to stop taking the tour, just say 'stop'.");
      say("We'll be leaving in 30 sec.");
      _timeToGoToNext = System.currentTimeMillis() + WAIT_TO_START;
      _tourist = findEntity(entityName);
      startGuiding();
   }
   
   public void answerTakeTheTour(List<StringBuilder> parameters, ChatRule rule)
   {
      if (_theTour==null)
      {
         if (_tourList.size()>1)
         {
            listTours();
            return;
         }
         _theTour = _tourList.get(0).getName();
      }
      
      String entityName = parameters.get(parameters.size()-1).toString();
      Tour tourToTake = null;
      for (Tour tour : _tourList)
      {
         if (ChatUtil.looselyMatch(tour.getName(), _theTour))
            tourToTake = tour;
      }
      if (tourToTake==null)
         return; // Something wrong?
      
      _tour = tourToTake;
      removeBalloons();
      choosePhrase("OK, let's get started.", "Ready to go on a tour?");
      say("Anytime you'd like to stop taking the tour, just say 'stop'.");
      say("We'll be leaving in 30 sec.");
      _timeToGoToNext = System.currentTimeMillis() + WAIT_TO_START;
      _tourist = findEntity(entityName);
      startGuiding();
   }
   
   public void answerWhereIs(List<StringBuilder> parameters, ChatRule rule)
   {
      String parameter = parameters.get(1).toString().trim();
      String locationName = parameter.toLowerCase();
      for (Tour tour : _tourList)
      {
         for (PointOfInterest poi : tour.getPointList())
         {
            String poiName = poi.getName().toLowerCase();
            if (ChatUtil.looselyMatch(locationName, poiName))
            {
               face(poi.getLocation());
               _facingTime = System.currentTimeMillis() + 20000;
               say("The "+locationName+" is that way.");
               action(AnimationID.AR_PointExactly_01_Female, AnimationID.AR_PointExactly_01_Female_Duration);
               int distance = (int)getBotLocation().getDistance(poi.getLocation());
               say("It's about "+distance+" meter from here");
               return;
            }
         }
      }
      say("Sorry, but I don know any '"+parameter+"'");
   }
   
   public void answerTakeToLocation(List<StringBuilder> parameters, ChatRule rule)
   {
      String parameter = parameters.get(1).toString().trim();
      String locationName = parameter.toLowerCase();
      for (Tour tour : _tourList)
      {
         int index = 0;
         for (PointOfInterest poi : tour.getPointList())
         {
            String poiName = poi.getName().toLowerCase();
            if (ChatUtil.looselyMatch(locationName, poiName))
            {
               _goToSingleLocation = true;
               say("Follow me...");
               _timeToGoToNext = System.currentTimeMillis() + 10000;
               startGuiding();
               _poiIndex = index;
               _tour = tour;
               return;
            }
            index++;
         }
      }
      say("Sorry, but I don know any '"+parameter+"'");
   }
   
   public void answerLocation(List<StringBuilder> parameters, ChatRule rule)
   {
      String parameter = parameters.get(1).toString().trim();
      String locationName = parameter.toLowerCase();
      for (Tour tour : _tourList)
      {
         int index = 0;
         for (PointOfInterest poi : tour.getPointList())
         {
            String poiName = poi.getName().toLowerCase();
            if (ChatUtil.looselyMatch(locationName, poiName))
            {
               say("You want me to take you to the "+locationName+"?");
               say("Try saying: 'take me to the "+locationName+"'");
               return;
            }
            index++;
         }
      }
      say("Sorry, but I didn't understand that.");
      pickAdvice();
   }
   
   public void reply(List<StringBuilder> parameters, ChatRule rule)
   {
      _logger.info("reply");
      if (rule.getFixedAnswer()==null)
         return;

      stay();
      Entity entity = findEntity(parameters.get(parameters.size()-1).toString());
      face(entity.getLocation());

      for (String line : rule.getFixedAnswer())
         say(line);
   }
}



The Iam initially looked to be working fine in Caledonia - despite my minor tweaks, it seemed to have all the TourGuide functionality working properly.

Unfortunately, it also crashes sometimes, and, as Murphy decrees, usually only after quite some time (last night I kept an eye on it for four hours, during which it didn't crash at all).

Here's the "avatar.log" file from the latest crash:

Code: Select all
0    [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from file [C:\Iams\TourGuide_NoMap\TourGuide.xml]
2406 [main] INFO  root  - Connect avt35090
3188 [Thread-1] INFO  com.avatar_reality.blue_mars.iam.util.XMLUtil  - TourGuide.chatl OK
5226594 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
10991813 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
13748797 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
21161625 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
23864328 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
26650609 [Thread-1] INFO  TourGuideBehavior  - Stop guiding.
33945453 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33945453 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
   java.net.SocketException: Connection reset
33945516 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
   java.net.SocketException: Connection reset
   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
   at java.net.SocketInputStream.read(Unknown Source)
   at java.io.BufferedInputStream.fill(Unknown Source)
   at java.io.BufferedInputStream.read(Unknown Source)
   at java.io.DataInputStream.readByte(Unknown Source)
   ... 7 more
33945531 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
33945531 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33945531 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33945531 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33945563 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33945563 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33945563 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33945922 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33945922 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33945922 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33945938 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33945969 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33945969 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33945969 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33945984 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33946016 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946016 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946016 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946016 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946063 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946063 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946063 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33946063 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33946063 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33946094 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33946094 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33946094 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33946141 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946141 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946141 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946141 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946172 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946172 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946188 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33946188 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33946188 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33946188 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33946188 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33946203 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33946250 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946250 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946266 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946266 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946266 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946266 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946297 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33946297 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33946297 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33946297 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33946297 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33946313 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33946328 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946328 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946344 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946359 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946359 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946359 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946375 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33946375 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33946375 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33946406 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while retrieving message for bot avt35090
33946406 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33946406 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 9 more
33946438 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946438 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946453 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946469 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946469 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946484 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946484 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown Source)
33946500 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1226)
33946500 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)
33946406 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - avt35090: Connection to server lost. Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
33946500 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com
   at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
   at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.sendPropagateData(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSyncMicroCity(TKClientAdapter.java:180)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSync(TKClientAdapter.java:103)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.stay(TKClientAdapter.java:714)
   at com.avatar_reality.blue_mars.iam.framework.BotProxy.stay(BotProxy.java:492)
   at com.avatar_reality.blue_mars.iam.framework.BotProxy.update(BotProxy.java:120)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$BotUpdater.run(TKClientAdapter.java:1156)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: ai.bluemars.com
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at java.net.Socket.<init>(Unknown Source)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
   ... 14 more
33946563 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
33946563 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
33946563 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
33946563 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke(Unknown Source)
33946563 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
33946594 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
33946594 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.sendPropagateData(Unknown Source)
33946594 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSyncMicroCity(TKClientAdapter.java:180)
33946594 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSync(TKClientAdapter.java:103)
33946609 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter.stay(TKClientAdapter.java:714)
33946609 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.iam.framework.BotProxy.stay(BotProxy.java:492)
33946609 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.iam.framework.BotProxy.update(BotProxy.java:120)
33946625 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - com.avatar_reality.blue_mars.tkclient.TKClientAdapter$BotUpdater.run(TKClientAdapter.java:1156)
33946641 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown Source)



I confess its mostly gobbledygook to me. :)

I wondered whether there might be issues with connections to the Iam server, since the following appeared in the log several times:

Code: Select all
33946500 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.UnknownHostException: Unknown host: ai.bluemars.com; nested exception is:
   java.net.UnknownHostException: ai.bluemars.com


Whilst I may well have broken the Iam with my minor tweaks, it doesn't look like it was going through its TourGuide paces when it crashed - the few "TourGuideBehavior" messages found in the log occur at the start.

Iam stability is a big issue for us, both for the TourGuide Iams, and other projects, like interfacing with Jabber.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Crash bug in tweaked TourGuide???

Postby admin » Tue May 11, 2010 6:38 pm

First of all, the change you made was not necessary. It's true the navigation only works when it has a map. But in absence of the map it will try to walk to its destination in a straight line. So it already does what you're trying to do.

With respect to the error you're seeing, that looks like the connection got lost somehow. But it's impossible to say for sure where in the chain it went wrong. There was a time when the Iams could literally run for days without problems. But recently I have seen the connection gets lost on occasion. This may have changed when we moved to the ai.bluemars.com domain which is hosted externally. I'll ask the sysadmin here to see what he can find out.

Other than that I don't know how to help you right now. If this is a common problem that persists and we can't solve any other way, I might look into building a mechanism that tries to re-establish the connection more actively than it does now.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Crash bug in tweaked TourGuide???

Postby Cale Vinson » Mon May 24, 2010 6:59 am

Trying to work out what happens when a bot (or Iam) loses connection is, obviously, a very difficult task, so what I'm trying to do here is log information that may eventually prove useful ........

I'm not running the TourGuide Iam at the moment, currently I'm directing all my efforts to the SL <-> BM Iam I spoke of in other threads. I ran the "Jabber Bridge" Iam successfully for 12 hours straight. Made a change to the XML to move it from IamTown to Caledonia, and it crashed after four hours.

Log:

Code: Select all

3813 [main] INFO  root  - Connect avt35090
5697719 [Thread-1] INFO  com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Ack: #50 ACK
12237719 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception while

retrieving message for bot avt35090
12237719 [Thread-2] ERROR com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - class

java.rmi.NoSuchObjectException: no such object in table
12237750 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.NoSuchObjectException: no such object in table
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.retrieveMessages(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1229)
   at java.lang.Thread.run(Unknown Source)
12237766 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
12237766 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
12237766 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke

(Unknown Source)
12237766 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
12237766 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
12237781 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - avt35090: Connection to server

lost. no such object in table
12237797 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - Unexpected exception:
java.rmi.NoSuchObjectException: no such object in table
   at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
   at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
   at sun.rmi.server.UnicastRef.invoke(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
   at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
   at $Proxy1.sendPropagateData(Unknown Source)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSyncMicroCity(TKClientAdapter.java:180)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSync(TKClientAdapter.java:103)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter.stay(TKClientAdapter.java:717)
   at com.avatar_reality.blue_mars.iam.framework.BotProxy.stay(BotProxy.java:492)
   at com.avatar_reality.blue_mars.iam.framework.BotProxy.update(BotProxy.java:120)
   at com.avatar_reality.blue_mars.tkclient.TKClientAdapter$BotUpdater.run(TKClientAdapter.java:1159)
   at java.lang.Thread.run(Unknown Source)
12237844 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
12237844 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
12237844 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - sun.rmi.server.UnicastRef.invoke

(Unknown Source)
12237875 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
12237875 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
12237875 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.sendPropagateData(Unknown

Source)
12237875 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSyncMicroCity(TKClientAdapter.java:180)
12237875 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.tkclient.TKClientAdapter.sendSync(TKClientAdapter.java:103)
12237922 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.tkclient.TKClientAdapter.stay(TKClientAdapter.java:717)
12237922 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.iam.framework.BotProxy.stay(BotProxy.java:492)
12237922 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.iam.framework.BotProxy.update(BotProxy.java:120)
12237922 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.tkclient.TKClientAdapter$BotUpdater.run(TKClientAdapter.java:1159)
12237797 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - $Proxy1.retrieveMessages(Unknown

Source)
12237922 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  -

com.avatar_reality.blue_mars.tkclient.TKClientAdapter$MessageRetriever.run(TKClientAdapter.java:1229)
12237969 [Thread-2] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown

Source)
12237922 [Thread-1] FATAL com.avatar_reality.blue_mars.tkclient.TKClientAdapter  - java.lang.Thread.run(Unknown

Source)
20335375 [Thread-3] INFO  com.avatar_reality.blue_mars.iam.IamMain  - Log out all Iams.



On our server, the SL-bot program "Metabolt", and my own SL-bot handling the incoming messages from the BM-Iam, ran continuously across the time of the Iam crash, ie., I have no reason to think that our server lost connection to the net in that period. "Metabolt" may have restart-on-lost-connection ability (I don't know much about it), but my own SL bot is very crude and doesn't.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Crash bug in tweaked TourGuide???

Postby admin » Mon May 24, 2010 8:47 pm

I'm afraid we'll only be able to figure this out by some trial and error. I have made a small change that may improve things, but I'm not sure if it's a comprehensive solution. I'll log in an Iam in Iam Town and see how long it stays there.

Mark
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Crash bug in tweaked TourGuide???

Postby Cale Vinson » Wed May 26, 2010 4:04 pm

I had another thought on debugging my Iam stability issues Mark.

Up until now, I've been using the two Iams I'm interested in deploying "operationally", your TourGuide, and my Jabber Iam. When they've crashed, they haven't crashed in "my" part of the code, but one can never rule out some sort of odd interaction. So, do you think it would be useful for me to take a "step back" and just take your template Iam, tweak the xml to account for identity and city-location (Caledonia), and monitor the stability of that setup instead?

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Crash bug in tweaked TourGuide???

Postby admin » Wed May 26, 2010 6:52 pm

I have been running a very basic Iam in Iam Town for two days now with no interruption. So maybe the change I made helped some.

But it's nearly impossible to rule out potential disconnections. There are two ways to solve this. The hard one is for me to build in some monitoring code that re-establishes the connection when something goes wrong. However, it's very hard to catch every possible problem this way. But at some point I might try to catch at least the most obvious problems.

An easier, but less desirable solution is to simply restart the Iam when it crashes. It's fairly easy to write a script that checks if the bot is running, and if not restart it. The main disadvantage is that the Iam gets sent back to its spawn-point. But that can be solved fairly easily too by saving its location every few seconds and reading it upon startup.

When they've crashed, they haven't crashed in "my" part of the code, but one can never rule out some sort of odd interaction.


Although I can never rule out the possibility of your code crashing the Iam, I have gone to some length to ensure that it's pretty hard to crash an Iam from within. If your behavior code crashes it simply shuts down the offending behavior module. Of course, if that's your only behavior module that means rendering it unresponsive. But it won't crash the Iam.

What I could consider making at some point is including some options for each behavior what to do when something goes wrong. Shutting down the offending behavior (what it does now), shutting down the Iam, restarting the behavior, or restarting the Iam. But it will be some time before I get around all that.

Mark Boon
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Crash bug in tweaked TourGuide???

Postby Cale Vinson » Thu May 27, 2010 1:37 am

Thanks for your reply Mark, I appreciate the amount of time you're putting into this. :)

admin wrote:I have been running a very basic Iam in Iam Town for two days now with no interruption. So maybe the change I made helped some.


Mine was still crashing yesterday, but the above is good news indeed! Can I just quickly check - is there any possibility that running an Iam in Caledonia would be less stable than running in IamTown?

admin wrote:Although I can never rule out the possibility of your code crashing the Iam, I have gone to some length to ensure that it's pretty hard to crash an Iam from within. If your behavior code crashes it simply shuts down the offending behavior module. Of course, if that's your only behavior module that means rendering it unresponsive. But it won't crash the Iam.


Oops, sorry Mark, I have indeed been very careless with my language when talking about "crashing", what happens is exactly what you describe, the behaviour module goes dead.

admin wrote:An easier, but less desirable solution is to simply restart the Iam when it crashes. It's fairly easy to write a script that checks if the bot is running, and if not restart it. The main disadvantage is that the Iam gets sent back to its spawn-point. But that can be solved fairly easily too by saving its location every few seconds and reading it upon startup.

What I could consider making at some point is including some options for each behavior what to do when something goes wrong. Shutting down the offending behavior (what it does now), shutting down the Iam, restarting the behavior, or restarting the Iam. But it will be some time before I get around all that.


I've been starting to think about restarting too. The bit that I'm missing is how to detect when the Jabber behaviour module shuts down. In some ways, it might be easier to detect a crash (yes, I mean a real crash now :) ), so an option to have behaviour-shutdown force a comple Iam shutdown would be useful, but I understand about available time too. :)

So far, the only idea I have is a truly horrible kludge. I could modify my Jabber Behaviour so that it provides some kind of "I'm alive" signal, perhaps by writing a tiny file to the hard-drive every couple of minutes. I could then add a "Monitor Behaviour" that periodically checks the date-time stamp on that file, and once it stops increasing I know the Jabber Behaviour has died. I don't have access to the Iam docs as I type this, but I assume I can shut down an Iam completely from within a Behaviour? If so, I could then do as you suggest, have some sort of external script/program running that checks that the Iam is running, and restarts it if it isn't. For the Jabber bot, I'm in the fortunate position that it doesn't really need to remember anything like its position.

I'm happy to do the "grunt work" on this, but if you see flaws in the above or have a less kludgy idea I've love to hear about it.

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Crash bug in tweaked TourGuide???

Postby admin » Thu May 27, 2010 2:41 am

Mine was still crashing yesterday, but the above is good news indeed! Can I just quickly check - is there any possibility that running an Iam in Caledonia would be less stable than running in IamTown?


Traffic to Caledonia will be higher than Iam Town. Still, I can't think of a good reason why one would be more stable than the other.

So far, the only idea I have is a truly horrible kludge. I could modify my Jabber Behaviour so that it provides some kind of "I'm alive" signal, perhaps by writing a tiny file to the hard-drive every couple of minutes. I could then add a "Monitor Behaviour" that periodically checks the date-time stamp on that file, and once it stops increasing I know the Jabber Behaviour has died. I don't have access to the Iam docs as I type this, but I assume I can shut down an Iam completely from within a Behaviour?


At the moment a behavior has no way to shut down or log out an Iam in a clean way. I believe you can currently do a System.exit(), but you can't count on that always being allowed. The reason is it may not be a good idea to give a behavior module that kind of level of control. That may sound overly cautious now, but once you get Iams with different modules written by different people things get tricky. So I have to think carefully what would be a good way to facilitate this. I hadn't really thought about the need for this until now.

For now, what you can do is keep a variable in your behavior when was the last time it did something. And make this variable available through a getLastJabberTime() function or something like that. Then you make a simple monitoring behavior which in the update() function calls something like this: ((JabberBehavior)getDecisionUnit().getBehavior("JabberBehavior")). getLastJabberTime() (This is assuming your behavior class is called JabberBehavior and you have initialized its NAME accordingly.) And then call System.exit(0) when it was too long ago. Until I've thought of a better way to do something like that.

If suitable, you can also call one of the getBotLastXXXTime() functions instead of making your own.

Mark Boon
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Re: Crash bug in tweaked TourGuide???

Postby Cale Vinson » Thu May 27, 2010 3:51 am

OK, the above covers what I'll call a "behaviour failure" - in my case where the Jabber behaviour stops working because it loses connection to the Jabber server or something.

How does one deal with (identify) what I'll call a "bot failure", for example, when the bot itself loses connection to "ai.bluemars.com" as happens in one of the logs above? The java program does not stop executing in this case - you see the loss of connection message, but can still type 'quit' into the console and get that message about logging out all Iams.

Perhaps I can make the above question clearer if I explain what happens on the SL side. There, I have a python program. The main program starts up, and I explicitly create a bot via something like "client = NewBotClient()". You then go on to define event-handlers for bot behaviour, pretty much as you do for Iams. But, anywhere in the main program I could test that the bot was still working by issuing an arbitrary command "client.botDoSomething" and wrapping that in a try/except. (There are also specific query functions for things like "is the bot connected?")

I'm probably simply confused, but it seems to me that in the Iam approach I'm never sitting in that "main program" context, I'm always working "one level down" at the Behaviour level. And, presumably, I can't use a Behaviour to monitor the status of the bot itself, because all behaviours will presumably stop working when the bot does. If a bot loses connection to "ai.bluemars.com" it presumably can't receive any "say" or "move" action events, but does its "update" function still run?

- Cale
Cale Vinson
 
Posts: 25
Joined: Sun Mar 21, 2010 5:21 am

Re: Crash bug in tweaked TourGuide???

Postby admin » Thu May 27, 2010 7:14 pm

OK, I think I see what you mean. In case of a bot failure it keeps running. This was done because I would usually run more than one bot within the same application. If something went wrong in one, it would continue to run the ones that are OK. If they all stop, the program should terminate. But I've found there's a problem in the code with that, so it keeps running.

In your case you run only one. If it fails it should quit automatically, and that is currently not happening. I'll see if I can fix that. The hard part is testing it...

Mark Boon
admin
Site Admin
 
Posts: 69
Joined: Thu Feb 18, 2010 9:54 pm

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron