Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-54449

[BP 6.6.6, 7.0.5] CURL function fails with SSL peer certificate or SSH remote key was not OK

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Yes
    • Build Team 2022 Sprint 22

    Description

      On 7.0.5, curl function is not return proper error as before, for example:

      cbq> select curl('https://api.themoviedb.org/3/movie/550');
      {
          "requestID": "92a49ca0-f53c-41fe-96ca-205fc7818917",
          "signature": {
              "$1": "object"
          },
          "results": [
          ],
          "errors": [
              {
                  "code": 5010,
                  "msg": "Error evaluating projection. - cause: curl: SSL peer certificate or SSH remote key was not OK"
              }
          ],
          "status": "errors",
       

      or with prepared:

      cbq> execute curl_query;
      {
          "requestID": "a42059a6-1bd7-4832-86aa-0d3c46f91e0e",
          "signature": "{\"$1\":\"object\"}",
          "results": [
          ],
          "errors": [
              {
                  "code": 5010,
                  "msg": "Error evaluating projection. - cause: curl: SSL peer certificate or SSH remote key was not OK"
              }
          ],
          "status": "errors", 

      On 7.0.4, we return error information

       cbq> select curl('https://api.themoviedb.org/3/movie/550');{
          "requestID": "dd78a9eb-916c-481e-bbe6-810b8cbee909",
          "signature": {
              "$1": "object"
          },
          "results": [
          {
              "$1": {
                  "status_code": 7,
                  "status_message": "Invalid API key: You must be granted a valid key.",
                  "success": false
              }
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "139.383489ms",
              "executionTime": "139.206688ms",
              "resultCount": 1,
              "resultSize": 175,
              "serviceLoad": 6
          }
      }
      

      cbq> PREPARE curl_query FROM select curl('https://maps.googleapis.com/maps/api/geocode/json', {'get':True,'data': 'address=santa+cruz&components=country:ES&key=AIzaSyCT6niGCMsgegJkQSYSqpoLZ4_rSO59XQQ'}) ;
       
      cbq> execute curl_query;
      {
          "requestID": "2ee3075f-b31d-4929-baac-8ba64d0a4059",
          "signature": {
              "$1": "object"
          },
          "results": [
          {
              "$1": {
                  "error_message": "The provided API key is invalid. ",
                  "results": [],
                  "status": "REQUEST_DENIED"
              }
          }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "675.98606ms",
              "executionTime": "675.811935ms",
              "resultCount": 1,
              "resultSize": 165,
              "serviceLoad": 6
          }
      }
       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            pierre.regazzoni Pierre Regazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h
                4h

                PagerDuty