Error while running broker in the tournament

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

Error while running broker in the tournament

Porag
Hi

I have been getting 2 types of error in my broker while running in the seeding round.

Error 1:  

Exception in thread "Thread-4" org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Broken pipe
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:497)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:580)
        at org.powertac.samplebroker.core.MessageDispatcher.sendMessage(MessageDispatcher.java:121)
        at org.powertac.samplebroker.core.PowerTacBroker.sendMessage(PowerTacBroker.java:395)
        at org.powertac.samplebroker.wholesaleMarket.WholesaleBiddingStrategyV5.submitOrder(WholesaleBiddingStrategyV5.java:263)
        at org.powertac.samplebroker.MarketManagerService.activate(MarketManagerService.java:660)
        at org.powertac.samplebroker.core.PowerTacBroker$AgentRunner.activateServices(PowerTacBroker.java:677)
        at org.powertac.samplebroker.core.PowerTacBroker$AgentRunner.run(PowerTacBroker.java:663)
Caused by: javax.jms.JMSException: Broken pipe
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
        at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1277)
        at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1269)
        at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1769)
        at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
        at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
        at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:269)
        at org.springframework.jms.connection.CachedMessageProducer.send(CachedMessageProducer.java:181)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:636)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:607)
        at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:584)
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:494)
        ... 7 more
Caused by: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115)
        at java.io.DataOutputStream.flush(DataOutputStream.java:123)
        at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:184)
        at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:262)
        at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:244)
        at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
        at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
        at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
        at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1275)
        ... 17 more


Error 2 : worker thread waited more than 120 secs for server, abandoning game

The broker code runs fine in my local server 1.3.3. Any idea why this is happening?

Thanks and best regards
Porag
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error while running broker in the tournament

gbuijs
Hi,

Error 2 is simple to explain : the sim got stuck in a wait state but didn't actually crash.
If the broker doesn't receive any message from the server for more than 2 minutes,
it assumes (in this case correctly) that the server got stuck or crashed.
This mechanism allows us to kill games without brokers needing manual resets.
So this is expected behavior and not an error.

Error 1 is a bit more difficult, this seems to be occurring when there's some connection problem.
Either on the client side or maybe some firewall hick up.
We've seen this happen occasionally before, but i haven't been able to reproduce this locally.
Therefore debugging and fixing is problematic.
Do you run your brokers on Linux, OS X or Windows?

Cheers,

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

Re: Error while running broker in the tournament

gbuijs
Maybe not related but : your broker issues a lot of orders with quantity < 0.01.
A simple check resulted in 10k per timeslot (=2k per second) sometimes.
These are ignored by the server, but put unnecessary load on your JMS connector.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error while running broker in the tournament

Porag
Thank you gbuijs. The spec says 10KWh but I was treating 11KWh as minimum limit for safety reason. I think I made a mistake in my logic while submitting the orders (bids/asks). The value of my minMWh in the bid/ask was always has been 0.11 / 1000 = .00011 MWh which suppose to be 11/1000 = .011 MWh. Right?  

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

Re: Error while running broker in the tournament

gbuijs
Hi Porag,

Your broker is sending orders with quantity 1.1E-4 == 0.00011, while the minimum is 1E-2 == 0.01 (all in MWh).
So your minimum is a factor 100 too low.

You can check these in the trace log files, generating warnings like :
107960 WARN  auctioneer.AuctionService: Order from SPOT with quantity 1.1E-4 < minimum quantity 0.01

Cheers,

Govert
Loading...