Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-10466

Improve error message while deploying applications

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1
    • Component/s: App Fabric, Pipelines
    • Labels:
      None
    • Rank:
      1|hzz5qv:

      Description

      While deploying hydrator applications if the Content type is not specified, the error that is returned from the API says "X-Archive-Name header not present". In-order to fix this the users have to send content-type and not archive name. Please see the same requests below

      Request to create application without content-type

      curl -v -X PUT http://localhost:10000/v3/namespaces/default/apps/StreamToHbase -d @./templates/apps/predefined/StreamToHBase.json
      * Hostname was NOT found in DNS cache
      *   Trying ::1...
      * Connected to localhost (::1) port 10000 (#0)
      > PUT /v3/namespaces/default/apps/StreamToHbase HTTP/1.1
      > User-Agent: curl/7.37.1
      > Host: localhost:10000
      > Accept: */*
      > Content-Length: 1972
      > Content-Type: application/x-www-form-urlencoded
      > Expect: 100-continue
      > 
      < HTTP/1.1 400 Bad Request
      < Content-Type: text/plain; charset=utf-8
      < Content-Length: 33
      < Connection: close
      < 
      * Closing connection 0
      X-Archive-Name header not present
      

      Passing in content-type in the header fixes the issue

      curl -v -X PUT -H 'Content-Type: application/json' http://localhost:10000/v3/namespaces/default/apps/StreamToHbase -d @./templates/apps/predefined/StreamToHBase.json
      * Hostname was NOT found in DNS cache
      *   Trying ::1...
      * Connected to localhost (::1) port 10000 (#0)
      > PUT /v3/namespaces/default/apps/StreamToHbase HTTP/1.1
      > User-Agent: curl/7.37.1
      > Host: localhost:10000
      > Accept: */*
      > Content-Type: application/json
      > Content-Length: 1972
      > Expect: 100-continue
      > 
      * Done waiting for 100-continue
      < HTTP/1.1 200 OK
      < Content-Type: text/plain; charset=utf-8
      < Content-Length: 15
      < Connection: keep-alive
      < 
      * Connection #0 to host localhost left intact
      Deploy Complete
      

        Attachments

          Activity

            People

            • Assignee:
              ashau Albert Shau
              Reporter:
              sree Sreevatsan Raman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: