Loading...
 

General


Connection to external server

Hi!

I've tried to connect my bot to a server that is in another computer but the log says that can't connect to the server.

I have all ports opened and there's no problem with the firewall or something like that.

Do i miss something?

Thank you
1) please post your logs

2) is the log mentioning your IP and PORT?
-- if so, I would recommend to try PUTTY over to that IP:PORT from the same machine as you're trying to connect your bot from to confirm that it is truly not a firewall issue,
protocol of GB2004 is very simplistic

received -> HELLO_BOT
send (newline at the end) bunch of messages
send periodic batch of messages about navpoints/items your bot can see

Cheers!
Jimmy
This is the log:

(Platform) WARNING 15:13:20.954 Closing the platform.
(Platform) WARNING 15:13:20.981 Shutting down!
Exception in thread "main" ComponentCantStartException[UT2004BotSmartBot1: Can't start: ComponentBusSmartBot1-3@192.168.1.134/1f8f003b-1a17-8b3e-b9fa-02480680e211, running=false, queue length=0: Exception happened during the propagation of: StartingEvent[source=UT2004BotSmartBot1] (caused by: LogCategory(Connection): java.net.ConnectException: Connection refused: connect (127.0.0.1:3000)) (caused by: LogCategory(Connection): java.net.ConnectException: Connection refused: connect (127.0.0.1:3000))]
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:474)
at cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner.startAgent(AgentRunner.java:515)
at cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner.startAgentWithParamsMain(AgentRunner.java:365)
at cz.cuni.amis.pogamut.base.agent.utils.runner.impl.AgentRunner.startAgent(AgentRunner.java:189)
at cz.cuni.amis.pogamut.ut2004.utils.UT2004BotRunner.startAgent(UT2004BotRunner.java:173)
at com.mycompany.mavenproject2.SmartBot.main(SmartBot.java:797)
Caused by: ConnectionExceptionLogCategory(Connection): java.net.ConnectException: Connection refused: connect (127.0.0.1:3000)
at cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection.unsyncConnect(SocketConnection.java:116)
at cz.cuni.amis.pogamut.base.communication.connection.impl.socket.SocketConnection.unsyncConnect(SocketConnection.java:28)
at cz.cuni.amis.pogamut.base.communication.connection.impl.AbstractConnection$1.start(AbstractConnection.java:217)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController.start(ComponentController.java:1261)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController.startingChangedByStartingEvent(ComponentController.java:971)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController.startingEvent(ComponentController.java:669)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController.access$000(ComponentController.java:113)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController$1.notify(ComponentController.java:148)
at cz.cuni.amis.pogamut.base.component.controller.ComponentController$1.notify(ComponentController.java:144)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.notifyListenersC(ComponentBus.java:452)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.innerRaiseEvent(ComponentBus.java:557)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.processQueue(ComponentBus.java:687)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.event(ComponentBus.java:630)
at cz.cuni.amis.pogamut.base.component.bus.ComponentBus.eventTransactional(ComponentBus.java:659)
at cz.cuni.amis.pogamut.base.component.bus.event.ComponentBusEvents.eventTransactional(ComponentBusEvents.java:86)
at cz.cuni.amis.pogamut.base.component.bus.event.ComponentBusEvents.startingTransactional(ComponentBusEvents.java:176)
at cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent.start(AbstractAgent.java:456)
... 5 more
(Platform) SEVERE 15:13:20.981 Shutdown.
(Platform) WARNING 15:13:21.005 ServerWorker Stopped.
------------------------
BUILD FAILURE
------------------------
Total time: 7.397s
Finished at: Thu Jan 03 15:13:21 CET 2013
Final Memory: 9M/490M
------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (default-cli) on project smartbot: Command execution failed. Process exited with an error: 1(Exit value: 1) -> Help 1

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
Help 1 http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

It has much more but it repeats this part for 2 or 3 times.

My server is defined like this:
name : ut2004
URI: gb04://192.168.1.132:3001
automatically fills the map part with the TrainingDay.
>> Exception in thread "main" ComponentCantStartException[UT2004BotSmartBot1: Can't start: ComponentBusSmartBot1-3 at 192.168.1.134

Looks like the IP address has been passed to the Java, but...,

>> Caused by: ConnectionExceptionLogCategory(Connection): java.net.ConnectException: Connection refused: connect (127.0.0.1:3000)

UT2004Runner settings has been overriden as it is trying to connect to 127.0.0.1:3000

How does your Java main() method looks like?

Is something like new UT2004Runner().setHost().setPort() in there?

Cheers!
Jimmy
Hi!

My main looks like:

public static void main(String args[]) throws PogamutException {
new UT2004BotRunner( // class that wrapps logic for bots executions, suitable to run single bot in single JVM
SmartBot.class, // which UT2004BotController it should instantiate
"SmartBot" // what name the runner should be using
).setMain(true) // tells runner that is is executed inside MAIN method, thus it may block the thread and watch whether agent/s are correctly executed
.startAgent(); // tells the runner to start 1 agent

// It is easy to start multiple bots of the same class, comment runner above and uncomment following
// new UT2004BotRunner(SmartBot.class, "SmartBot").setMain(true)
//.startAgents(8); // tells the runner to start 3 agents at once
}

Could it be something from the config fileS?
Then it sounds like a bug to me.

NB Plugin should start the JVM with -D switches specifying host/port where to connect which should be given more priority then any *.property file.

I will investigate that.

Best,
Jakub
Really? I don't think it's a bug but i don't understand pogamut enough to try to help.

Anyone should've tried to connect to remote server before me and if it's not working since then we would have know it, right?
Honestly, I have not been connecting to any remote servers recently (~ 6 months back), usually Pogamut users are using localhost, so it cannot be anybody I guess :-)

Jimmy
Thanks xDD

I'll try to investigate too.

Joan Marc.
You can always try to "debug" the project from NetBeans, place breakpoint in the .startAgent() method and see for yourself right away! ;-)

Cheers,
Jimmy
Hi!
i'll try this last comment!
 

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.