Testing brokers against the tournament server

classic Classic list List threaded Threaded
93 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Testing brokers against the tournament server

grampajohn
Administrator
Dear colleagues -

We are in the final stages of setting up the tournament server at Minnesota at http://tac01.cs.umn.edu:8080/TournamentScheduler/faces/index.xhtml. It should be ready by 07:00 UTC. Here’s what you have to do to test it out with your broker:

Create an account and register your broker as shown at https://github.com/powertac/powertac-server/wiki/Broker-Tournament-Login.

There will be several test competitions available under the available tournaments drop-down. Just pick one and poke “register”. The names will indicate the number of agents per game and the start time (UTC) (earliest start time); we will have a few one-agent test tournaments, a few two-agent tournaments, and a few three-agent tournaments. These will be short games, estimated 20-30 minutes.

Update your broker.properties file as shown in the instructions, including the “tourneyName”, and start your agent before the tournament is scheduled to start. The agent will log into the tournament manager, and will get one of three results: (1) a “done” status if there are no more games for the specified tournament or if you are not registered for it; (2) a “retry” status if the game has not yet started; or (3) a “login” status along with the server jms url to connect to the game server. There will be 7 game servers running, so it’s impossible to predict which games will run on which server.

The individual games will be run when resources (machines on the back end) become available.

Please let us know your experiences and suggestions for improving the process and/or the user interface. We will be offline (asleep, most likely) from about 05:00 until 14:00 UTC on Wednesday 23 May, but we’ll respond as soon as we are able to any problems you experience.

All the best -

John and Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Broker Developers,

Just a reminder to set the following properly in your broker:

samplebroker.core.powerTacBroker.username = YourAgentName

samplebroker.core.powerTacBroker.tourneyName = Test-Single-Agent-0730UTC #The exact name of the tourney
samplebroker.core.powerTacBroker.tourneyUrl = http://tac01.cs.umn.edu:8080/TournamentScheduler/faces/brokerLogin.jsp
samplebroker.core.powerTacBroker.authToken = YourAuthorizationToken
samplebroker.core.brokerTournamentService.responseType = xml

Let me know if you have any questions,

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

markus
I'm curious about the role of the game token in all this. It's part of the message returned by the TS but it does not appear to be used. At least the sample broker simply logs into the assigned competitions using the standard password.

Cheers,

Markus


Am 23.05.12 11:54, schrieb onarheim [via Power TAC Developers]:
Hello Broker Developers,

Just a reminder to set the following properly in your broker:

samplebroker.core.powerTacBroker.username = YourAgentName

samplebroker.core.powerTacBroker.tourneyName = Test-Single-Agent-0730UTC #The exact name of the tourney
samplebroker.core.powerTacBroker.tourneyUrl = http://tac01.cs.umn.edu:8080/TournamentScheduler/faces/brokerLogin.jsp
samplebroker.core.powerTacBroker.authToken = YourAuthorizationToken
samplebroker.core.brokerTournamentService.responseType = xml

Let me know if you have any questions,

Cheers,

Erik



If you reply to this email, your message will be added to the discussion below:
http://power-tac-developers.975333.n3.nabble.com/Testing-brokers-against-the-tournament-server-tp4007971p4008317.html
To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Good question,

The game token will be used in the future as a one-time-pad type authentication system with the simulation server. Currently it is just a placeholder.

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

Rodrig
What should happen after the login ?

Do we need to set the visualizer control panel ?

What do we need to really run the game ?

Thanks,

Rod
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

markus
In reply to this post by onarheim
I just tried the process with the 1130UTC competition as follows:

   - I registered for the competition when it was in state "booting"
according to the scheduler.
   - I set my broker to login to the scheduler. That worked well and it
started to send me 20 sec retry messages.
   - At some point (~13:30 Rotterdam time) I saw that the game was in
progress but I was still getting retry messages.
   - Before I could check this further I received a done message at
13:42:34 local time.

I'll try this again with one of the single agent games you just posted.

Cheers,

Markus

Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Markus,

The reason you were receiving the restart messages was due to a bug in the tournament setup which allowed multiple agents to login in for a single game. This created a race condition where the agent to login first won, which has since been corrected.

I will post another identical set of single agent games at 1230UTC. If you notice we encountered another race condition on server scheduling where all the sims want to run on one server, which is why only one sim with a visualizer is running currently.

Thank you all for your patience as we work through the server side bugs.

Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Broker Developers,

I have received questions about this, be sure that you are connecting to the jmsUrlBrokerUrl returned to you by the brokerTournamentService. This is the method for connecting to the simulation server. For an example of this take a look at the newest sample broker.

Here is the important bit:

jmsManagementService.init(jmsBrokerUrl, brokerQueueName);

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

grampajohn
Administrator
Erik was up all night, and went to get some sleep about half an hour ago. He should be back by 17:00 UTC. In the meantime, we had a crash, and I cannot restart because of a permissions problem. We will just have to wait.

We apologize for the severe inconvenience. Getting this stuff to work has turned out to be much more difficult than we anticipated. We are still hoping to get the full tournament set up today, but we may need to push back the start time a bit to give you all a little more time for testing the connections. More info once Erik is back with us.

John
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

oliparson
Hi John,

