Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-11773

amster throws missleading error '502 bad gateway'

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 14.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Tomcat 8.5
      Java 8
      OpenAM 14.0.0
    • Support Ticket IDs:

      Description

      Bug description

      _amster throws error '502 bad gateway' if a REST call could not be handled by the server within the read-timeout. This is misleading because it suggests some HTTP intermediary is in the play. _

      How to reproduce the issue

      see OPENAM-11770

      Expected behaviour
      503 error
      
      Current behaviour
      502 bad gateway error is raised
      
      excerpt from HTTP RFC
      6.6.3.  502 Bad Gateway
      
         The 502 (Bad Gateway) status code indicates that the server, while
         acting as a gateway or proxy, received an invalid response from an
         inbound server it accessed while attempting to fulfill the request.
      

      ---> The server does not act as a gateway or proxy in that case, so the error is not really appropriate.

      [main] DEBUG org.forgerock.openam.amster.loadster.importer.Importer - Exception occurred when reading file. 
      org.forgerock.openam.sdk.http.ServerErrorException: 502 Bad Gateway
       at org.forgerock.openam.sdk.http.DefaultErrorHandler.onServerError(DefaultErrorHandler.java:62)
       at org.forgerock.openam.sdk.http.HttpSessionImpl.handleUnsuccessfulResponse(HttpSessionImpl.java:273)
       at org.forgerock.openam.sdk.http.HttpSessionImpl.send(HttpSessionImpl.java:169)
       at org.forgerock.openam.sdk.http.RequestBuilder.put(RequestBuilder.java:226)
       at org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.updateInstance(CrestResourceProviderAsync.java:185)
       at org.forgerock.openam.sdk.crest.CrestResourceProviderAsync.update(CrestResourceProviderAsync.java:155)
       at org.forgerock.openam.sdk.crest.HttpCrestResourceProvider.update(HttpCrestResourceProvider.java:158)
       at org.forgerock.openam.sdk.operations.CrestOperations.update(CrestOperations.java:119)
       at org.forgerock.openam.amster.loadster.importer.GenericImporter.importEntity(GenericImporter.groovy:55)
       at org.forgerock.openam.amster.loadster.importer.GenericImporter.importFile(GenericImporter.groovy:33)
       at org.forgerock.openam.amster.loadster.importer.Importer.importFile(Importer.groovy:178)
       at org.forgerock.openam.amster.loadster.importer.Importer.access$0(Importer.groovy)
       at org.forgerock.openam.amster.loadster.importer.Importer$_importGlobalEntities_closure4.doCall(Importer.groovy:134)
      < skippe > 
      [main] DEBUG org.forgerock.openam.amster.loadster.importer.Importer - Importing file /work/openam5.0.0-amster-import-23913/exported-configuration-data/global/AmsterModule.json
      [main] DEBUG org.forgerock.openam.sdk.http.HttpSessionImpl - Sending request org.forgerock.sdk.org.forgerock.http.protocol.Request@237dfbbe
      [main] DEBUG org.forgerock.sdk.org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {}->http://openam.internal.example.com:8080][total kept alive: 0; route allocated: 0 of 64; total allocated: 0 of 64]
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 46][route: {}->http://openam.internal.example.com:8080][total kept alive: 0; route allocated: 1 of 64; total allocated: 1 of 64]
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://openam.internal.example.com:8080
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to openam.internal.example.com/172.28.1.229:8080
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connection established 172.28.1.229:50016<->172.28.1.229:8080
      [main] DEBUG org.forgerock.sdk.org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-46: set socket timeout to 10000
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bthalmayr Bernhard Thalmayr
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: