Request help... Can't run the sample broker agent

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

Request help... Can't run the sample broker agent

icmoon
Dear colleagues:

First of all, thank you for organizing this interesting competition.

I am trying to run the sample broker agent that is released recently.
I setup the server as the instruction provided in the announcement.

1) Cloned the powertac-server and run 'mvn exec:exec -Dexec.args="config/bootstrap.txt"
2) Cloned the sample broker project
3) Run 'mvn exec:exec -Dexec.args="config/sim-sample.txt'
4) In STS, create a run configuration as an AspectJ/Java app, with Project = sample-broker and Main class = org.powertac.samplebroker.BrokerMain

While executing the above sequence, I encountered a number of errors.
In Short, I am guessing that the server is not running properly, so I attached the server window.
It seems that the server is shutting down for some reasons..

Would you please help us to get through these errors in running the program?

Thanks in advance, and have a good day

Il-Chul Moon

Assistant Professor
Dept. of Industrial and Systems Engineering
KAIST

////////////////
STS error:

                                                                     
                                                                     
                                                                     
                                             
Username not given - default is 'Sample'
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://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect
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:543)
at org.powertac.samplebroker.MessageDispatcher.sendMessage(MessageDispatcher.java:110)
at org.powertac.samplebroker.SampleBroker.sendMessage(SampleBroker.java:231)
at org.powertac.samplebroker.SampleBroker.run(SampleBroker.java:131)
at org.powertac.samplebroker.BrokerMain.main(BrokerMain.java:58)
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:178)
at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:456)
... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:484)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:447)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:126)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
... 12 more

/////////////////////
Server window:

D:\SESLab-External\URP\powertac-server\server-distribution>mvn exec:exec -Dexec.
args="config/sim-sample.txt"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Power TAC distribution 0.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ server-distribution ---
1099 [main] INFO org.apache.activemq.broker.BrokerService - Using Persistence Ad
apter: MemoryPersistenceAdapter
1101 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ 5.5.1 JMS M
essage Broker (localhost) is starting
1101 [main] INFO org.apache.activemq.broker.BrokerService - For help or more inf
ormation please see: http://activemq.apache.org/
1116 [JMX connector] INFO org.apache.activemq.broker.jmx.ManagementContext - JMX
 consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
1255 [main] INFO org.apache.activemq.transport.TransportServerThreadSupport - Li
stening for connections at: tcp://127.0.0.1:61616
1255 [main] INFO org.apache.activemq.broker.TransportConnector - Connector tcp:/
/localhost:61616 Started
1256 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message
 Broker (localhost, ID:SESLAB-PC-57982-1327915216563-0:1) started
[Fatal Error] :1:1: 예기치 않은 파일의 끝입니다.
1480 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.BrokerService - Act
iveMQ Message Broker (localhost, ID:SESLAB-PC-57982-1327915216563-0:1) is shutti
ng down
1480 [Thread-2] INFO org.apache.activemq.broker.BrokerService - ActiveMQ Message
 Broker (localhost, ID:SESLAB-PC-57982-1327915216563-0:1) is shutting down
1486 [Thread-2] INFO org.apache.activemq.broker.TransportConnector - Connector t
cp://localhost:61616 Stopped
1493 [Thread-2] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Mes
sage Broker (localhost, ID:SESLAB-PC-57982-1327915216563-0:1) stopped
1497 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.TransportConnector
- Connector tcp://localhost:61616 Stopped
1497 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.BrokerService - Act
iveMQ JMS Message Broker (localhost, ID:SESLAB-PC-57982-1327915216563-0:1) stopp
ed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.667s
[INFO] Finished at: Mon Jan 30 18:20:17 KST 2012
[INFO] Final Memory: 11M/164M
[INFO] ------------------------------------------------------------------------
D:\SESLab-External\URP\powertac-server\server-distribution>


Reply | Threaded
Open this post in threaded view
|

Re: Request help... Can't run the sample broker agent

grampajohn
Administrator
Thanks for your report, and for your interest in our project. It's a little hard to tell what's going on here, but here are some things that might help:

- The broker will not run unless the server is running and waiting for a broker login. We plan to make that sequence less rigid, but right now that's how it works.

- The server appears to have started up and immediately shut down. For some reason, the actual error message (labeled [Fatal Error]) is in Korean and I cannot read it.

The only effective way to determine what happened is to look at the server log file. It's in server-distribution/log, and the name is probably powertac-sample.trace. If the file is not too large you could send it to me directly, or post it somewhere and send me a link.

Over the last couple of days I may have introduced some instability in the server, unfortunately. I am busy preparing a new release, and it is possible that I have gotten a commit or two out of order. I should have that cleaned up in another day. Remember that if you do an update (using git pull), you will have to run the "mvn install" step on all the changed modules before you can again run the server with maven.

Best regards,

John
Reply | Threaded
Open this post in threaded view
|