We're running out of daytime hours to test our broker running using your tournament scheduler, and it would really help us if you could push back the start time of the qualifying round.

Oli
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

grampajohn
Administrator
oliparson wrote
Hi John,

We're running out of daytime hours to test our broker running using your tournament scheduler, and it would really help us if you could push back the start time of the qualifying round.
Yes, we are painfully aware of that. Currently it seems that we have exceeded the connection limit on the database.

Wolf suggests pushing it back another 24 hours. I hope we'll have it up and running again in a couple of hours; Erik has just reappeared. He went to bed this morning at about 9:00. In the meantime, we're doing some code inspections and working on improving the interface between the visualizers and the servers.

We'll keep you all posted.

John
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

jurica.babic
Hi everyone!

The Zagreb team would also appreciate some additional time for testing our broker against the tournament scheduler. We were able to connect only once in the "5 brokers game": our broker reported that he received both the login message and jms url. Unfortunately, we were not able to see any action in our broker's log or the Visualizer. Other attempts (such as joining the single game mode) were not successful.

I think it would be a nice feature for each broker to have a status of registration for a game. Today I was not sure if I had registered our broker for a game so I accidentally did multiple clicks of a "register" button.

The Zagreb team are very grateful for your efforts to make this competition great!

Cheers,
Jurica
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

oliparson
Hi John,

Would it be possible to schedule some more competitions on the server in the next hour? We haven't managed to test our broker on your server yet, and this will be our last chance before we're kicked out of our lab (at UTC 22:00).

Thanks,
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Oli,

I will go ahead and schedule a couple of games in the next hour (2200UTC-2300UTC). Please let me know if you have any questions.

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

oliparson
Hi Erik,

Thanks for your efforts. I've tried connecting to each of the scheduled games but just get the response:
Connecting to TS...
Parsing message..
Recieved Done Message no more games!
Max attempts reached...shutting down

I'm afraid we've run out of time today and have to leave our lab now.

Please let us know if there will or will not be any qualifying starting at May 24, 8:00am (UTC)?

Thanks,
Oli
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Oli,

You receive this message if you have not registered a broker with a tournament.

I'm looking at the table and it doesn't appear you have registered for any games.

It is looking like the Qualifying Round will be delayed at least 24hrs in light of the broker login issues. (Someone correct me if I am mistaken).

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

markus
In reply to this post by onarheim
I just retried the login against one of the open competitions. In addition to the fact that there are multiple competitions named Single Agent 2240UTC (which I suspect will lead to undefined results) I'm also getting a connection refused on the actual game server (see below).

Cheers,

Markus


2012-05-24 01:06:17,632 [main] DEBUG nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter - Connecting to tournament scheduler with http://tac01.cs.umn.edu:8080/TournamentScheduler/faces/brokerLogin.jsp?authToken=c37deb92bad647f976ae900795c5072f&requestJoin=Test-Single-Agent-2240UTC&type=xml
2012-05-24 01:06:18,354 [main] INFO  nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter - Login message received. JMS URL='tcp://tac09.cs.umn.edu:61616' game token='1234'
2012-05-24 01:06:18,355 [main] INFO  nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter - Login Successful! JMS URL = 'tcp://tac09.cs.umn.edu:61616', game token = '1234'
2012-05-24 01:06:18,972 [main] INFO  nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter - Sending broker authentication request with username LARGEpower
Exception in thread "main" org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://tac09.cs.umn.edu:61616. Reason: java.net.ConnectException: Connection refused
    at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
    at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:168)
    at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:469)
    at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:534)
    at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:526)
    at nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter.sendMessage(PTACBrokerAdapter.java:207)
    at nl.rsm.large.brokerfoundation.framework.PTACBrokerAdapter.run(PTACBrokerAdapter.java:163)
    at nl.rsm.large.brokerfoundation.ptac.PTACBaseBroker.run(PTACBaseBroker.java:72)
    at nl.rsm.large.brokerfoundation.examples.PTACExampleBroker.main(PTACExampleBroker.java:105)
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://tac09.cs.umn.edu:61616. Reason: java.net.ConnectException: Connection refused
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

onarheim
Hello Markus,

Yes I suspect you are correct about the undefined results. I didn't notice the similar competition name until you brought it up.

After reviewing the server logs, it looks like the sim died before you could log into it. It seems that there was a bug in the scheduler that would allow sims to be started prematurely without brokers under certain conditions causing the sim to crash.

Again thank you for all your patience working with us,

Cheers,

Erik
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

grampajohn
Administrator
In reply to this post by oliparson
Colleagues -

I have scheduled a number of 1-game sets for tomorrow to afford some additional practice on getting the logins working. Some are for one agent, and some are for two. We have made a number of improvements during the day today that we hope makes the process a bit smoother.

We have also decided to start the actual qualifying round on Friday at 0800 UTC, rather than Thursday at 0800.

As before, instructions for updating your broker and registering for these mini-tournaments are on the github wiki.

Best of luck.

John
Rod
Reply | Threaded
Open this post in threaded view
|

Re: Testing brokers against the tournament server

Rod
Hi,

I am sorry but I cannot register for any game today morning. And the agent is showing

"Connecting to TS...
Parsing message..
Retry message received for : 20 seconds"

How to know that a game is assigned to an agent?


Many thanks,

Rod
12345