-
Notifications
You must be signed in to change notification settings - Fork 181
faq 278429697
by Jishnu Narayan on 2018-05-15 13:58:35
Hello,
I am working on a scenario with modes car, pt, taxi, and walk (which also combines taxi and pt in a single trip). Due to the size of he scenario, I am running it in a cluster by converting the runnable .java file as an executable jar file. I have made a small batch script for running the same in the cluster. But I encounter an error every time I run the job and the simulation crashes. The java program itself is bug free as it is running fine in other systems and I think this has something to do with the way my pc and the cluster are connected? Or maybe something else. I'm not sure. Would greatly appreciate if I could get some help with this (what could be the possible cause and ways to fix it).
I use MobaXterm as the interface.
The error I get is given below:
2018-05-15 15:40:58,653 ERROR AbstractController:203 Mobsim did not complete normally! afterMobsimListeners will be called anyway. java.awt.AWTError: Can't connect to X11 window server using 'localhost:40.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.Toolkit$2.run(Toolkit.java:860) at java.awt.Toolkit$2.run(Toolkit.java:855) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020) at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577) at javax.swing.UIManager.setLookAndFeel(UIManager.java:539) at javax.swing.UIManager.setLookAndFeel(UIManager.java:579) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349) at javax.swing.UIManager.initialize(UIManager.java:1459) at javax.swing.UIManager.maybeInitialize(UIManager.java:1426) at javax.swing.UIManager.getDefaults(UIManager.java:659) at javax.swing.UIManager.getColor(UIManager.java:701) at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:264) at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:2002) at org.matsim.contrib.taxi.util.stats.TimeProfileCharts.chartProfile(TimeProfileCharts.java:46) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.generateImage(TimeProfileCollector.java:95) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.notifyMobsimBeforeCleanup(TimeProfileCollector.java:90) at org.matsim.core.mobsim.qsim.MobsimListenerManager.fireQueueSimulationBeforeCleanupEvent(MobsimListenerManager.java:98) at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:305) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:244) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:111) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:192) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:188) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:112) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.run(RunTaxiPTIntermodalExample.java:101) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.main(RunTaxiPTIntermodalExample.java:47) 2018-05-15 15:40:58,703 ERROR MatsimRuntimeModifications:54 Getting uncaught Exception in Thread main java.awt.AWTError: Can't connect to X11 window server using 'localhost:40.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.Toolkit$2.run(Toolkit.java:860) at java.awt.Toolkit$2.run(Toolkit.java:855) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020) at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577) at javax.swing.UIManager.setLookAndFeel(UIManager.java:539) at javax.swing.UIManager.setLookAndFeel(UIManager.java:579) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349) at javax.swing.UIManager.initialize(UIManager.java:1459) at javax.swing.UIManager.maybeInitialize(UIManager.java:1426) at javax.swing.UIManager.getDefaults(UIManager.java:659) at javax.swing.UIManager.getColor(UIManager.java:701) at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:264) at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:2002) at org.matsim.contrib.taxi.util.stats.TimeProfileCharts.chartProfile(TimeProfileCharts.java:46) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.generateImage(TimeProfileCollector.java:95) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.notifyMobsimBeforeCleanup(TimeProfileCollector.java:90) at org.matsim.core.mobsim.qsim.MobsimListenerManager.fireQueueSimulationBeforeCleanupEvent(MobsimListenerManager.java:98) at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:305) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:244) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:111) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:192) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:188) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:112) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.run(RunTaxiPTIntermodalExample.java:101) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.main(RunTaxiPTIntermodalExample.java:47) 2018-05-15 15:40:58,703 ERROR MatsimRuntimeModifications:60 ERROR --- This is an unexpected shutdown! 2018-05-15 15:40:58,703 ERROR MatsimRuntimeModifications:63 Shutdown possibly caused by the following Exception: java.awt.AWTError: Can't connect to X11 window server using 'localhost:40.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at java.awt.Toolkit$2.run(Toolkit.java:860) at java.awt.Toolkit$2.run(Toolkit.java:855) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854) at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:2020) at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:1158) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:431) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1577) at javax.swing.UIManager.setLookAndFeel(UIManager.java:539) at javax.swing.UIManager.setLookAndFeel(UIManager.java:579) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1349) at javax.swing.UIManager.initialize(UIManager.java:1459) at javax.swing.UIManager.maybeInitialize(UIManager.java:1426) at javax.swing.UIManager.getDefaults(UIManager.java:659) at javax.swing.UIManager.getColor(UIManager.java:701) at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:264) at org.jfree.chart.ChartFactory.createXYLineChart(ChartFactory.java:2002) at org.matsim.contrib.taxi.util.stats.TimeProfileCharts.chartProfile(TimeProfileCharts.java:46) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.generateImage(TimeProfileCollector.java:95) at org.matsim.contrib.taxi.util.stats.TimeProfileCollector.notifyMobsimBeforeCleanup(TimeProfileCollector.java:90) at org.matsim.core.mobsim.qsim.MobsimListenerManager.fireQueueSimulationBeforeCleanupEvent(MobsimListenerManager.java:98) at org.matsim.core.mobsim.qsim.QSim.cleanupSim(QSim.java:305) at org.matsim.core.mobsim.qsim.QSim.run(QSim.java:244) at org.matsim.core.controler.NewControler.runMobSim(NewControler.java:111) at org.matsim.core.controler.AbstractController$8.run(AbstractController.java:192) at org.matsim.core.controler.AbstractController.iterationStep(AbstractController.java:224) at org.matsim.core.controler.AbstractController.mobsim(AbstractController.java:188) at org.matsim.core.controler.AbstractController.iteration(AbstractController.java:147) at org.matsim.core.controler.AbstractController.doIterations(AbstractController.java:114) at org.matsim.core.controler.AbstractController.access$0(AbstractController.java:112) at org.matsim.core.controler.AbstractController$1.run(AbstractController.java:84) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:48) at org.matsim.core.controler.MatsimRuntimeModifications.run(MatsimRuntimeModifications.java:31) at org.matsim.core.controler.AbstractController.run(AbstractController.java:92) at org.matsim.core.controler.NewControler.run(NewControler.java:75) at org.matsim.core.controler.Controler.run(Controler.java:202) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.run(RunTaxiPTIntermodalExample.java:101) at org.matsim.contrib.av.intermodal.RunTaxiPTIntermodalExample.main(RunTaxiPTIntermodalExample.java:47) 2018-05-15 15:40:58,752 ERROR MatsimRuntimeModifications:78 ERROR --- MATSim unexpectedly terminated. Please check the output or the logfile with warnings and errors for hints. 2018-05-15 15:40:58,752 ERROR MatsimRuntimeModifications:79 ERROR --- results should not be used for further analysis. 2018-05-15 15:40:58,752 ERROR MatsimRuntimeModifications:83 ERROR --- This was an unexpected shutdown! See the log file for a possible reason.
by Kai Nagel on 2018-05-15 14:06:07
Maybe https://matsim.atlassian.net/browse/MATSIM-81 ? Unfortunately, it contains another link towards the end which points to some place which does not exist any more. :-(
by Thibaut Dubernet on 2018-05-15 14:08:19
Dear Jishnu,
short answer: try running java in headless mode, using:
java -Djava.awt.headless=true <rest of your command>
Slightly longer answer:
this is a problem that happens with the plotting library we use (JFreeChart), when running on a server without a window system. You need to explicitly tell Java you are running in "headless" mode, that is, without any graphical interface.
by Jishnu Narayan on 2018-05-15 14:48:13
Dear Thibaut and Kai,
Thank you for the reply! It's running fine with that command now. Appreciate the help!
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq