Getting started with the TournamentScheduler

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Getting started with the TournamentScheduler

turban
Hi everyone,

I am trying to run the "TournamentScheduler" I followed this setup guide [1]. I can set up tournaments and connect with a broker to these tournaments.
But each time when I want to run a game the bootstrapping of a game fails. I did some investigation and noticed that my “/TournamentScheduler/faces/serverInterface.jsp” just gives an "error" (just simply the word "error") when I connect to the jsp. Do I need to add the serverInterface [2] to the pom of the TournamentScheduler?

My second problem is, that I don’t know where I can actually configure the tournament. If I start a tournament with just one broker the tournament has three games. Where can I define the amount of games within a tournamnet?

[1] https://github.com/powertac/powertac-server/wiki/Tournament-Installation
[2] https://github.com/powertac/server-interface
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting started with the TournamentScheduler

gbuijs
Hi Turban,

1 The error is expected, the server interface endpoint is for communication between sim server and TS.
   What kind of error are you getting?
   What's the output of the job on Jenkins?

2 The tournament-wide settings can be set while creating the tournament.
   Settings for the upcoming levels can also be edited under the Tournaments tab.
   Round settings can be edited as long as they haven't started yet.

Cheers,

Govert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: Getting started with the TournamentScheduler

turban

Hi Govert,

 

Output of Jenkins script [1].

It is noteworthy that the actual “bootstrap simulation” only takes 1-2 seconds if I run:

mvn   -Pcli -Dexec.args="--boot game-1-boot.xml --game-id  Tour1_qualifying --control http://127.0.0.1:8080/TournamentScheduler/ "

from command shell.

 

mvn   -Pcli -Dexec.args="--boot game-1-boot.xml --game-id  Tour1_qualifying" (without –controll) works fine.

 

Cheers,

Tobias

 

[1]

StartTime     : 2016-08-24 13:11:22

Nodename      : PowerTAC

BuildNumber   : 3

Account       : maxon

GameName      :  Tour1_qualifying

PomId         : 2

TourneyUrl    : http://127.0.0.1:8080/TournamentScheduler/

MVN_CMD       : mvn

interfacePath : faces/serverInterface.jsp

interfaceUrl  : http://127.0.0.1:8080/TournamentScheduler/faces/serverInterface.jsp

pomPath       : faces/download

pomUrl        : http://127.0.0.1:8080/TournamentScheduler/faces/download?pomId=2

bootName      : game-1-boot

 

Get the pom file from http://127.0.0.1:8080/TournamentScheduler/faces/download?pomId=2

--2016-08-24 09:11:22--  http://127.0.0.1:8080/TournamentScheduler/faces/download?pomId=2

Connecting to 127.0.0.1:8080... connected.

HTTP request sent, awaiting response... 200 OK

Length: unspecified [application/xml]

Saving to: ‘pom.xml’

 

     0K ........                                               59.4M=0s

 

2016-08-24 09:11:22 (59.4 MB/s) - ‘pom.xml’ saved [8830]

 

Pom retrieved

 

Run maven : mvn    -Pcli -Dexec.args="--boot game-1-boot.xml --game-id  Tour1_qualifying --control http://127.0.0.1:8080/TournamentScheduler/ "

 

[INFO] Scanning for projects...

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.4.0/exec-maven-plugin-1.4.0.pom

3/12 KB  

12/12 KB  

           

Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.4.0/exec-maven-plugin-1.4.0.pom (12 KB at 17.2 KB/sec)

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom

3/24 KB   

24/24 KB  

           

Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/34/mojo-parent-34.pom (24 KB at 766.7 KB/sec)

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.4.0/exec-maven-plugin-1.4.0.jar

3/46 KB   

46/46 KB  

           

Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.4.0/exec-maven-plugin-1.4.0.jar (46 KB at 1187.9 KB/sec)

[INFO]                                                                        

[INFO] ------------------------------------------------------------------------

[INFO] Building Power TAC distribution 1.4.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- exec-maven-plugin:1.4.0:exec (default-cli) @ server-distribution ---

Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.pom

3/11 KB   

11/11 KB  

           

Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.pom (11 KB at 429.5 KB/sec)

Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom

3/57 KB   

57/57 KB  

           

Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom (57 KB at 1376.0 KB/sec)

Downloading: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar

4/54 KB   

54/54 KB  

Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar (54 KB at 1436.4 KB/sec)

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 5.880 s

[INFO] Finished at: 2016-08-24T09:11:30-04:00

[INFO] Final Memory: 15M/181M

[INFO] ------------------------------------------------------------------------

 

Bootstrap complete!

 

Cleaning up

 

Notify TS we're boot_failed

Build step 'Execute shell' marked build as failure

Finished: FAILURE

 

 

 

