[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:
--------------------------------------
Why not just add a second HTTP listener to a different port (say 8081), and only use the external-http redirect on that one (and update the port forward)? That way if you connect to 8080 it will redirect to port 8443, while connecting to 8081 will redirect to 443?
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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 commented on WFLY-9496:
---------------------------
Fantastic Stuart! Thx
The only problem with this is that it forces all requests, both internet and intranet to an external port. Which means I must use a different listener for intranet services.
I suppose this may be a good reason to use the domain configuration methodology along with <socket-bindings port-offset="250"/>?
I tried this with the standalone configs but was unable to add an additional server with the same listeners (and port-offset) -> got a dup services error. The domain configs and underlying code seems to allow this?
By the way I could not find a reference to your solution in the docs or I would not have bothered you. Apologies.
At any rate, thanks for taking the time to help me with this! Will mark closed and hope it helps someone else. :)
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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:
--------------------------------------
It is because when the app attempts to redirect to SSL it thinks the correct port is 8443, it does not know about the router and its port forward.
You need to add:
<socket-binding name="external-https" port="443"/>
Then change the HTTP listener:
<http-listener name="default" socket-binding="http" redirect-socket="external-https" enable-http2="true"/>
That way it knows to redirect to 443 instead of 8443
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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-9451) Remove writeContentMethod from AppClientXml
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFLY-9451?page=com.atlassian.jira.plugin.... ]
Brian Stansberry updated WFLY-9451:
-----------------------------------
Description: Once WFCORE-3362 is done, the base class for AppClientXml will no longer require subclasses to implement XMLElementWriter<ModelMarshallingContext>. So AppClientXml should drop its no-op implementation. (was: Once WFORE-3309 is done, the base class for AppClientXml will no longer require subclasses to implement XMLElementWriter<ModelMarshallingContext>. So AppClientXml should drop its no-op implementation.)
> Remove writeContentMethod from AppClientXml
> -------------------------------------------
>
> Key: WFLY-9451
> URL: https://issues.jboss.org/browse/WFLY-9451
> Project: WildFly
> Issue Type: Task
> Components: Application Client
> Reporter: Brian Stansberry
> Assignee: Brian Stansberry
> Priority: Minor
>
> Once WFCORE-3362 is done, the base class for AppClientXml will no longer require subclasses to implement XMLElementWriter<ModelMarshallingContext>. So AppClientXml should drop its no-op implementation.
--
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 commented on WFLY-9496:
---------------------------
I don't no why the past posted twice upon submit. The socket binding group occurs only once in the config file.
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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 commented on WFLY-9496:
---------------------------
According to the standard standalone-full.xml I have the https listener bound to 8443. As Per:
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="iiop" interface="unsecure" port="3528"/>
<socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
My routers (standard) 443 port forwards to 8443. If I removed the two extra hosts declarations in standalone-full.xml and stick to the default configuration, I am able to install one app to that server. Further, I am able to reach the application externally including the redirect to the ssl socket (external 443 -> internal 8443) as currently configured in the router. I believe this is because all traffic defaults to the default. It is only when I try the virtual host configuration that all fails.
As mentioned when posted all works when employing the /etc/hosts file name resolution - all calls to host1:8080 (for host2 and localhost as well) are redirected to https://host1:8443 and all works.
I have attached a screenshot of my router config for your interest and by way of complete disclosure.
I have nginx and apache2 installed and was baselining speeds using mod_jk the the ajp connectors. All worked with either of those when they were managing the virtual hosts. Both those apps have been disabled as I am wanting to use Wildfly's undertow as the web server for these apps. They are faces apps thus I am not serving any static pages. Having an httpd front end to Wildfly seems a level of indirection too many (expecially considering that undertow is supposed to be optimized much as is nginx).
I really don't think this is a router issue. Rather either a vhost issue with Wildfly or a configuration issue. Having gone through this in detail I happen to believe it is the former. Setting log display levels to DEBUG in the configuration file is not giving me any extra info to go on as the freeze/timeout condition never (seemingly) makes it into the Wildfly code as nothing is logged there when the condition occurs (I tail system.log - nothing).
Any other information I can provide to help resolve this issue. (I will give you complete access to the box if you like?).
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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: Screenshot from 2017-10-30 19-25-12.png
> 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: Screenshot from 2017-10-30 19-25-12.png, wireshareNative.gz.pcap, 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-9500) [GSS](7.2.0) ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
by Brad Maxwell (JIRA)
Brad Maxwell created WFLY-9500:
----------------------------------
Summary: [GSS](7.2.0) ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
Key: WFLY-9500
URL: https://issues.jboss.org/browse/WFLY-9500
Project: WildFly
Issue Type: Bug
Components: EJB
Reporter: Brad Maxwell
Assignee: Stuart Douglas
Attachments: WFLY-9499-Reproducer.zip, reproducer-overlay.zip
ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
{code}
18:14:49,199 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: EJB Invocation failed on component App1Bean for method public abstract org.jboss.jbaesner.playground.common.SharedPojo org.jboss.jbaesner.playground.bean.App1Remote.sumRemote(int,int): javax.ejb.EJBException: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)
...
Caused by: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
at org.jboss.jbaesner.playground.bean.App1Bean.sumRemote(App1Bean.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
... 84 more
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month
[JBoss JIRA] (WFLY-9499) ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
by Brad Maxwell (JIRA)
[ https://issues.jboss.org/browse/WFLY-9499?page=com.atlassian.jira.plugin.... ]
Brad Maxwell updated WFLY-9499:
-------------------------------
Description:
ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
{code}
18:14:49,199 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: EJB Invocation failed on component App1Bean for method public abstract org.jboss.jbaesner.playground.common.SharedPojo org.jboss.jbaesner.playground.bean.App1Remote.sumRemote(int,int): javax.ejb.EJBException: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)
...
Caused by: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
at org.jboss.jbaesner.playground.bean.App1Bean.sumRemote(App1Bean.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
... 84 more
{code}
was:ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
> ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
> ----------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9499
> URL: https://issues.jboss.org/browse/WFLY-9499
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Reporter: Brad Maxwell
> Assignee: Stuart Douglas
> Attachments: WFLY-9499-Reproducer.zip, reproducer-overlay.zip
>
>
> ClassCastException when invoking EJB Remote Interface where Interface is in shared classloader but result is not
> {code}
> 18:14:49,199 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: EJB Invocation failed on component App1Bean for method public abstract org.jboss.jbaesner.playground.common.SharedPojo org.jboss.jbaesner.playground.bean.App1Remote.sumRemote(int,int): javax.ejb.EJBException: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)
> ...
> Caused by: java.lang.ClassCastException: org.jboss.jbaesner.playground.common.SharedPojo cannot be cast to org.jboss.jbaesner.playground.common.SharedPojo
> at org.jboss.jbaesner.playground.bean.App1Bean.sumRemote(App1Bean.java:64)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
> at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
> at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
> ... 84 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 1 month