Re: Request help... Can't run the sample broker agent

icmoon
Dear John:

Here is the content of the trace file log...

//////
184 INFO  server.CompetitionSetupService: pre-game initialization
199 INFO  repo.RandomSeedRepo: Seed requested: AccountingInitializationService;0;interest
200 INFO  accounting.AccountingInitializationService: bank interest: 0.06
200 WARN  interfaces.ServerProperties: property tariffMarket.revocationFee not given in config
218 ERROR server.CompetitionSetupService: preGame: Error reading config file: javax.xml.xpath.XPathExpressionException
234 WARN  listener.DefaultMessageListenerContainer: Setup of JMS message listener invoker failed for destination 'serverInput' - trying to recover. Cause: java.io.EOFException
236 WARN  listener.DefaultMessageListenerContainer: Could not refresh JMS Connection for destination 'serverInput' - retrying in 5000 ms. Cause: Cannot send, channel has already failed: localhost/127.0.0.1:61616
///////

I also attached the log file itself to this email.

Again thanks for taking care of this error message. Hope the competition be sucessful.

Thanks, and have a good day,

Il-Chul



On Tue, Jan 31, 2012 at 10:22 AM, grampajohn [via Power TAC Developers] <[hidden email]> wrote:
Thanks for your report, and for your interest in our project. It's a little hard to tell what's going on here, but here are some things that might help:

- The broker will not run unless the server is running and waiting for a broker login. We plan to make that sequence less rigid, but right now that's how it works.

- The server appears to have started up and immediately shut down. For some reason, the actual error message (labeled [Fatal Error]) is in Korean and I cannot read it.

The only effective way to determine what happened is to look at the server log file. It's in server-distribution/log, and the name is probably powertac-sample.trace. If the file is not too large you could send it to me directly, or post it somewhere and send me a link.

Over the last couple of days I may have introduced some instability in the server, unfortunately. I am busy preparing a new release, and it is possible that I have gotten a commit or two out of order. I should have that cleaned up in another day. Remember that if you do an update (using git pull), you will have to run the "mvn install" step on all the changed modules before you can again run the server with maven.

Best regards,

John



If you reply to this email, your message will be added to the discussion below:
http://power-tac-developers.975333.n3.nabble.com/Request-help-Can-t-run-the-sample-broker-agent-tp3701810p3701868.html
To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers, click here.
NAML


powertac-test.trace (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Request help... Can't run the sample broker agent

grampajohn
Administrator
Thanks for the logfile. It appears that the server failed to read the bootstrap data file. That should have been created when you ran the boot session as powertac-server/server-distribution/boot-data.xml. Is the file there? Does it look like correct xml? You can run it through an xml validator to check, or open it with STS and have it check validity.

If it looks OK, then feel free to send it to me and I'll see if I can read it with a server.

If it's not there or appears to be corrupted, then you need to re-run the bootstrap session.

Does this help?

John
Reply | Threaded
Open this post in threaded view
|

Re: Server crashes

grampajohn
Administrator
In reply to this post by icmoon
For those of you who have been having trouble with the server in the last few days, we have discovered and fixed a bug (thanks, Antonios) that was causing the crashes. It was an array-indexing error, and it's almost certainly what Il-Chul Moon experienced, although the actual error message in that case was reported in Korean and I did not recognize it.

There is a new version of household-customer available that seems to correct the problem. I have run multiple boot sessions and a full sim session without problems with the new version.

Remember, if you are running the server outside of STS, you need to do a new mvn install on any new module versions you pull down. Also, it is now possible to run the sample broker, rather than the server, outside STS - instructions are in the README in the new version of sample-broker.

I hope this has not caused too much inconvenience. As always, your comments and bug reports are more than welcome.

John
Reply | Threaded
Open this post in threaded view
|

Re: Request help... Can't run the sample broker agent

icmoon
In reply to this post by grampajohn
Dear John:

Thanks for the fix! It works just fine.
We were successful in running the bootstrap mode and the simulation mode.

Also, the sample broker works well...

Il-Chul


On Wed, Feb 1, 2012 at 1:10 AM, grampajohn [via Power TAC Developers] <[hidden email]> wrote:
Thanks for the logfile. It appears that the server failed to read the bootstrap data file. That should have been created when you ran the boot session as powertac-server/server-distribution/boot-data.xml. Is the file there? Does it look like correct xml? You can run it through an xml validator to check, or open it with STS and have it check validity.

If it looks OK, then feel free to send it to me and I'll see if I can read it with a server.

If it's not there or appears to be corrupted, then you need to re-run the bootstrap session.

Does this help?

John



If you reply to this email, your message will be added to the discussion below:
http://power-tac-developers.975333.n3.nabble.com/Request-help-Can-t-run-the-sample-broker-agent-tp3701810p3703818.html
To start a new topic under Power TAC Developers, email [hidden email]
To unsubscribe from Power TAC Developers, click here.
NAML