Von: gbuijs [via Power TAC Developers] [mailto:ml-node+[hidden email]]
Gesendet: Donnerstag, 25. August 2016 10:28
An: Tobias Urban <[hidden email]>
Betreff: Re: Getting started with the TournamentScheduler

 

Hi Turban,

1 The error is expected, the server interface endpoint is for communication between sim server and TS.
   What kind of error are you getting?
   What's the output of the job on Jenkins?

2 The tournament-wide settings can be set while creating the tournament.
   Settings for the upcoming levels can also be edited under the Tournaments tab.
   Round settings can be edited as long as they haven't started yet.

Cheers,

Govert


If you reply to this email, your message will be added to the discussion below:

http://power-tac-developers.975333.n3.nabble.com/Getting-started-with-the-TournamentScheduler-tp4026382p4026383.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
|  
Report Content as Inappropriate

Re: AW: Getting started with the TournamentScheduler

gbuijs
Hi Turban,

I suspect it's a network thinghy.
Do you use a separate machine/vm as slave?

Jenkins sends a control-url to the slave process to communicate with the TS.
In the Jenkins output i see this defined at http://127.0.0.1:8080, which would be machine the sim runs on.
But if the sim server runs on a separate machine/vm, that doesn't work.

To fix this, set the tourney.location in tournament.properties to :
http://<IP-or-reachable-URL-of-the-TS>:8080/TournamentScheduler/

Cheers,

Govert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: AW: Getting started with the TournamentScheduler

turban

Hi Govert,

 

thanks for your answer. Jenkins and the TournamentScheduler run on the same VM. Thus, I don’t think it is a network issue.

 

> To fix this, set the tourney.location in tournament.properties to :
>
http://<IP-or-reachable-URL-of-the-TS>:8080/TournamentScheduler/

 

I changed the properties to http://localhost:8080/TournamentScheduler/ and it seems to work when I start the “start-boot-server” job in Jenkins.

Unfortunately the TournamentScheduler doesn’t start the job by itself. The tournament status is: in_progress. The status of each game is: boot_pending. The games also appear in the timeline but nothing happens. I guess the communication to Jenkins doesn’t work (I set up the username and API token). Is there any log file that I can use to investigate the problem? Catalina.out doesn’t say anything.

 

Cheers,

tobias

 

 

Von: gbuijs [via Power TAC Developers] [mailto:ml-node+[hidden email]]
Gesendet: Donnerstag, 25. August 2016 14:29
An: Tobias Urban <[hidden email]>
Betreff: Re: AW: Getting started with the TournamentScheduler

 

Hi Turban,

I suspect it's a network thinghy.
Do you use a separate machine/vm as slave?

Jenkins sends a control-url to the slave process to communicate with the TS.
In the Jenkins output i see this defined at http://127.0.0.1:8080, which would be machine the sim runs on.
But if the sim server runs on a separate machine/vm, that doesn't work.

To fix this, set the tourney.location in tournament.properties to :
http://<IP-or-reachable-URL-of-the-TS>:8080/TournamentScheduler/

Cheers,

Govert


If you reply to this email, your message will be added to the discussion below:

http://power-tac-developers.975333.n3.nabble.com/Getting-started-with-the-TournamentScheduler-tp4026382p4026385.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
|  
Report Content as Inappropriate

Re: AW: AW: Getting started with the TournamentScheduler

gbuijs
Hi Turban,

The TS doesn't start the job, Jenkins is supposed to do that.
The sim reports back to the TS (without going through Jenkins).
The game remains in 'boot_pending' until the sim sends back the boot file.

Is the slave also on the same VM (i.e. running on master in Jenkins)?
Does the slave have an equal name in the TS and Jeknins?

Cheers,

Govert

EDIT : spoke too soon, when the job starts the game progresses to boot in progress.
So it seems Jenkins doesn't receive the job.
You can look in the tournament.trace file for possible errors.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: AW: AW: Getting started with the TournamentScheduler

turban

Ho Govert,

 

as I understand it the TS sends a REST call to Jenkins. Than Jenkins will start the jobs. And the jobs report back to the TS.

 

In my setup everything is running on the same VM. I have a “Permanent Agent” in Jenkins called “PowerTAC”, I also added “PowerTAC” to the “available machines” in the admin interface of the TS. But the TS is not sending any API request to Jenkins (if I manually start the Jenkins jobs they report back to the TS).

 

cheers,

Tobias

 

Von: gbuijs [via Power TAC Developers] [mailto:ml-node+[hidden email]]
Gesendet: Donnerstag, 25. August 2016 16:05
An: Tobias Urban <[hidden email]>
Betreff: Re: AW: AW: Getting started with the TournamentScheduler

 

Hi Turban,

The TS doesn't start the job, Jenkins is supposed to do that.
The sim reports back to the TS (without going through Jenkins).
The game remains in 'boot_pending' until the sim sends back the boot file.

