0

I am trying to run a headless instance of NetLogo (version 6.2.2) on a Linux machine. The NetLogo instance is created by a jar file which is executed by a PHP script. This is working fine on my windows machine but throws this error when i try to do the same on linux.

ERROR beemodel.Main:131 - org.picocontainer.PicoCompositionException: java.nio.file.AccessDeniedException: /usr/share/httpd/.netlogo
ERROR beemodel.Main:133 - org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:353)
ERROR beemodel.Main:133 - org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
ERROR beemodel.Main:133 -org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
ERROR beemodel.Main:133 - org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
ERROR beemodel.Main:133 - org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
ERROR beemodel.Main:133 - org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
ERROR beemodel.Main:133 - org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
ERROR beemodel.Main:133 - org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
ERROR beemodel.Main:133 - org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
ERROR beemodel.Main:133 - org.nlogo.headless.HeadlessWorkspace$.newInstance(HeadlessWorkspace.scala:51)
ERROR beemodel.Main:133 - org.nlogo.headless.HeadlessWorkspace$.newInstance(HeadlessWorkspace.scala:34)
ERROR beemodel.Main:133 - org.nlogo.headless.HeadlessWorkspace$.newInstance(HeadlessWorkspace.scala:32)
ERROR beemodel.Main:133 - org.nlogo.headless.HeadlessWorkspace.newInstance(HeadlessWorkspace.scala)
ERROR beemodel.Main:133 - beemodel.Simulation.runHeadless(Simulation.java:33)
ERROR beemodel.Main:133 - beemodel.Main.main(Main.java:123)

There is no such file /usr/share/httpd/.netlogo in my file system and i'm not sure why the program is looking for one there. I've granted the highest possible permissions to both the jar file and the /usr/share/httpd/ directory and am wondering if this is really a permissions issue or something else i am missing. Any help would be greatly appreciated. I can provide additional information if needed.

  • `.netlogo` is the default folder used by NetLogo on Linux systems to store settings and downloaded extensions for the extensions manager. You can override where this is placed by changing the `user.home` Java system property given to your jar launcher. I'm curious if creating the `.netlogo` folder in advance of running changes the outcome? In any case, posting some relevant bits of your PHP script might be helpful to diagnose what is going on. – Jasper Feb 24 '22 at 17:11
  • 1
    @Jasper Thank you so much! Changing the `user.home` property did the trick. I just added `-Duser.home=/home/sysadmin` to the command executed by the PHP script and its now working fine. – Shamus Boulianne Feb 25 '22 at 01:17

0 Answers0