0 Replies Latest reply on Nov 4, 2009 4:54 AM by abhi kenexa

    How to configure flex app in HTTPS load balanced environment where app servers serve http requests

    abhi kenexa Level 1

      Hi,


      I have developed the dashboard in my application using flex 3.0. For this I have used JSP wrapper around the flex application. My application runs on JBoss application server. For communication between flex app and my application I am using LCDS. HTTPService component is being used to receive data from the server. Channel definitions are given in service-config.xml for secure amf and secure http channels. In my proxy-config.xml I have defined Channels and destinations.

      In my development environment both secure and non secure mode were working fine.


      Now in my test environment I have deployed it behind the hardware load balancer(which accepts secure requests only and if the request is not secure it redirects it to secure url).

       

      So the load balancer only accepts HTTPS URLS and after that the request is converted into HTTP and sent to web/app servers

       

      I am getting following exception

       

      06:06:13,521 INFO  [STDOUT] [LCDS][ERROR] Exception when invoking service 'proxy-service': flex.messaging.services.http
      .proxy.ProxyException: Error sending request. sun.security.validator.ValidatorException: PKIX path building failed: sun
      .security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        incomingMessage: Flex Message (flex.messaging.messages.HTTPMessage)
          method = GET
          url = http://10.4.10.224:80/kr/servlet/DashboardServlet
          headers = {DSEndpoint=my-secure-http, DSId=A96D29E3-9B09-8156-DE28-257F324A283F}
          clientId = A96D2A56-5A0D-4442-1E1B-4F62ACA8F33B
          destination = dashboardService
          messageId = 3E568EBD-2239-9A43-8D2D-B9B934E8F10B
          timestamp = 1257246373114
          timeToLive = 0
          body = {source=default}
          hdr(DSEndpoint) = my-secure-http
          hdr(DSId) = A96D29E3-9B09-8156-DE28-257F324A283F
        Exception: flex.messaging.services.http.proxy.ProxyException: Error sending request. sun.security.validator.Validator
      Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
              at flex.messaging.services.http.proxy.RequestFilter.sendRequest(RequestFilter.java:493)
              at flex.messaging.services.http.proxy.RequestFilter.invoke(RequestFilter.java:84)
              at flex.messaging.services.http.proxy.SecurityFilter.invoke(SecurityFilter.java:63)
              at flex.messaging.services.http.proxy.ResponseFilter.invoke(ResponseFilter.java:68)
              at flex.messaging.services.http.proxy.ProxyContextFilter.invoke(ProxyContextFilter.java:58)
              at flex.messaging.services.http.proxy.AccessFilter.invoke(AccessFilter.java:59)
              at flex.messaging.services.http.proxy.ErrorFilter.invoke(ErrorFilter.java:44)
              at flex.messaging.services.http.HTTPProxyAdapter.invoke(HTTPProxyAdapter.java:543)
              at flex.messaging.services.HTTPProxyService.invokeHttp(HTTPProxyService.java:353)
              at flex.messaging.services.HTTPProxyService.serviceMessage(HTTPProxyService.java:181)
              at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
              at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
              at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
              at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
              at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
              at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
              at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
              at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322)