Description of problem: Producer on loadbalancer is not handled properly, it always keep some URL of the node instead of LB - active node. Version-Release number of selected component (if applicable): JPP 6.0.0 ER03 How reproducible: always Steps to Reproduce: 1. setup producer as 2 node cluster + loadbalancer, use another instance against this balancer 2. register producer (with loadbalancer URL) 3. access remote portlet, stop active producer node 4. connection issue for node which was stopped - portlet not displayed, consumer have to be refreshed Here's how wsdl looks like on loadbalancer: <?xml version='1.0' encoding='UTF-8'?><definitions targetNamespace="urn:oasis:names:tc:wsrp:v2:wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:bind="urn:oasis:names:tc:wsrp:v2:bind" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <import location="http://perf13.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/MarkupService?wsdl=wsrp-2.0-bindings.wsdl" namespace="urn:oasis:names:tc:wsrp:v2:bind"> </import> <service name="WSRPService"> <port binding="bind:WSRP_v2_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/ServiceDescriptionService"/> </port> <port binding="bind:WSRP_v2_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/PortletManagementService"/> </port> <port binding="bind:WSRP_v2_Markup_Binding_SOAP" name="WSRPMarkupService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/MarkupService"/> </port> <port binding="bind:WSRP_v2_Registration_Binding_SOAP" name="WSRPRegistrationService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/RegistrationService"/> </port> </service> </definitions>
I've just reproduced this with gatein master. My scenario: - 2 nodes as producer + loadbalancer, one non-clustered instance as consumer - register consumer against loadbalancer - (add remote portlet) - stop active producer node - refresh consumer -> Caused by: java.net.ConnectException: ConnectException invoking http://perf07.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/ServiceDescriptionService: Connection refused (perf07 was active producer node which was stopped)
And it's also not possible to delete/deregister consumer if the node is down.
Chris Laprun <chris.laprun> made a comment on jira GTNWSRP-340 I have a consumer-side fix, which is sub-optimal since it will only fix the issue in the GateIn to GateIn case… :(
Proper fix will require a JBoss WS patch, unfortunately.
Alessio Soldano <asoldano> updated the status of jira JBWS-3569 to Coding In Progress
Alessio Soldano <asoldano> made a comment on jira JBWS-3569 This is basically fixed by the changes I just applied for https://issues.apache.org/jira/browse/CXF-4677 . The 'autoRewriteSoapAddressForAllServices' option introduced there has to be activated in RequestHandlerImpl, as per the patch snippet below: {noformat} Index: modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java =================================================================== --- modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java (revision 17049) +++ modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java (working copy) @@ -197,8 +197,10 @@ String ctxUri = req.getRequestURI(); String baseUri = req.getRequestURL().toString() + "?" + req.getQueryString(); EndpointInfo endpointInfo = dest.getEndpointInfo(); - endpointInfo.setProperty(WSDLGetUtils.AUTO_REWRITE_ADDRESS, - ServerConfig.UNDEFINED_HOSTNAME.equals(serverConfig.getWebServiceHost())); + if (serverConfig.isModifySOAPAddress()) { + endpointInfo.setProperty(WSDLGetUtils.AUTO_REWRITE_ADDRESS_ALL, + ServerConfig.UNDEFINED_HOSTNAME.equals(serverConfig.getWebServiceHost())); + } for (QueryHandler queryHandler : bus.getExtension(QueryHandlerRegistry.class).getHandlers()) { {noformat}
Alessio Soldano <asoldano> updated the status of jira JBWS-3569 to Open
Alessio Soldano <asoldano> updated the status of jira JBWS-3569 to Resolved
I don't think we can do anything on our side - patch need to be provided and it is beyond JPP Dev team to provide proper EAP one. I'm reassigning to Honza as there is nothing more that Chris can help with. Honza let us know if you need any more assistance from us. I'm not sure who should be exactly in charge to arrange the patch.
Chris Laprun <chris.laprun> updated the status of jira GTNWSRP-340 to Closed
Chris Laprun <chris.laprun> made a comment on jira GTNWSRP-340 This is addressed at the JBoss WS level, see linked issue.
Hi Chris, I was just checking the same scenario which is already described here with JPP 6.0.0 ER05 (which also includes the patch JBPAPP-10497) and it seems like issue is still present. Again I have 2 producer nodes + loadbalancer + another jpp instance as consumer. I registered consumer against loadbanacer WSDL, added remote portlet and failover active producer node. Unfortunately portlet isn't displayed and it's not possible to refresh consumer. I'm getting: java.net.ConnectException: ConnectException invoking http://perf15.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/ServiceDescriptionService: Connection refused (perf15 was active producer node which was stopped). There is a change at loadbalancer, host:port/wsrp-producer/v2/MarkupService?wsdl - before it showed different node for each refresh - right now it points to active node only. But... the content is: <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:bind="urn:oasis:names:tc:wsrp:v2:bind" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:oasis:names:tc:wsrp:v2:wsdl"> <import location="http://perf13.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/MarkupService?wsdl=wsrp-2.0-bindings.wsdl" namespace="urn:oasis:names:tc:wsrp:v2:bind"></import> <service name="WSRPService"> <port binding="bind:WSRP_v2_ServiceDescription_Binding_SOAP" name="WSRPServiceDescriptionService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/ServiceDescriptionService"/> </port> <port binding="bind:WSRP_v2_PortletManagement_Binding_SOAP" name="WSRPPortletManagementService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/PortletManagementService"/> </port> <port binding="bind:WSRP_v2_Markup_Binding_SOAP" name="WSRPMarkupService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/MarkupService"/> </port> <port binding="bind:WSRP_v2_Registration_Binding_SOAP" name="WSRPRegistrationService"> <soap:address location="http://perf11.mw.lab.eng.bos.redhat.com:8080/wsrp-producer/v2/RegistrationService"/> </port> </service> </definitions> I expected perf13...(loadbalancer) will be used at all wsdl links (that's what patch was about), but it's not. This also means that current docs test at BZ doesn't reflect current portal behavior. Thanks for any updates!!!
It is possible to fix this issue by changing the configuration of JBoss WS in standalone.xml (and standalone-ha.xml, of course) by changing: <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> to <wsdl-host>jbossws.undefined.host</wsdl-host> as explained in https://docs.jboss.org/author/display/JBWS/Advanced+User+Guide#AdvancedUserGuide-Dynamicrewrite. There doesn't seem to be any need to use <modify-wsdl-address>true</modify-wsdl-address>, though. Alessio said that using jbossws.undefined.host probably forces the dynamic rewrite and that he needs to update the docs.
Alessio Soldano <asoldano> updated the status of jira JBWS-3569 to Closed
Is it safe to put as default, or does it work only with a loadbalancer ?
I think it's safe to use in non-clustered environment as well, yes. However, this should be confirmed by QA.
Hi, I just verified clustering scenario with <wsdl-host>jbossws.undefined.host</wsdl-host> on producer nodes and it worked perfect. Now it's possible to refresh consumer or directly display remote portlet after failover - these two main scenarios were expected! WSDL was properly rewritten and it included loadbalancer host instead of specific producer node! I also tried <wsdl-host>jbossws.undefined.host</wsdl-host> at standalone.xml for singlenode testing of wsrp and it worked as expeceted -> it seems to be safe to use above wsdl-host as default. This have to be done for CR01 build (who is gonna do it? Honza/Chris?).
Note that applying the change to wsdl-host only seems to work *when* the JBoss WS patch has been applied. It seems that using a non-patched JBoss WS version results in WSRP not working at all in clustered or single-node mode since the port URLs use jbossws.undefined.host instead of localhost in that case and are not being rewritten.
Needs WS patch + https://github.com/gatein-prod/gatein-portal/pull/7 Assigning to Honza, make the status to "POST" (Patch submitted, not included)
Verified with CR01.1 and works as expected