Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-5623

GET request on cluster resource gives psql exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      While installation following GET call failed with psql exception,

      http://162.216.148.124:8080/api/v1/clusters/c1/requests/?fields=tasks/Tasks/command,tasks/Tasks/exit_code,tasks/Tasks/start_time,tasks/Tasks/end_time,tasks/Tasks/host_name,tasks/Tasks/id,tasks/Tasks/role,tasks/Tasks/status&minimal_response=true&_=139751585355
      

      Later It was discovered GET call on following API also fails with same exception

      http://162.216.148.124:8080/api/v1/clusters/c1
      

      Exception:

      {
      status: 500,
      message: " Internal Exception: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")" Position: 183 Error Code: 0 Call: SELECT request_id, cluster_id, command_name, create_time, end_time, inputs, request_context, request_schedule_id, request_type, start_time, status FROM request WHERE (request_id IN ()) Query: ReadAllQuery(referenceClass=RequestEntity sql="SELECT request_id, cluster_id, command_name, create_time, end_time, inputs, request_context, request_schedule_id, request_type, start_time, status FROM request WHERE (request_id IN ?)")"
      }
      

      IOW, if there are no requests in the requests table and you try to do a GET at cluster/

      {clusterName}

      or /requests the call encounters this error.

      Attachments

        Issue Links

          Activity

            People

              ncole@hortonworks.com Nate Cole
              ncole@hortonworks.com Nate Cole
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: