Loading...
 

General


EmptyBot will not run

Hi

I'm using Pogamut v3.0.11, whenever i try and run the emptybot example i get an error saying that the component bus is stopping. Anyone have any ideas why this isn't working. Below is the error that i get when i run the code.

(EmptyBot1) WARNING 13:06:20.156 Starting agent EmptyBot1-1@Ben-Laptop/208b8547-4339-6870-642b-5b1182804895
(EmptyBot1) WARNING 13:06:20.162 Connecting to SocketConnectionAddresslocalhost:3000.
(EmptyBot1) SEVERE 13:06:21.173 Fatal error happenned - component bus is stopping.
FatalErrorEvent[
Component=ComponentBusrunning=true, queue length=0
Message=Exception happened during the event propagation.
Cause=ConnectionExceptionLogCategory(Connection): java.net.ConnectException: Connection refused: connect (localhost:3000)
Cause stacktrace:
cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection.unsyncConnect(SocketConnection.java:82)
cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection.unsyncConnect(SocketConnection.java:21)
cz.cuni.amis.pogamut.base.communication.connection.impl.AbstractConnection$1.start(AbstractConnection.java:209)
cz.cuni.amis.pogamut.base.component.controller.ComponentController.start(ComponentController.java:1121)
cz.cuni.amis.pogamut.base.component.controller.ComponentController.startingChangedByStartingEvent(ComponentController.java:1003)
cz.cuni.amis.pogamut.base.component.controller.ComponentController.startingEvent(ComponentController.java:766)
cz.cuni.amis.pogamut.base.component.controller.ComponentController.access$000(ComponentController.java:115)
cz.cuni.amis.pogamut.base.component.controller.ComponentController$1.notify(ComponentController.java:175)
cz.cuni.amis.pogamut.base.component.controller.ComponentController$1.notify(ComponentController.java:171)
cz.cuni.amis.pogamut.base.component.bus.ComponentBus.notifyListenersC(ComponentBus.java:422)
cz.cuni.amis.pogamut.base.component.bus.ComponentBus.innerRaiseEvent(ComponentBus.java:527)
cz.cuni.amis.pogamut.base.component.bus.ComponentBus.processQueue(ComponentBus.java:660)
cz.cuni.amis.pogamut.base.component.bus.ComponentBus.event(ComponentBus.java:606)
cz.cuni.amis.pogamut.base.component.bus.ComponentBus.eventTransactional(ComponentBus.java:632)
cz.cuni.amis.pogamut.base.component.bus.event.ComponentBusEvents.startingTransactional(ComponentBusEvents.java:110)
cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:390)
cz.cuni.amis.pogamut.ut2004.utils.SingleUT2004BotRunner.startAgent(SingleUT2004BotRunner.java:100)
cz.cuni.amis.pogamut.ut2004.examples.EmptyBot.main(EmptyBot.java:114)
(EmptyBot1) SEVERE 13:06:21.174 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.175 Calling Connection.kill().
(EmptyBot1) SEVERE 13:06:21.176 Can't close socket reader - null
(EmptyBot1) SEVERE 13:06:21.176 Can't close socket writer - null
(EmptyBot1) SEVERE 13:06:21.339 Connection.kill()ed.
(EmptyBot1) SEVERE 13:06:21.340 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.340 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.340 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.345 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.345 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.346 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.346 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.359 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.361 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.361 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.361 Fatal error sensed: FatalErrorPropagatingEvent[source=ComponentBusrunning=false, queue length=0, message=Exception happened during the event propagation., cause=ConnectionExceptionLogCategory(Connection): java.net.ConnectException: Connection refused: connect (localhost:3000)]
(EmptyBot1) SEVERE 13:06:21.362 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.363 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.364 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.364 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.364 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.370 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.370 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.371 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.371 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.383 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.383 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.383 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.383 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.398 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.400 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.405 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.406 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.406 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.406 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.406 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.406 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.406 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.414 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.414 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.414 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.414 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.414 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.415 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.415 Received fatal error from ComponentBus.
(EmptyBot1) WARNING 13:06:21.419 Component is in instantiated state, won't call kill().
(EmptyBot1) SEVERE 13:06:21.420 Received fatal error from ComponentBus.
12-Oct-2010 13:06:21 cz.cuni.amis.pogamut.base.utils.DefaultPogamutPlatform close
(EmptyBot1) WARNING 13:06:21.420 Component is in instantiated state, won't call kill().
WARNING: Closing the platform.
Exception in thread "main" ComponentCantStartException[UT2004BotEmptyBot1: Can't start: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1] (caused by: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1])]
(EmptyBot1) SEVERE 13:06:21.422 UT2004BotEmptyBot1: Can't start: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1] (caused by: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1])
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:408)
ComponentCantStartException[UT2004BotEmptyBot1: Can't start: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1] (caused by: ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1])]
at cz.cuni.amis.pogamut.ut2004.utils.SingleUT2004BotRunner.startAgent(SingleUT2004BotRunner.java:100)
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:408)
at cz.cuni.amis.pogamut.ut2004.utils.SingleUT2004BotRunner.startAgent(SingleUT2004BotRunner.java:100)
at cz.cuni.amis.pogamut.ut2004.examples.EmptyBot.main(EmptyBot.java:114)
Caused by: FatalErrorPropagatingEventException[ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1]]
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.processQueue(ComponentBus.java:670)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.event(ComponentBus.java:606)
at cz.cuni.amis.pogamut.ut2004.examples.EmptyBot.main(EmptyBot.java:114)
Caused by: FatalErrorPropagatingEventException[ComponentBusrunning=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotEmptyBot1]]
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.eventTransactional(ComponentBus.java:632)
at cz.cuni.amis.pogamut.base.component.bus.event.ComponentBusEvents.startingTransactional(ComponentBusEvents.java:110)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.processQueue(ComponentBus.java:670)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.event(ComponentBus.java:606)
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:390)
... 2 more

at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.eventTransactional(ComponentBus.java:632)
at cz.cuni.amis.pogamut.base.component.bus.event.ComponentBusEvents.startingTransactional(ComponentBusEvents.java:110)
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:390)
... 2 more
Java Result: 1
BUILD SUCCESSFUL (total time: 7 seconds)

Thanks for the help
Hi phry! Welcome to the forum :-)

You do not have GameBots2004 server up and running on localhost:3000

>> Cause=ConnectionExceptionLogCategory(Connection): java.net.ConnectException: Connection refused: connect (localhost:3000)

Before you may start a bot you have to start the GB2004 server first. You may do it either via Windows Start Menu item called "Start UT2004 DM server" or via UT2004 itself by starting a custom game type called GameBots2004.BotDeathMatch.

I recommend you to watch tutorial videos from here: http://diana.ms.mff.cuni.cz/main/tiki-index.php?page=Documentation

Good luck! And don't hesitate to ask another question!

Jakub aka Jimmy
thanks for the quick reply :-D

i've started a server but i premuse it can't be setting itself up properly. I can see the server in netbeans and change the map which i thought ment i must have a connection. when you run the server from the bat file how do you know if the server has started correctly? I have been getting errors saying that there was an error moving Save.tmp to Packages.md5 but this seemed to go away once i started the bat file using the "run as administator" function in vista.
Ok,

so the situation is that:
1) you may connect to the server inside NetBeans, so it shows you a map
2) the bot can't connect

My guesses are:
1) it is a firewall problem (have you allowed anybody to connect to UT2004.exe process ?)
2) some other process may block port 3000

Try this:
1) check the console window of the server, the last two lines after the start should be:
BotServerPort: 3000 ControlServerPort: 3001 ObservingServerPort: 3002
START MATCH

2) if BotServerPort is 3000 than you may check it using telnet, go to the command line (Start menu -> start -> cmd) and try:

type: telnet localhost 3000

then you should see a line:

Connecting to localhost

then it disappears and the GameBots2004 should greet you with line

HELLO_BOT

type: READY

and GB2004 will send you a hell lot of info about the environment

If this fails (i.e., the telnet won't connect or the line does not appear), than the server didn't start properly.

... btw ... if you do not have telnet, you may added easily to the OS, follow the instructions here: http://www.tech-recipes.com/rx/1793/vista_install_telnet_client/

------------

Have you succeeded? Does the GameBots2004 greet you?

Best,
Jimmy
The telnet doesn't work when i use:

telnet localhost 3000

however it does work when i use

telnet 127.0.0.1 3000

(my connection to the server through netbeans also has to use 127.0.0.1:3001 instead of localhost:3001 - could this be part of the problem?)
Wow,
so the problem lies in the "localhost" resolving.

It seems that your OS does not translate name "localhost" to 127.0.0.1 which is pretty bad.
... and correct, that's why the server is working but bots do not.
I guess we (Pogamut) should not be using "localhost" for bots connection but there we are... we have to work it out what we've got now.

Try: ping localhost

If that fails, than I suggest you to resolve the naming issues, something like: http://bytes.com/topic/asp-net/answers/645776-http-localhost-not-resolving-vista-ultimate should help.

Best,
Jimmy
It does let me ping localhost. So the problems seems to be when i ping a port on the locahost. Any ideas? :P

Appreciate the help :-)
Hmm, we did not test it yet, but this should also work.

Try to set up system property:
pogamut.ut2004.bot.host=127.0.0.1

The system property should be picked up by the bot (as default this property is "localhost").

Please, note that you will probably have to restart NetBeans or the whole system after you add a system property to Vista.

Best,
Jimmy
that worked!!!

thanks alot you made my day. been trying to work this out for weeks

Thanks again
Phry
Glad to help!

Truly, don't hasitate to ask, we're trying to resolve every issue posted here!

Nevertheless, that problem localhost127.0.0.1 may reappear in other programs too, so watch out!

Best,
Jimmy
If you're going to use UT2004ServerRunner or UT2004ObserverRunner you would also need these properties set:

pogamut.ut2004.server.host=127.0.0.1
pogamut.ut2004.observer.host=127.0.0.1

Best,
Jimmy
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.