Unable to start the 0.6.3. server

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

Unable to start the 0.6.3. server

Sinisa Matetic
Hi all!

I m trying all morning to start the snapshot version of the server and it does not work. Also the bootstrap creation mode is not working. I get this:

15858 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:SinisaWin-MAC-49413-1359542369926-0:1) started
Exception Raised: java.net.UnknownHostException: tac05.cs.umn.edu
java.net.UnknownHostException: tac05.cs.umn.edu
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:178)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
        at sun.net.www.http.HttpClient.New(HttpClient.java:290)
        at sun.net.www.http.HttpClient.New(HttpClient.java:306)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:995)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:931)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:849)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1299)
        at org.powertac.server.WeatherService.webRequest(WeatherService.java:398
)
        at org.powertac.server.WeatherService.activate(WeatherService.java:316)
        at org.powertac.server.CompetitionControlService.step(CompetitionControl
Service.java:725)
        at org.powertac.server.CompetitionControlService.access$600(CompetitionC
ontrolService.java:83)
        at org.powertac.server.CompetitionControlService$SimRunner.run(Competiti
onControlService.java:1025)
org.powertac.common.exceptions.PowerTacException: Attempt to retrieve report bef
ore data available
        at org.powertac.common.repo.WeatherReportRepo.currentWeatherReport(Weath
erReportRepo.java:71)
        at org.powertac.factoredcustomer.DefaultCapacityOriginator.adjustCapacit
yForCurrentWeather(DefaultCapacityOriginator.java:260)
        at org.powertac.factoredcustomer.DefaultCapacityOriginator.useCapacity(D
efaultCapacityOriginator.java:212)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.useCapacity(Def
aultUtilityOptimizer.java:646)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.usePower(Defaul
tUtilityOptimizer.java:629)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.handleNewTimesl
ot(DefaultUtilityOptimizer.java:607)
        at org.powertac.factoredcustomer.DefaultFactoredCustomer.handleNewTimesl
ot(DefaultFactoredCustomer.java:102)
        at org.powertac.factoredcustomer.FactoredCustomerService.activate(Factor
edCustomerService.java:201)
        at org.powertac.server.CompetitionControlService.step(CompetitionControl
Service.java:725)
        at org.powertac.server.CompetitionControlService.access$600(CompetitionC
ontrolService.java:83)
        at org.powertac.server.CompetitionControlService$SimRunner.run(Competiti
onControlService.java:1025)
23098 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ Messag
e Broker (simJmsProvider, ID:SinisaWin-MAC-49413-1359542369926-0:1) is shutting
down
23912 [Thread-9] INFO org.apache.activemq.broker.TransportConnector - Connector
tcp://127.0.0.1:61616 Stopped
23924 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:SinisaWin-MAC-49413-1359542369926-0:1) stopped


I suppose there is some problems while fetching weather information...fix?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

gbuijs
You could try to change the url of the weather server.

server.weatherService.serverUrl = http://wolf-08.fbk.eur.nl:8080/WeatherServer/faces/index.xhtml
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
Sorry, I had forgotten that the 0.6.3 server was still configured to use the Minnesota server. Yesterday they moved a number of databases from an old, failing machine onto a new one. Our weather data was one of them, and I need to go in and reconfigure the server to use the new database location. I have not yet had time to do it, and it was not high on my priority list because I knew we had the Rotterdam servers working.

So I will try to get it reconfigured tomorrow, but in the meantime you can edit config/server.properties to change the location of the weather server to the URL given by Govert:

server.weatherService.serverUrl = http://wolf-08.fbk.eur.nl:8080/WeatherServer/faces/index.xhtml

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
Hi all again,

well i tried that and i still get the errors...

18144 [Thread-8] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:SinisaWin-MAC-50214-1360089152608-0:1) started
Exception Raised: com.thoughtworks.xstream.io.StreamException:  : only whitespac
e content allowed before start tag and not Q (position: START_DOCUMENT seen Q...
 @1:1)
