Agent Name Server
User Guide


Index | Overview | Requirements | Querying an ANS
Starting an ANS | ANS for Windows | Javadocs | Bug Report


Starting an ANS (Option 1)

If there are no Agent Name Servers running on your network, you will need to start one.

An Agent Name Server can be launched on your machine manually at the Unix command prompt or via the ANS Graphical User Interface (ANSGUI). Two complete sets of instruction are available, one set for each startup method. Each set is independent of the other, so feel free to jump directly to the method you prefer. The manual method is below, the ANSGUI method is on the next page.

Starting ANS at the command prompt | Starting ANS with the GUI


Starting ANS at the Command Prompt

  1. Check your CLASSPATH at the command prompt by typing "echo $CLASSPATH" followed by a carriage return <CR>. You should see the following CLASSPATH setting on your screen: /afs/cs.cmu.edu/project/pleiades/java/pleiade_classes/java
  2. Verifying CLASSPATH Example
    echo $CLASSPATH <CR>
    /afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java

    If your CLASSPATH is not set properly, please follow the directions for setting your CLASSPATH on the System and Other Requirements Page.


  3. Note the variables that need to be set at the time of startup:

    :ANSname The logical name for your Agent Name Server
    :ANShost The hostname for your ANS server
    :ANSport The reserved port ID on which your ANS will run. We typically use port 6677, but you are free to choose your own port number
    :UseBackup The directory assigned to logging the agents registered with your ANS. If your ANS crashes but the agents registered with it are still running, the Backup directory will remember their addresses during ANS restart.


  4. Start the Agent Name Server on your machine. The basic command for running the ANS Java program is:

    java EDU.cmu.softagents.misc.ANS.AgentNameServer :ANSname <ANS name> :ANShost <hostname> :ANSport <port number> :UseBackup <backup directory>

    Starting ANS Example
    java EDU.cmu.softagents.misc.ANS.AgentNameServer :ANSname midea :ANShost midea :ANSport 6677 :UseBackup /tmp/ANSmidea <CR>
    Creating ANS socket at port 6677...
    Done

    Your ANS should now be running. To test your ANS and register agent names with it, go back to Testing your ANS.

    If you receive an "Address already in use" error, try changing the port number of your ANS and running the ANS again. If you receive a "can't find class..." error, make sure you have set your CLASSPATH properly and that the program you are trying to run has been compiled. For more information on compiling Java programs, go to the Javac Compiler Page on the JavaSoft Website.

Next Page: Starting ANS with the GUI
Previous Page: Querying an ANS


Copyright 1999 © Software Agents Group
Send questions and comments to:
Pleiades
<pleiades@cs.cmu.edu>
Software Agents Group
Internal Site
Robotics Institute