[jboss-jira] [JBoss JIRA] (WFCORE-2223) Setting JBOSS_MODULEPATH is lost for second start of embed-server

Jean-Francois Denise (JIRA) issues at jboss.org
Tue Jan 24 10:47:01 EST 2017


    [ https://issues.jboss.org/browse/WFCORE-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13352869#comment-13352869 ] 

Jean-Francois Denise commented on WFCORE-2223:
----------------------------------------------

[~jcacek], Modules are not involved in your case. When you set JBOSS_MODULEPATH, the CLI will use this property value as module path but EmbeddedServer doesn't.

There seems to be a bug in org.boss.as.server.ServerEnvironment. The first time the embedded server is started, line 406 to 412, the modules directory is computed based on the home dir (that doesn't contain any modules because you removed them). The value points to an non existing directory. This value doesn't seem used BUT is set as the value of jboss.modules.dir property. That will cause a problem when the second embed-server is started.

I am wandering if a check shouldn't be added there to fail in such configuration.

When the second embed-server is started, org.boss.as.server.ServerEnvironment line 406/412, a property is found this time for jboss.modules.dir and the value it contains is a non existent modules directory. This does create the exception you are seeing.

I will assign to [~bstansberry2] but I feel that what you are trying to achieve is not supported. The system property to set should be JBOSS_HOME as it is documented in embed-server command help.


> Setting JBOSS_MODULEPATH is lost for second start of embed-server
> -----------------------------------------------------------------
>
>                 Key: WFCORE-2223
>                 URL: https://issues.jboss.org/browse/WFCORE-2223
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: CLI, Modules
>            Reporter: Josef Cacek
>            Assignee: David Lloyd
>            Priority: Critical
>
> When {{embed-server}} command is used more times in the CLI and a custom {{JBOSS_MODULEPATH}} is configured, then only the first server start uses the correct module path.
> The subsequent `embed-server` call results in error:
> {code}
> Cannot start embedded server: WFLYEMB0022: Cannot invoke 'start' on embedded process: WFLYSRV0118: Determined modules directory does not exist: /tmp/jboss-eap-7.0-no-modules/modules
> {code}
> Using the  {{JBOSS_MODULEPATH}} environment variable is documented in https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/7.0/single/configuration-guide/#define_an_external_jboss_eap_module_directory



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list