com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed
before start tag and not Q (position: START_DOCUMENT seen Q... @1:1)
        at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.jav
a:124)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(Abst
ractPullReader.java:148)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(Abstract
PullReader.java:141)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullR
eader.java:118)
        at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractP
ullReader.java:103)
        at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
        at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(Abstra
ctXppDriver.java:58)
        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
        at org.powertac.server.WeatherService.webRequest(WeatherService.java:418
)
        at org.powertac.server.WeatherService.activate(WeatherService.java:316)
        at org.powertac.server.CompetitionControlService.step(CompetitionControl
Service.java:725)
        at org.powertac.server.CompetitionControlService.access$600(CompetitionC
ontrolService.java:83)
        at org.powertac.server.CompetitionControlService$SimRunner.run(Competiti
onControlService.java:1025)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowe
d before start tag and not Q (position: START_DOCUMENT seen Q... @1:1)
        at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
        at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
        at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
        at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.jav
a:109)
        ... 12 more
org.powertac.common.exceptions.PowerTacException: Attempt to retrieve report bef
ore data available
        at org.powertac.common.repo.WeatherReportRepo.currentWeatherReport(Weath
erReportRepo.java:71)
        at org.powertac.factoredcustomer.DefaultCapacityOriginator.adjustCapacit
yForCurrentWeather(DefaultCapacityOriginator.java:260)
        at org.powertac.factoredcustomer.DefaultCapacityOriginator.useCapacity(D
efaultCapacityOriginator.java:212)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.useCapacity(Def
aultUtilityOptimizer.java:646)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.usePower(Defaul
tUtilityOptimizer.java:629)
        at org.powertac.factoredcustomer.DefaultUtilityOptimizer.handleNewTimesl
ot(DefaultUtilityOptimizer.java:607)
        at org.powertac.factoredcustomer.DefaultFactoredCustomer.handleNewTimesl
ot(DefaultFactoredCustomer.java:102)
        at org.powertac.factoredcustomer.FactoredCustomerService.activate(Factor
edCustomerService.java:201)
        at org.powertac.server.CompetitionControlService.step(CompetitionControl
Service.java:725)
        at org.powertac.server.CompetitionControlService.access$600(CompetitionC
ontrolService.java:83)
        at org.powertac.server.CompetitionControlService$SimRunner.run(Competiti
onControlService.java:1025)
26302 [Thread-8] INFO org.apache.activemq.broker.BrokerService - ActiveMQ Messag
e Broker (simJmsProvider, ID:SinisaWin-MAC-50214-1360089152608-0:1) is shutting
down
28191 [Thread-8] INFO org.apache.activemq.broker.TransportConnector - Connector
tcp://127.0.0.1:61616 Stopped
28204 [Thread-8] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Me
ssage Broker (simJmsProvider, ID:SinisaWin-MAC-50214-1360089152608-0:1) stopped
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
And to add,

the given url for the weather works in the browser currently, but not in the server...
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
In reply to this post by Sinisa Matetic
Sinisa Matetic wrote
well i tried that and i still get the errors...
This is very strange. I pulled down fresh copies of the server and sample-broker release packages. I checked, and the correct weather server URL is already in the release. If you pull apart server-main-0.6.3.jar from maven central (you can find it in ~/.m2/repository/org/powertac/server-main/0.6.3), here's what you should see in config/server.properties:

server.weatherService.serverUrl = http://wolf-08.fbk.eur.nl:8080/WeatherServer/faces/index.xhtml

I tried it, and it works fine. No editing needed, the download packages work as advertised, at least for me. I guess both Govert and I forgot that this change happened prior to the 0.6.3 release. The properties file in server-main is the one that's used if you do not give it any "overriding" properties in server-distribution/config/server.properties. That's why all the entries in the server-distribution config file are commented out.

Are you sure you are not running into a network config problem on your end, like perhaps a bad firewall setting?

Good luck -

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
but i was running the snapshot version of the 0.6.3

