running visualizer

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

running visualizer

Sachi
Hi,

When Im running the sim mode in visualizer, the message I get is: simulation started, but the game status does not change to running. At the command line it outputs:
[INFO] Started Jetty Server
bootstrap-datanullnullnull[Sample --queue-name Sample --server-queue serverInput]
150882 [Thread-9] INFO org.apache.activemq.broker.BrokerService - Using Persistence Adapter: MemoryPersistenceAdapter
150883 [Thread-9] INFO org.apache.activemq.broker.BrokerService - ActiveMQ 5.6.0 JMS Message Broker (simJmsProvider) is starting
150884 [

Im not sure why this is happening. The sim.trace file also does not give the correct output, whereas the broker.trace file seems to be fine. Could you help me resolve this? thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

grampajohn
Administrator
Sachi -

Are you getting this when you do

   mvn -Pweb

or something else? Are you using the 0.6.1 distribution package I just posted, or something else? I need to know exactly what you did to get this output, because I have tested this setup frequently in the last week, and it works fine for me.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
I am using the previous distribution package. Not the 0.6.1 you just posted.

I am getting this output, after i run the sim session from the visualizer (After filling in the options on the web interface).

I start the visualizer with mvn jetty:run, which starts it correctly. But when im trying to run the boot or sim session from the visualizer, I get that output.
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
I just ran -Pweb, which started the visualizer. Then on starting the sim session from the visualizer, I exactly got this output. I am using the 0.6.0 snapshot version.

bootstrap-datanullnullnull[Sample]
12/07/27 15:15:41 INFO server.CompetitionSetupService: simSession: bootData=bootstrap-data, config=null, jmsUrl=null, inputQueue=null
12/07/27 15:15:41 INFO server.ServerPropertiesService: lazyInit
12/07/27 15:15:41 INFO server.ServerPropertiesService: loading config from jar:file:/Users/sachisolanki/powertac-server/server-distribution/target/work/webapp/WEB-INF/lib/genco-0.6.0-SNAPSHOT.jar!/config/genco.properties
12/07/27 15:15:41 INFO server.ServerPropertiesService: loading config from jar:file:/Users/sachisolanki/powertac-server/server-distribution/target/work/webapp/WEB-INF/lib/server-main-0.6.0-SNAPSHOT.jar!/config/server.properties
12/07/27 15:15:41 INFO server.CompetitionSetupService: bootUrl=file:bootstrap-data
12/07/27 15:15:41 INFO server.CompetitionControlService: pre-authorized default broker
12/07/27 15:15:41 INFO server.CompetitionControlService: Authorized broker Sample / Sample
12/07/27 15:15:41 INFO server.CompetitionSetupService: preGame(File) - start
[Fatal Error] :1:1: Premature end of file.
preGame: Error reading boot dataset: javax.xml.xpath.XPathExpressionException
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

grampajohn
Administrator
Ah - Did you create a boot file? You have to run a boot session and generate a bootstrap data file, before you can run a sim session. Choose a name for your boot data file (the default is 'bootstrap-data' but I recommend something like 'boot.xml'), run a boot session, then fill in the name of your boot data file when you run the sim session.

Does this help? It is explained in the Getting Started page, but not in terms of using the web interface.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
When i run the boot session, to create the boot file (boot.xml) i get similar output, like:
boot.xmlnullnull
12/07/27 16:15:13 INFO server.ServerPropertiesService: lazyInit
12/07/27 16:15:13 INFO server.ServerPropertiesService: loading config from jar:file:/Users/sachisolanki/powertac-server/server-distribution/target/work/webapp/WEB-INF/lib/genco-0.6.0-SNAPSHOT.jar!/config/genco.properties
12/07/27 16:15:13 INFO server.ServerPropertiesService: loading config from jar:file:/Users/sachisolanki/powertac-server/server-distribution/target/work/webapp/WEB-INF/lib/server-main-0.6.0-SNAPSHOT.jar!/config/server.properties
12/07/27 16:15:13 INFO server.CompetitionControlService: pre-authorized default broker
40549 [Thread-12] INFO org.apache.activemq.broker.BrokerService - Using Persistence Adapter: MemoryPersistenceAdapter...

The boot.xml file that is produced is empty, and that is why its giving boot.xmlnull null. But i dont know why this is happening?  I was therefore using a boot file, which had been generated from a previous bootstrap run without using the web interface, in order to run the sim session from web interface.

All my modules are the 0.6.0 snapshot version. do i need to update for this to run correctly?
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

grampajohn
Administrator
Sachi wrote
When i run the boot session, to create the boot file (boot.xml) i get similar output, like:
boot.xmlnullnull...

The boot.xml file that is produced is empty, and that is why its giving boot.xmlnull null. But i dont know why this is happening?  I was therefore using a boot file, which had been generated from a previous bootstrap run without using the web interface, in order to run the sim session from web interface.

All my modules are the 0.6.0 snapshot version. do i need to update for this to run correctly?
The 0.6.0 version should be fine. but if you are using the latest 0.6.0 from github, you need a local install of common. If you are using the 0.6.0 download package, it should work.

I have not seen this problem, but almost certainly the cause will be clear if you look at the file log/powertac-boot.trace that is produced. Just search for the string ERROR and tell me what you see.

Hope this helps ...

John
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
The powertac-boot.trace file does not log any error. But the end of the file is something like this:

54488 INFO  repo.RandomSeedRepo: Seed requested: AbstractCustomer;159;TariffChooser
54965 INFO  customers.Village: Initializing VillageType3 Village 2 NSHouse 0
132771 WARN  listener.DefaultMessageListenerContainer: Setup of JMS message listener invoker failed for destination 'serverInput' - trying to recover. Cause: Channel was inactive for too (>30000) long: tcp://127.0.0.1:61616
140494 INFO  listener.DefaultMessageListenerContainer: Successfully refreshed JMS Connection
209666 WARN  listener.DefaultMessageListenerContainer: Setup of JMS message listener invoker failed for destination 'serverInput' - trying to recover. Cause: Channel was inactive for too (>30000) long: tcp://127.0.0.1:61616
219158 INFO  listener.DefaultMessageListenerContainer: Successfully refreshed JMS Connection

Whereas the terminal outputs this after the JMS message broker starts:


34008 [Thread-12] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (simJmsProvider, ID:unknown-e0-f8-47-00-aa-20.home-55109-1343410005953-0:1) started
Exception in thread "InactivityMonitor WriteCheck" java.lang.OutOfMemoryError: Java heap space
        at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:71)
        at java.util.zip.ZipFile$1.<init>(ZipFile.java:224)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:224)
        at java.util.zip.ZipFile.getInputStream(ZipFile.java:192)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:167)
        at java.util.jar.JarFile.getManifest(JarFile.java:148)
        at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:696)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:228)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
        at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
        at org.apache.activemq.transport.AbstractInactivityMonitor.writeCheck(AbstractInactivityMonitor.java:142)
        at org.apache.activemq.transport.AbstractInactivityMonitor$2.run(AbstractInactivityMonitor.java:111)
        at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Exception in thread "ActiveMQ Broker[simJmsProvider] Scheduler" java.lang.OutOfMemoryError: Java heap space