Is the slave also on the same VM (i.e. running on master in Jenkins)?
Does the slave have an equal name in the TS and Jeknins?

Cheers,

Govert



If you reply to this email, your message will be added to the discussion below:

http://power-tac-developers.975333.n3.nabble.com/Getting-started-with-the-TournamentScheduler-tp4026382p4026387.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
|  
Report Content as Inappropriate

AW: AW: AW: Getting started with the TournamentScheduler

turban
In reply to this post by gbuijs

Hi Govert,

 

I found an ugly and potential dangerous workaround for my problem. I had to turn off Cross-Site-Request-Forgery (CSRF) Protection in my Jenkins installation.

This works for me because I am running everything on a VM in an separated and protected network.

 

Cheers,

Tobias

 

Von: gbuijs [via Power TAC Developers] [mailto:ml-node+[hidden email]]
Gesendet: Donnerstag, 25. August 2016 16:05
An: Tobias Urban <[hidden email]>
Betreff: Re: AW: AW: Getting started with the TournamentScheduler

 

Hi Turban,

The TS doesn't start the job, Jenkins is supposed to do that.
The sim reports back to the TS (without going through Jenkins).
The game remains in 'boot_pending' until the sim sends back the boot file.

Is the slave also on the same VM (i.e. running on master in Jenkins)?
Does the slave have an equal name in the TS and Jeknins?

Cheers,

Govert



If you reply to this email, your message will be added to the discussion below:

http://power-tac-developers.975333.n3.nabble.com/Getting-started-with-the-TournamentScheduler-tp4026382p4026387.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
|  
Report Content as Inappropriate

Re: Getting started with the TournamentScheduler

turban
In reply to this post by turban
Hi,

Sorry to bug once again. I am trying to configure the properties of games played during a tournament. More specifically I want to edit the “common.competition.simulationTimeslotSeconds” property. I tried to edit the “tournament.properties” file but it seems to have no effect at all for the games played.

When I check the properties of a game I always get: (the value of minimumTimeslotCount doesn’t fit to the one in the properties file)
server.weatherService.serverUrl = http://wolf31.ict.eur.nl:8080/WeatherServer/faces/index.xhtml
server.weatherService.weatherLocation = rotterdam
common.competition.timezoneOffset = 1
common.competition.simulationBaseTime = 2010-05-04
server.jmsManagementService.jmsBrokerUrl = tcp://localhost:61616
server.competitionControlService.firstLoginTimeout = 600000
server.competitionControlService.loginTimeout = 120000
server.visualizerProxyService.remoteVisualizer = true
server.visualizerProxyService.visualizerQueueName = 5isirs4l0jg7l
common.competition.minimumTimeslotCount = 1353
common.competition.expectedTimeslotCount = 1353

What am I missing?

Also is it possible to get the properties file of the final round (if there are any significant changes)

Cheers,
Tobias
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting started with the TournamentScheduler

gbuijs
Hi Tobias,

No problem at all.

Unfortunately, these properties aren't propagated from the TS to the sim.
I'm working on a Experiment Manager where you can configure most properties.
But i'm lacking the time to finish it.

In the mean time there are some options to get it working.
The easiest would be to create a properties file in a directory called 'config'.
That dir should be in the working dir of the sim.
Make sure the Jenkins job doesn't remove it after each game.

A second option would be hacking RestProperties.java by adding the properties you need.
But the would require a rebuild off the TS when properties change.

Re: final round properties
The finals were run with the default properties, apart from date/time and gamelength.

Cheers,

Govert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: Getting started with the TournamentScheduler

turban

Hi Govert,

 

Thanks for your help. I hacked the RestProperties.java file.

 

Cheers,

Tobias

 

Von: gbuijs [via Power TAC Developers] [mailto:ml-node+[hidden email]]
Gesendet: Dienstag, 30. August 2016 17:25
An: Tobias Urban <[hidden email]>
Betreff: Re: Getting started with the TournamentScheduler

 

Hi Tobias,

No problem at all.

Unfortunately, these properties aren't propagated from the TS to the sim.
I'm working on a Experiment Manager where you can configure most properties.
But i'm lacking the time to finish it.

In the mean time there are some options to get it working.
The easiest would be to create a properties file in a directory called 'config'.
That dir should be in the working dir of the sim.
Make sure the Jenkins job doesn't remove it after each game.

A second option would be hacking RestProperties.java by adding the properties you need.
But the would require a rebuild off the TS when properties change.

Re: final round properties
The finals were run with the default properties, apart from date/time and gamelength.

Cheers,

Govert


If you reply to this email, your message will be added to the discussion below:

http://power-tac-developers.975333.n3.nabble.com/Getting-started-with-the-TournamentScheduler-tp4026382p4026399.html

To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers,
click here.
NAML

Loading...