now when i downloaded it again i cannot even pull the dependencies because on https://oss.sonatype.org/content/repositories/snapshots/org/powertac/

there is no 0.6.3 in any of the components and folders inside...I get errors like this:

[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.powertac:server-distribution:0.6.3-SNAPSHOT (c:\Users\
Sinisa\powertac\powertac-server-0.6.3-SNAPSHOT\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.powertac:server-maste
r:pom:0.6.3-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots/
 was cached in the local repository, resolution will not be reattempted until th
e update interval of sonatype has elapsed or updates are forced and 'parent.rela
tivePath' points at no local POM @ line 17, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
even if i try to pull and install the developer version from the git i get these errors:


[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.powertac:server-distribution:0.6.3-SNAPSHOT (c:\Users\
Sinisa\powertac\powertac-server-0.6.3-SNAPSHOT\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.powertac:server-maste
r:pom:0.6.3-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots/
 was cached in the local repository, resolution will not be reattempted until th
e update interval of sonatype has elapsed or updates are forced and 'parent.rela
tivePath' points at no local POM @ line 17, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableMo
delException
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
In reply to this post by Sinisa Matetic
Sinisa Matetic wrote
but i was running the snapshot version of the 0.6.3 ....
I guess perhaps the status of snapshots is not clear to everyone. They are temporary development artifacts, and are superseded by releases with the same version id. This is a feature of Maven. The format of the weather service url changed in the 0.6.3 snapshot sometime in November, and so for a time there was a 0.6.3-SNAPSHOT version that worked with the Rotterdam server. But maven will no longer resolve it because there is now a release for that version.

Is there a reason you need to use the older version? If it's really important, you could certainly use git in a source environment to revert to a version from around 1 November, but what would be the point? Its weather service would no longer work anyway, because the database at Minnesota got moved and we have not reconfigured the older version of the weather server to point to the new installation. Nobody here really has time to do that. Alternatively, you could pull down the updated source for the WeatherService in server-main and use that. It's unlikely that it's API has changed, but it should be easy to find out by looking at the change history on github.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
In reply to this post by Sinisa Matetic
Sinisa Matetic wrote
even if i try to pull and install the developer version from the git i get these errors:
...
That's an easy problem to solve. You just have to do a local install if the correct version is no longer in the repo, or if you modify an artifact and want maven to use it rather than the published version.

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
i m now completely confused...i pulled down the latest from the git (1.0.0.) and tried to install it and the same errors.

Sorry for the trouble, but i really dont know what to do...
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
Sinisa Matetic wrote
i m now completely confused...i pulled down the latest from the git (1.0.0.) and tried to install it and the same errors.
Hi, Sinisa -

I'm sorry you are having so much trouble. The current development version should be fine. I use it all the time. But I don't know exactly what you did, or what the error is. What do you mean by "tried to install it"? Are you running from the command-line or inside STS? Are you still seeing errors in finding 0.6.3-SNAPSHOT artifacts? If so, then you probably don't yet have all the pieces, because there should no longer be any references to 0.6.3.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
i just want a fresh install of a working server currently, but i dont know what exactly i should do now...


regards,

Sinisa
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

grampajohn
Administrator
Sinisa Matetic wrote
i just want a fresh install of a working server currently, but i dont know what exactly i should do now...
OK, that's an easy question.

If you are willing to run 1.0.0-SNAPSHOT, and you don't need sources, then the instructions are on the Power TAC wiki. Basically you just have to download the server-distribution bundle. Note that you will need an updated sample-broker to use this server. You should be able to just substitute the classes in the core package into your existing broker.

If you want an 0.6.3 server, the download links are on the Release History page of the wiki.

If you want a server source setup, then the instructions are on the github wiki.

Best of luck. Please let us know if you get it working.

John
Reply | Threaded
Open this post in threaded view
|

Re: Unable to start the 0.6.3. server

Sinisa Matetic
Thank you John for your patience and help! I have my 0.6.3 working now (currently bootstrap mode).


Best regards,

Sinisa