Hope this can be resolved. Thanks a lot.
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

grampajohn
Administrator
Looks like you are running out of memory. What kind of system are you running on? How much memory? I have not seen this happen for a long time.

Can you create a boot record with the -Pcli method? That one has an explicit memory allocation in server-distribution/pom.xml.

Has anyone else experienced this problem?

John
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
Hi John,

Im using MAC OSX, with 320GB hard drive and 4GB RAM. I can create a correct boot record with -Pcli method.

I think I am running out of memory in household-customer and officecomplex-customer, and may be thats why its not creating a correct boot record with -Pweb method. I checked the surefire reports, and the test results give java heap space error. Is there a way to resolve this? The server-distribution/pom.xml does provide explicit memory allocation. Can I do the same for household-customer and officecomplex-customer?
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

grampajohn
Administrator
Sachi wrote
I am using MAC OSX, with 320GB hard drive and 4GB RAM. I can create a correct boot record with -Pcli method.

I think I am running out of memory in household-customer and officecomplex-customer, and may be that's why it's not creating a correct boot record with -Pweb method. I checked the surefire reports, and the test results give java heap space error. Is there a way to resolve this? The server-distribution/pom.xml does provide explicit memory allocation. Can I do the same for household-customer and officecomplex-customer?
Sachi -

These two models are part of the server. They are exactly the same in the cli and web versions. It's true that their tests use lots of memory - that's what the surefire reports are, reports of running unit and module tests. But these tests are not part of the server, so I would not worry about that.

Mac OSX is a 64-bit system; Java may use a lot more memory on Mac than it does on Linux. I don't know. Since you have it and I don't, I cannot test a solution. Perhaps someone else on this list has experience with this?

So I've looked through the docs on the maven-jetty-plugin, and done a little googling. It looks like you can set the MAVEN_OPTS environment var to control how it configures its Java process. See here and here for some examples.

Please let us know if this works for you.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: running visualizer

Sachi
Hi John,

It is working now. Thank you for all the help. Really appreciate it. I set the MAVEN-OPTS variable before running the -Pweb command and it works perfectly now.