[JBoss JIRA] (WFLY-9496) WildFly 10.1 Final: Virtual Hosting
by I J (JIRA)
[ https://issues.jboss.org/browse/WFLY-9496?page=com.atlassian.jira.plugin.... ]
I J commented on WFLY-9496:
---------------------------
Thank you for your response Stuart.
Okay - have attached 'wireshark' a csv file.
Although I know the port redirection works as per my vanilla apache2 installation. Also, if you go to 216.58.41.154 you will see the default server working and redirecting correctly.
> WildFly 10.1 Final: Virtual Hosting
> ------------------------------------
>
> Key: WFLY-9496
> URL: https://issues.jboss.org/browse/WFLY-9496
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 10.1.0.Final
> Environment: Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
> JAVA_HOME: null
> java.version: 1.8.0_151
> java.vm.vendor: Oracle Corporation
> java.vm.version: 25.151-b12
> os.name: Linux
> os.version: 4.9.0-3-amd64
> WildFly: 10.1.0.Final
> Reporter: I J
> Assignee: Stuart Douglas
> Priority: Critical
> Labels: new_and_noteworthy
> Attachments: wireshark
>
>
> My configuration:
> ========= standalone-full.xml ===============
> <subsystem xmlns="urn:jboss:domain:undertow:3.1">
> <buffer-cache name="default"/>
> <server name="default-server">
> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
> <host name="default-host" alias="localhost">
> <location name="/" handler="welcome-content"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> <host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
> <host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
> </server>
> <servlet-container name="default">
> <jsp-config/>
> <websockets/>
> </servlet-container>
> <handlers>
> <file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
> </handlers>
> <filters>
> <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
> </filters>
> </subsystem>
> ============ /etc/hosts ============
> 127.0.0.1 localhost host1 host2
> =========== domain1-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host1</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> =========== domain2-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host2</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> [EDIT] ============================================
> Wildfly is launched as per: [opt/wildfly/bin] ./standalone.sh -b=0.0.0.0 -c=standalone-full.xml
> Thus socket bindings should not be an issue.
> Notes:
> 1. Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080
> Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.
> 2. Router port 80 is forwarded to 8080
> 3. When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.
> 4. I have intercepted the request headers for domain1.com and domain2.com and they are correct.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9496) WildFly 10.1 Final: Virtual Hosting
by I J (JIRA)
[ https://issues.jboss.org/browse/WFLY-9496?page=com.atlassian.jira.plugin.... ]
I J updated WFLY-9496:
----------------------
Attachment: wireshark
> WildFly 10.1 Final: Virtual Hosting
> ------------------------------------
>
> Key: WFLY-9496
> URL: https://issues.jboss.org/browse/WFLY-9496
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 10.1.0.Final
> Environment: Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
> JAVA_HOME: null
> java.version: 1.8.0_151
> java.vm.vendor: Oracle Corporation
> java.vm.version: 25.151-b12
> os.name: Linux
> os.version: 4.9.0-3-amd64
> WildFly: 10.1.0.Final
> Reporter: I J
> Assignee: Stuart Douglas
> Priority: Critical
> Labels: new_and_noteworthy
> Attachments: wireshark
>
>
> My configuration:
> ========= standalone-full.xml ===============
> <subsystem xmlns="urn:jboss:domain:undertow:3.1">
> <buffer-cache name="default"/>
> <server name="default-server">
> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
> <host name="default-host" alias="localhost">
> <location name="/" handler="welcome-content"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> <host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
> <host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
> </server>
> <servlet-container name="default">
> <jsp-config/>
> <websockets/>
> </servlet-container>
> <handlers>
> <file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
> </handlers>
> <filters>
> <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
> </filters>
> </subsystem>
> ============ /etc/hosts ============
> 127.0.0.1 localhost host1 host2
> =========== domain1-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host1</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> =========== domain2-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host2</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> [EDIT] ============================================
> Wildfly is launched as per: [opt/wildfly/bin] ./standalone.sh -b=0.0.0.0 -c=standalone-full.xml
> Thus socket bindings should not be an issue.
> Notes:
> 1. Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080
> Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.
> 2. Router port 80 is forwarded to 8080
> 3. When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.
> 4. I have intercepted the request headers for domain1.com and domain2.com and they are correct.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9496) WildFly 10.1 Final: Virtual Hosting
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-9496?page=com.atlassian.jira.plugin.... ]
Stuart Douglas commented on WFLY-9496:
--------------------------------------
This sounds like an issue with your router. Can you do a packet capture with wireshark and attach it here to give some insight as to what is going on?
> WildFly 10.1 Final: Virtual Hosting
> ------------------------------------
>
> Key: WFLY-9496
> URL: https://issues.jboss.org/browse/WFLY-9496
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 10.1.0.Final
> Environment: Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
> JAVA_HOME: null
> java.version: 1.8.0_151
> java.vm.vendor: Oracle Corporation
> java.vm.version: 25.151-b12
> os.name: Linux
> os.version: 4.9.0-3-amd64
> WildFly: 10.1.0.Final
> Reporter: I J
> Assignee: Stuart Douglas
> Priority: Critical
> Labels: new_and_noteworthy
>
> My configuration:
> ========= standalone-full.xml ===============
> <subsystem xmlns="urn:jboss:domain:undertow:3.1">
> <buffer-cache name="default"/>
> <server name="default-server">
> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
> <host name="default-host" alias="localhost">
> <location name="/" handler="welcome-content"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> <host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
> <host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
> </server>
> <servlet-container name="default">
> <jsp-config/>
> <websockets/>
> </servlet-container>
> <handlers>
> <file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
> </handlers>
> <filters>
> <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
> </filters>
> </subsystem>
> ============ /etc/hosts ============
> 127.0.0.1 localhost host1 host2
> =========== domain1-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host1</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> =========== domain2-war/WEB-INF/jboss-web.xml =========
> <jboss-web>
> <virtual-host>host2</virtual-host>
> <context-root>/</context-root>
> </jboss-web>
> [EDIT] ============================================
> Wildfly is launched as per: [opt/wildfly/bin] ./standalone.sh -b=0.0.0.0 -c=standalone-full.xml
> Thus socket bindings should not be an issue.
> Notes:
> 1. Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080
> Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.
> 2. Router port 80 is forwarded to 8080
> 3. When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.
> 4. I have intercepted the request headers for domain1.com and domain2.com and they are correct.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-3152) Failed initializing module org.jboss.as.logging
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/WFLY-3152?page=com.atlassian.jira.plugin.... ]
David Lloyd commented on WFLY-3152:
-----------------------------------
Note that Swarm is a different project whose tracker resides here: https://issues.jboss.org/browse/SWARM
> Failed initializing module org.jboss.as.logging
> ------------------------------------------------
>
> Key: WFLY-3152
> URL: https://issues.jboss.org/browse/WFLY-3152
> Project: WildFly
> Issue Type: Bug
> Reporter: Huu Loi Lai
> Priority: Blocker
>
> I try to run integration test with arquillian and wildfly and I get following erros:
> ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([])
> java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:99)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591)
> at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469)
> at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268)
> at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:314)
> at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:294)
> at org.jboss.as.server.ServerService.boot(ServerService.java:356)
> at org.jboss.as.server.ServerService.boot(ServerService.java:331)
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:91)
> ... 10 more
> Caused by: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
> at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:103)
> at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:98)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:113)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:744)
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9408) Wildfly 10 - The cost of creating the first eclipselink EntityManager during deployment is extremelly high due to MBeanServer.getMbeanCount() cost
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-9408?page=com.atlassian.jira.plugin.... ]
Brian Stansberry reassigned WFLY-9408:
--------------------------------------
Assignee: Brian Stansberry (was: Scott Marlow)
Resolution: Done
> Wildfly 10 - The cost of creating the first eclipselink EntityManager during deployment is extremelly high due to MBeanServer.getMbeanCount() cost
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9408
> URL: https://issues.jboss.org/browse/WFLY-9408
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.1.0.Final
> Reporter: Nuno Godinho de Matos
> Assignee: Brian Stansberry
> Fix For: 12.0.0.Alpha1
>
>
> I have been trying to reduce the deployment of a WAR application.
> One of the greate bottlenecks on the deployment is the cost of getting the first EntityManager instance of eclipselink.
> To try to reduce cost of startup I found myself forced to during @Startup fire a CDI event observed by an @Asynchronous ejb whose only task is to do a dummy entityManager.flush().
> The results I had for the execution time of this observer could go as high as 13 seconds.
> On top of that, I had already noticed while writting an arquillian system test for eclipselink on:
> https://issues.jboss.org/browse/WFLY-8954
> that the cost of starting up elcipselink under wildfly was much much higher than that of Hibernate and OpenJPA.
> With this introduction done let us go to the facts, and they are quite ridiculous.
> I have sampled the deployment of an application from begging to end with a sampling script that took a thread dump every second to analyse where the app is spending deployment time generically.
> Eventually, I reached the eclipselink deployment.
> And I had entries on the log such as:
> DatabaseEntityManagerStarter] - <- StartupDatabaseEntityManagerStarter.observeApplicationReadyLoadEntityManagerEvent {5948 ms} <EJB aync-ejb-thread-pool - 1>
> While sampling why this was happening I got more than 7 straight thread dump samples (more than 7 seconds) where the following stack trace was present:
> {panel}
> at java.security.AccessController.getContext(Unknown Source)
> at org.jboss.as.controller.SecurityActions.getCaller(SecurityActions.java:47)
> at org.jboss.as.controller.AbstractOperationContext.getCaller(AbstractOperationContext.java:1138)
> at org.jboss.as.controller.OperationContextImpl.authorizeResource(OperationContextImpl.java:1306)
> at org.jboss.as.controller.OperationContextImpl.authorizeResource(OperationContextImpl.java:128)
> at org.jboss.as.controller.operations.global.ReadResourceDescriptionHandler$CheckResourceAccessHandler.execute(ReadResourceDescriptionHandler.java:429)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
> at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
> at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1329)
> at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:400)
> at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:208)
> at org.jboss.as.jmx.model.ResourceAccessControlUtil.getResourceAccess(ResourceAccessControlUtil.java:85)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:51)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61)
> at org.jboss.as.jmx.model.RootResourceIterator.iterate(RootResourceIterator.java:43)
> at org.jboss.as.jmx.model.ModelControllerMBeanHelper.getMBeanCount(ModelControllerMBeanHelper.java:125)
> at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.getMBeanCount(ModelControllerMBeanServerPlugin.java:161)
> at org.jboss.as.jmx.PluggableMBeanServerImpl.getMBeanCount(PluggableMBeanServerImpl.java:545)
> ----- Because of the mBeanServer.getMBeanCount():
> getAbstractSession().log(SessionLog.FINER, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_mbeanserver_print",
> new Object[]{mBeanServer, mBeanServer.getMBeanCount(), mBeanServer.getDefaultDomain(), 0});
>
>
> at org.eclipse.persistence.platform.server.JMXServerPlatformBase.getMBeanServer(JMXServerPlatformBase.java:271)
> at org.eclipse.persistence.platform.server.JMXServerPlatformBase.serverSpecificRegisterMBean(JMXServerPlatformBase.java:297)
> ---- Will register Managed beans under the prefix: TopLink:Name="
> at org.eclipse.persistence.platform.server.jboss.JBossPlatform.serverSpecificRegisterMBean(JBossPlatform.java:147)
> at org.eclipse.persistence.platform.server.ServerPlatformBase.registerMBean(ServerPlatformBase.java:581)
> ------- this.serverSpecificRegisterMBean();
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:857)
> at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:762)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)
> at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
> - locked [0x00000000a90d1210] (a org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate)
> at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
> {panel}
> After chekcing the eclipselink source code associated to line:
> {panel}
> at org.eclipse.persistence.platform.server.JMXServerPlatformBase.getMBeanServer(JMXServerPlatformBase.java:271)
> {panel}
> I found the following source code - which I could hardly believe would explain this deployment bottleneck:
> {panel}
> } else {
> // Only a single MBeanServer instance was found
> getAbstractSession().log(SessionLog.FINER, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_mbeanserver_print",
> new Object[]{mBeanServer, mBeanServer.getMBeanCount(), mBeanServer.getDefaultDomain(), 0});
> }
> {panel}
> In short, the first eclipselink entity manager cost of creation is a never ending task under wildfly because of how expensive the above log statement is:
> {panel}
> mBeanServer.getMBeanCount()
> {panel}
> I do not know how to interpret this.
> Is the problem that the API should cost ms and it literally takes several seconds to calculate - and the problem is the cost of the API under wildfly.
> Or is it that eclipselink should never have written such a log statement on the first place?
> To address the issue, I have hacked up my local:
> org.jipijapa.eclipselink.WildFlyServerPlatform
> In this class, I have override the getMeabServer API from the base class.
> I Have created a hacked constant:
> {panel}
> /**
> * During deployment, when the first entity manager is created, the
> * application deployment becomes extremelty slow due to the
> * MbeanServer.getbeanCount() access done by eclipselink. This access is on
> * top of all things done only for logging purposes. We completely kill the
> * call to the api.
> */
> private static final int MBEAN_SERVER_COUNT_DUMMY_VALUE = -999;
> {panel}
> And finally I added an overriden method:
> {panel}
> @Override
> public MBeanServer getMBeanServer() {
> /**
> * This function will attempt to get the MBeanServer via the
> * findMBeanServer spec call. 1) If the return list is null we attempt
> * to retrieve the PlatformMBeanServer (if it exists or is enabled in
> * this security context). 2) If the list of MBeanServers returned is
> * more than one we get the lowest indexed MBeanServer that does not on
> * a null default domain. 3) 333336: we need to wrap JMX calls in
> * doPrivileged blocks 4) fail-fast: if there are any issues with JMX -
> * continue - don't block the deploy()
> */
> // lazy initialize the MBeanServer reference
> if (null == mBeanServer) {
> List<MBeanServer> mBeanServerList = null;
> try {
> if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
> try {
> mBeanServerList = (List<MBeanServer>) AccessController
> .doPrivileged(new PrivilegedExceptionAction() {
> @Override
> public List<MBeanServer> run() {
> return MBeanServerFactory.findMBeanServer(null);
> }
> });
> } catch (PrivilegedActionException pae) {
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER, "failed_to_find_mbean_server",
> "null or empty List returned from privileged MBeanServerFactory.findMBeanServer(null)");
> Context initialContext = null;
> try {
> initialContext = new InitialContext(); // the
> // context
> // should be
> // cached
> mBeanServer = (MBeanServer) initialContext.lookup(JMX_JNDI_RUNTIME_REGISTER);
> } catch (NamingException ne) {
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER,
> "failed_to_find_mbean_server", ne);
> }
> }
> } else {
> mBeanServerList = MBeanServerFactory.findMBeanServer(null);
> }
> // Attempt to get the first MBeanServer we find - usually there
> // is only one - when agentId == null we return a List of them
> if (null == mBeanServer && (null == mBeanServerList || mBeanServerList.isEmpty())) {
> // Unable to acquire a JMX specification List of MBeanServer
> // instances
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER, "failed_to_find_mbean_server",
> "null or empty List returned from MBeanServerFactory.findMBeanServer(null)");
> // Try alternate static method
> if (!PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
> mBeanServer = ManagementFactory.getPlatformMBeanServer();
> if (null == mBeanServer) {
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER,
> "failed_to_find_mbean_server",
> "null returned from ManagementFactory.getPlatformMBeanServer()");
> } else {
> getAbstractSession().log(SessionLog.FINER, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_mbeanserver_print",
> new Object[] { mBeanServer, MBEAN_SERVER_COUNT_DUMMY_VALUE,
> mBeanServer.getDefaultDomain(), 0 });
> }
> }
> } else {
> // Use the first MBeanServer by default - there may be
> // multiple domains each with their own MBeanServer
> mBeanServer = mBeanServerList.get(JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS);
> if (mBeanServerList.size() > 1) {
> // There are multiple MBeanServerInstances (usually only
> // JBoss)
> // 328006: WebLogic may also return multiple instances
> // (we need to register the one containing the com.bea
> // tree)
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_encountered_multiple_mbeanserver_instances",
> mBeanServerList.size(), JMX_MBEANSERVER_INDEX_DEFAULT_FOR_MULTIPLE_SERVERS,
> mBeanServer);
> // IE: for JBoss we need to verify we are using the
> // correct MBean server of the two (default, null)
> // Check the domain if it is non-null - avoid using this
> // server
> int index = 0;
> for (MBeanServer anMBeanServer : mBeanServerList) {
> getAbstractSession().log(SessionLog.FINER, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_mbeanserver_print",
> new Object[] { anMBeanServer, MBEAN_SERVER_COUNT_DUMMY_VALUE,
> anMBeanServer.getDefaultDomain(), index });
> if (null != anMBeanServer.getDefaultDomain()) {
> mBeanServer = anMBeanServer;
> getAbstractSession().log(SessionLog.WARNING, SessionLog.SERVER,
> "jmx_mbean_runtime_services_switching_to_alternate_mbeanserver", mBeanServer,
> index);
> }
> index++;
> }
> } else {
> // Only a single MBeanServer instance was found
> // mBeanServer.getMBeanCount() - This is very slow on
> // wildfly
> // we are disabling this statemnt
> getAbstractSession().log(SessionLog.FINER, SessionLog.SERVER,
> "jmx_mbean_runtime_services_registration_mbeanserver_print", new Object[] { mBeanServer,
> MBEAN_SERVER_COUNT_DUMMY_VALUE, mBeanServer.getDefaultDomain(), 0 });
> }
> }
> } catch (Exception e) {
> // TODO: Warning required
> e.printStackTrace();
> }
> }
> return mBeanServer;
> }
> {panel}
> The above code looks extremelly complex to me just to get a MBeanserver in an application server.
> I find it hard to believe that this operation should ever have a code with this many lines of code behind it, but ok.
> As you can see in the code I am pasting the only trick I am putting in place to address the deployment time on my machine is to replace every single mebanserver.getMbeanCoundt() by a "dumb" reference to the constant: MBEAN_SERVER_COUNT_DUMMY_VALUE.
> Would it possible that the wildflt server platform be tuned to address this issue?
> I think it would be a good Idea if you revise the getMbeanServer api to be as simple as possible for JBOSS/Wildfly - the base eclipselink code make slittle since in my oppinion.
> But you will know best.
> It is also interesting that now when i run the test suite project from wildfly eclipselink actualy manages to be few ms faster than hibernate:
> {panel}
> Running org.jboss.as.test.compat.jpa.eclipselink.EclipseLinkSharedModuleProviderTestCase
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.662 sec - in org.jboss.as.test.compat.jpa.eclipselink.EclipseLinkSharedModuleProviderTestCase
> This eclipselink test is actually now faster than
> Running org.jboss.as.test.compat.jpa.eclipselink.wildfly8954.PersistenceXmlHelperTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.354 sec - in org.jboss.as.test.compat.jpa.eclipselink.wildfly8954.PersistenceXmlHelperTest
> Running org.jboss.as.test.compat.jpa.eclipselink.wildfly8954.WFLY8954BaseTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.685 sec - in org.jboss.as.test.compat.jpa.eclipselink.wildfly8954.WFLY8954BaseTest
> Running org.jboss.as.test.compat.jpa.hibernate.HibernateJarsInDeploymentTestCase
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.714 sec - in
> The hibernate test here loses to the eclipselink test above.
> org.jboss.as.test.compat.jpa.hibernate.HibernateJarsInDeploymentTestCase
> Running org.jboss.as.test.compat.jpa.openjpa.OpenJPASharedModuleProviderTestCase
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.218 sec - in org.jboss.as.test.compat.jpa.openjpa.OpenJPASharedModuleProviderTestCase
> {panel}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-3152) Failed initializing module org.jboss.as.logging
by J R (JIRA)
[ https://issues.jboss.org/browse/WFLY-3152?page=com.atlassian.jira.plugin.... ]
J R commented on WFLY-3152:
---------------------------
Quoting: 'This is not a bug. The error message explains the exact problem. If you need help, please use the user forums.'
The quote above led me down the wrong path.
In my case, the message did not explain the problem at all and had nothing to do with whether or not the system property "java.util.logging.manager" was set "org.jboss.logmanager.LogManager".
The issue was that you cannot instantiate a logger until AFTER Swarm is running. So if you are using a main() class and a static logger, wait until after Swarm is started to instantiate it. In the meantime you could use System.out if you really needed to log something.
See: https://groups.google.com/forum/#!topic/wildfly-swarm/btSdaeR4f3w
> Failed initializing module org.jboss.as.logging
> ------------------------------------------------
>
> Key: WFLY-3152
> URL: https://issues.jboss.org/browse/WFLY-3152
> Project: WildFly
> Issue Type: Bug
> Reporter: Huu Loi Lai
> Priority: Blocker
>
> I try to run integration test with arquillian and wildfly and I get following erros:
> ERROR: JBAS014612: Operation ("parallel-extension-add") failed - address: ([])
> java.lang.RuntimeException: JBAS014670: Failed initializing module org.jboss.as.logging
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:99)
> at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:591)
> at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:469)
> at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:273)
> at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:268)
> at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:314)
> at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:294)
> at org.jboss.as.server.ServerService.boot(ServerService.java:356)
> at org.jboss.as.server.ServerService.boot(ServerService.java:331)
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:256)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:91)
> ... 10 more
> Caused by: java.lang.IllegalStateException: JBAS011592: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
> at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:103)
> at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:98)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
> at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:113)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:744)
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9496) WildFly 10.1 Final: Virtual Hosting
by I J (JIRA)
I J created WFLY-9496:
-------------------------
Summary: WildFly 10.1 Final: Virtual Hosting
Key: WFLY-9496
URL: https://issues.jboss.org/browse/WFLY-9496
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Affects Versions: 10.1.0.Final
Environment: Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
JAVA_HOME: null
java.version: 1.8.0_151
java.vm.vendor: Oracle Corporation
java.vm.version: 25.151-b12
os.name: Linux
os.version: 4.9.0-3-amd64
WildFly: 10.1.0.Final
Reporter: I J
Assignee: Stuart Douglas
Priority: Critical
My configuration:
========= standalone-full.xml ===============
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
<host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
<host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>
============ /etc/hosts ============
127.0.0.1 localhost host1 host2
=========== domain1-war/WEB-INF/jboss-web.xml =========
<jboss-web>
<virtual-host>host1</virtual-host>
<context-root>/</context-root>
</jboss-web>
=========== domain2-war/WEB-INF/jboss-web.xml =========
<jboss-web>
<virtual-host>host2</virtual-host>
<context-root>/</context-root>
</jboss-web>
[EDIT] ============================================
Wildfly is launched as per: [opt/wildfly/bin] ./standalone.sh -b=0.0.0.0 -c=standalone-full.xml
Thus socket bindings should not be an issue.
Notes:
1. Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080
Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.
2. Router port 80 is forwarded to 8080
3. When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.
4. I have intercepted the request headers for domain1.com and domain2.com and they are correct.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-4001) Virtual host in jboss-web.xml doesn't work
by I J (JIRA)
[ https://issues.jboss.org/browse/WFLY-4001?page=com.atlassian.jira.plugin.... ]
I J commented on WFLY-4001:
---------------------------
Hi T. Cerar,
This does not work correctly in WildFly 10.1 Final:
The following is a post I just created in the forums. Could you please comment?
link: https://developer.jboss.org/message/977501#977501
Hi All,
A little help would be greatly appreciated.
My configuration:
========= standalone-full.xml ===============
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
<host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
<host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
</filters>
</subsystem>
============ /etc/hosts ============
127.0.0.1 localhost host1 host2
=========== domain1-war/WEB-INF/jboss-web.xml =========
<jboss-web>
<virtual-host>host1</virtual-host>
<context-root>/</context-root>
</jboss-web>
=========== domain2-war/WEB-INF/jboss-web.xml =========
<jboss-web>
<virtual-host>host2</virtual-host>
<context-root>/</context-root>
</jboss-web>
[EDIT] ============================================
Wildfly is launched as per: [opt/wildfly/bin] ./standalone.sh -b=0.0.0.0 -c=standalone-full.xml
Thus socket bindings should not be an issue.
Notes:
1. Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080
Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.
2. Router port 80 is forwarded to 8080
3. When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.
4. I have intercepted the request headers for domain1.com and domain2.com and they are correct.
Questions:
1. Why does wildfly not take the alias reference for the local host1 or host2 domain, that being the request host token, and serve up the appropriate webapp?
2. What am I doing incorrectly here? Seems this should be simple to configure?
Thanks You in advance for any and all help!
> Virtual host in jboss-web.xml doesn't work
> ------------------------------------------
>
> Key: WFLY-4001
> URL: https://issues.jboss.org/browse/WFLY-4001
> Project: WildFly
> Issue Type: Task
> Components: Web (Undertow)
> Affects Versions: 9.0.0.Alpha1
> Reporter: Jim Ma
> Assignee: Tomaz Cerar
> Attachments: host.war
>
>
> Define the following configuration for undertow subsystem and deploy the attached host.war with virtual host "vhost2" metada in jboss-web.xml.
> {code:xml}
> <subsystem xmlns="urn:jboss:domain:undertow:2.0">
> <buffer-cache name="default"/>
> <server name="default-server">
> <http-listener name="default" socket-binding="http"/>
> <host name="default-host" alias="localhost">
> <location name="/" handler="welcome-content"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> </server>
> <server name="undertow-server2">
> <http-listener name="listener2" socket-binding="http2"/>
> <host name="vhost2" alias="localhost4">
> <location name="/" handler="welcome-content2"/>
> <filter-ref name="server-header"/>
> <filter-ref name="x-powered-by-header"/>
> </host>
> </server>
> <servlet-container name="default">
> <jsp-config/>
> </servlet-container>
> <handlers>
> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
> <file name="welcome-content2" path="${jboss.home.dir}/welcome-content2"/>
> </handlers>
> <filters>
> <response-header name="server-header" header-name="Server" header-value="WildFly/9"/>
> <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
> </filters>
> </subsystem>
> {code}
> Deploy is failed with error message :
> 14:37:27,092 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "host.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
> "jboss.undertow.deployment.default-server.vhost2./host is missing [jboss.undertow.server.default-server.vhost2]",
> "jboss.undertow.deployment.default-server.vhost2./host.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.vhost2]"
> ]}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9354) Typo in error message WFLYAC0023
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-9354?page=com.atlassian.jira.plugin.... ]
Brian Stansberry reassigned WFLY-9354:
--------------------------------------
Fix Version/s: 12.0.0.Alpha1
Assignee: jaikiran pai (was: Stuart Douglas)
Resolution: Done
> Typo in error message WFLYAC0023
> --------------------------------
>
> Key: WFLY-9354
> URL: https://issues.jboss.org/browse/WFLY-9354
> Project: WildFly
> Issue Type: Bug
> Components: Application Client
> Affects Versions: 11.0.0.CR1
> Reporter: Wolfgang Knauf
> Assignee: jaikiran pai
> Priority: Trivial
> Fix For: 12.0.0.Alpha1
>
>
> When starting a JavaEE application client with invalid ear/jar name, the error message lacks a "not" ("could NOT find application client..."):
> C:\Temp>c:\Temp\wildfly-11.0.0.CR1\bin\appclient.bat some.ear#some.jar
> Calling "c:\Temp\wildfly-11.0.0.CR1\bin\appclient.conf.bat"
> JAVA_HOME is not set. Unexpected results may occur.
> Set JAVA_HOME to the directory of your local JDK to avoid this message.
> 12:35:47,789 INFO [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final
> java.lang.RuntimeException: *WFLYAC0023: Could find application client* C:\Temp\so
> me.ear
> at org.jboss.as.appclient.subsystem.Main.main(Main.java:133)
> at org.jboss.modules.Module.run(Module.java:344)
> at org.jboss.modules.Main.main(Main.java:525)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFCORE-3391) Add compatibility tests of the 3.0.x client versions
by Brian Stansberry (JIRA)
Brian Stansberry created WFCORE-3391:
----------------------------------------
Summary: Add compatibility tests of the 3.0.x client versions
Key: WFCORE-3391
URL: https://issues.jboss.org/browse/WFCORE-3391
Project: WildFly Core
Issue Type: Task
Components: Domain Management
Reporter: Brian Stansberry
Priority: Blocker
ClientCompatibilityUnitTestCase needs tests added for the client used in WF 11.0.0.Final and the closest equivalent for EAP 7.1.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month