Hide Forgot
Description of problem: When the "environment-modules" package is installed it adds the "MODULEPATH" environment variable, also used by JBoss 7, as a result the application server can't locate its modules. Version-Release number of selected component (if applicable): ovirt-engine-jbossas-1.2-2.fc16.x86_64.rpm How reproducible: Always. Steps to Reproduce: 1. Install the "environment-modules" package. 2. Log out and log in again. 3. Try to start the application server. Actual results: # /usr/share/jboss-as/bin/standalone.sh -c standalone.xml ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /usr/share/jboss-as JAVA: java JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true ========================================================================= Exception in thread "main" org.jboss.modules.ModuleNotFoundException: Module org.jboss.logmanager:main is not found in local module loader @4be03c55 (roots: /usr/share/Modules/modulefiles,/etc/modulefiles) at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126) at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:265) at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:212) at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94) at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:194) at org.jboss.modules.Main.main(Main.java:264) Expected results: The application server should start correctly. Additional info: Adding "unset MODULEPATH" at the beginning of "/etc/init.d/jboss-as" solves the problem.
The suggestion in "Additional info:" doesn't work, because standalone is run via daemon / su. What does work is adding it to the list of parameters to the two invocation options, i.e. before standalone: x86_64 garlic:~ alon$ cat /etc/init.d/jboss-as | grep MODULE daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE MODULEPATH= $JBOSS_SCRIPT -c $JBOSS_CONFIG 2>&1 > $JBOSS_CONSOLE_LOG & su - $JBOSS_USER -c "LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE MODULEPATH= $JBOSS_SCRIPT -c $JBOSS_CONFIG" 2>&1 > $JBOSS_CONSOLE_LOG &
This will be solved when we release 3.1, as it the script that starts the service doesn't use the MODULEPATH environment variable, and in addition it is started by systemctl which cleans the environment before starting the service.