Hi Yeray,
On Tue, Jan 25, 2022 at 11:00 AM Yeray Borges Santana <yborgess(a)redhat.com>
wrote:
Hi, Jean Francois,
Something I'm unable to get about the uses of such a variable is when and
how we should use it.
Please correct me if I am wrong, but my understanding is the wildfly-s2i
image comes with a configuration customized for OpenShift, and the way to
customize the installation is by using Galleon Layers. It means it doesn't
come with a set of available server configuration files that we, as users,
can select up by using WILDFLY_SERVER_CONFIGURATION.
Having said that, how we should use such an environment variable when
running the image?
I did a quick test and I'm getting the following error:
$ docker run -e WILDFLY_SERVER_CONFIGURATION=standalone-full.xml -it
quay.io/wildfly/wildfly-centos7
********************************************************************************************
WARNING: Starting WildFly 26.0.0.Final, the
quay.io/wildfly/wildfly-centos7 and
quay.io/wildfly/wildfly-runtime-centos7 images are being deprecated and
will be replaced
by new images in a future release.
********************************************************************************************
2022-01-25 16:56:32 Launching WildFly Server
INFO Access log is disabled, ignoring configuration.
INFO Clustering feature is not enabled, no jgroups subsystem present in
server configuration.
INFO Server started in admin mode, CLI script executed during server boot.
INFO Running wildfly/wildfly-centos7 image, version 26.0-sp1
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/wildfly
JAVA: /usr/lib/jvm/java-11/bin/java
JAVA_OPTS: -javaagent:"/opt/wildfly/jboss-modules.jar" -server -Xms64m
-Xmx512m -XX:MetaspaceSize=96m -Djava.net.preferIPv4Stack=true
-Djboss.modules.system.pkgs=jdk.nashorn.api,com.sun.crypto.provider
-Djava.awt.headless=true -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
-XX:+ExitOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom
-Djboss.modules.settings.xml.url=file:///opt/jboss/container/wildfly/s2i/galleon/settings.xml
--add-exports=java.desktop/sun.awt=ALL-UNNAMED
--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/
java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.management/javax.management=ALL-UNNAMED
--add-opens=java.naming/javax.naming=ALL-UNNAMED
=========================================================================
16:56:33,861 INFO [org.jboss.modules] (main) JBoss Modules version
2.0.0.Final
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jolokia.util.ClassUtil
(jar:file:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar!/) to
constructor
sun.security.x509.X500Name(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
WARNING: Please consider reporting this to the maintainers of
org.jolokia.util.ClassUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal
reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.IllegalStateException: WFLYCTL0214: Could not get main file:
standalone-full.xml. Specified files must be relative to the configuration
dir: /opt/wildfly/standalone/configuration
at org.jboss.as.controller(a)18.0.0.Final
//org.jboss.as.controller.persistence.ConfigurationFile.determineMainFile(ConfigurationFile.java:363)
at org.jboss.as.controller(a)18.0.0.Final
//org.jboss.as.controller.persistence.ConfigurationFile.<init>(ConfigurationFile.java:201)
at org.jboss.as.server(a)18.0.0.Final
//org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:551)
at org.jboss.as.server(a)18.0.0.Final
//org.jboss.as.server.Main.determineEnvironment(Main.java:407)
at org.jboss.as.server(a)18.0.0.Final
//org.jboss.as.server.Main.main(Main.java:96)
at org.jboss.modules.Module.run(Module.java:353)
at org.jboss.modules.Module.run(Module.java:321)
at org.jboss.modules.Main.main(Main.java:604)
I think we only ship standalone.xml, if you want to use a different config
you'll need to add it to the image.
Ken
Thanks,
Yeray
On Tue, Jan 25, 2022 at 4:34 PM <jfinelli(a)redhat.com> wrote:
> Thanks Jean Francois :-) The EAP quickstart I am currently trying to spin
> up is `cmt`
>
> On Tue, 2022-01-25 at 17:16 +0100, Jean Francois Denise wrote:
>
> Hi,
> WILDFLY_SERVER_CONFIGURATION should be used. I think you ran into a typo
> in the README.
> Just curious, what is the quickstart you are trying with openshift that
> requires standalone-full.xml?
> JF
>
> On 1/25/22 4:12 PM, Manuel Finelli wrote:
>
> Hi Experts,
>
> I had a couple of tries with OpenShift and WildFly to spin up a simple
> application (the EAP quickstart `cmt`). I installed `crc` [1] to run
> OpenShift locally and `oc` [2] to control it.
>
> What I tried so far:
> * Employ wildfly-centos7 [3] directly and then spin up a new-app with the
> command `oc new-app
https://github.com/wildfly/quickstart.git --context-dir=cmt
> --image=quay.io/wildfly/wildfly-centos7 --env
> SERVER_CONFIGURATION=standalone-full.xml`
> * Build the WFLY image from "scratch" and then spin up a new-app with the
> env variable `--env SERVER_CONFIGURATION=standalone-full.xml`...more or
> less what it is suggested in [4] but adding the env variable, i.e. `oc
> new-app wildfly-quickstart/cmt -e SERVER_CONFIGURATION=standalone-full.xml`
> (where wildfly-quickstart is the OpenShift project I am using)
>
> In both cases, I get very close to success but what does not work is
> `--env SERVER_CONFIGURATION=standalone-full.xml`. My WildFly server gets
> set up with standalone.xml, which is not enough for my quickstart.
> As a side note, I can see `SERVER_CONFIGURATION=standalone-full.xml`
> among the environment variables of the WFLY pod. I also ran a couple of
> experiments playing with JAVA_OPTS_APPEND (e.g.
> `JAVA_OPTS_APPEND=-Djboss.server.default.config=standalone-full.xml`) but
> it did not help.
>
> So my questions would be:
> * Is there a different way to pass env variables when applications are
> created? If that is the case, would it be worth mentioning it here [5]?
> * Have I missed something else?
>
> [1]
https://developers.redhat.com/products/codeready-containers/overview
> [2]
>
https://access.redhat.com/downloads/content/290/ver=4.9/rhel---8/4.9.17/x...
> [3]
https://quay.io/repository/wildfly/wildfly-centos7?tab=info
> [4]
>
https://github.com/wildfly/wildfly-s2i/tree/master/examples/jsf-ejb-jpa
> [5]
>
https://github.com/wildfly/wildfly-s2i/blob/master/README.md#environment-...
> _______________________________________________
> wildfly-dev mailing list -- wildfly-dev(a)lists.jboss.org
> To unsubscribe send an email to wildfly-dev-leave(a)lists.jboss.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
>
> _______________________________________________
> wildfly-dev mailing list -- wildfly-dev(a)lists.jboss.org
> To unsubscribe send an email to wildfly-dev-leave(a)lists.jboss.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
>
> _______________________________________________
> wildfly-dev mailing list -- wildfly-dev(a)lists.jboss.org
> To unsubscribe send an email to wildfly-dev-leave(a)lists.jboss.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
wildfly-dev mailing list -- wildfly-dev(a)lists.jboss.org
To unsubscribe send an email to wildfly-dev-leave(a)lists.jboss.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s