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

Eventing: Curl requests are failing with "Couldn't connect to server" error

    XMLWordPrintable

Details

    Description

      QE TEST

      ./testrunner -i /tmp/testexec.1345.ini -p get-cbcollect-info=True -t eventing.eventing_curl.EventingCurl.test_bearer_auth,nodes_init=4,services_init=kv-eventing-index-n1ql,dataset=default,reset_services=True,skip_cleanup=True,auth_type=bearer,host=local,curl=True,bearer_key=couchbase
      

      OBSERVATION
      Curl requests are failing with unable to perform the request: Couldn't connect to server error.

      {
       "Function_604777109_test_bearer_auth": {
        "script": "<ud>'use strict';\nfunction OnUpdate(doc, meta) {\n    var request = {\n\tpath : 'bearer-auth'\n    };\n    try {\n    \tvar response = curl(\"GET\", server, request);\n    \tlog('response body received from server:', response.body);\n    \tlog('response headers received from server:', response.headers);\n    \tlog('response status received from server:', response.status);\n    \tvar res= new Uint8Array(response.body);\n    \tif(response.status == 200){\n    \t    dst_bucket[meta.id]=response.body;\n    \t}\n    }\n    catch (e) {\n    \tlog('error:', e);\n        }\n}\n\n\n\nfunction OnDelete(meta) {\n    var request = {\n\tpath : 'bearer-auth',\n\theaders: {\n    \"sample-header\": \"test\"\n    }\n    };\n    try {\n    \tvar response = curl(\"GET\", server, request);\n    \tlog('response body received from server:', response.body);\n    \tlog('response headers received from server:', response.headers);\n    \tlog('response status received from server:', response.status);\n    \tvar res= new Uint8Array(response.body);\n    \tif(response.status == 200){\n    \t    delete dst_bucket[meta.id];\n    \t}\n    }\n    catch (e) {\n    \tlog('error:', e);\n        }\n}\n\n</ud>",
        "lines": {
         "16": {
          "call_count": 0,
          "call_time": 0,
          "error_count": 0,
          "error_msg": "",
          "last_log": "<ud>\"error:\" {\"message\":\"Unable to perform the request: Couldn't connect to server\",\"stack\":\"Error\\n    at OnUpdate (Function_604777109_test_bearer_auth.js:7:21)\"} </ud>"
         },
         "7": {
          "call_count": 0,
          "call_time": 0,
          "error_count": 0,
          "error_msg": "",
          "last_log": "<ud>\"response body received from server:\" null </ud>"
         },
         "8": {
          "call_count": 0,
          "call_time": 0,
          "error_count": 0,
          "error_msg": "",
          "last_log": "<ud>\"response headers received from server:\" {\"connection\":\" keep-alive\\r\\n\",\"content-length\":\" 0\\r\\n\"} </ud>"
         },
         "9": {
          "call_count": 0,
          "call_time": 0,
          "error_count": 0,
          "error_msg": "",
          "last_log": "<ud>\"response status received from server:\" 404 </ud>"
         }
        }
       }
      }
      

      STATS

      [
          {
              "dcp_feed_boundary": "everything",
              "event_processing_stats": {
                  "adhoc_timer_response_received": 93,
                  "agg_messages_sent_to_worker": 12439,
                  "agg_queue_memory": 242229,
                  "agg_queue_memory_cap": 106954752,
                  "agg_queue_size": 281,
                  "agg_queue_size_cap": 300000,
                  "agg_timer_feedback_queue_cap": 1500,
                  "dcp_mutation": 2016,
                  "dcp_mutation_sent_to_worker": 2016,
                  "dcp_snapshot": 877,
                  "dcp_stream_req_counter": 1024,
                  "dcp_streamreq": 1024,
                  "execution_stats": 1875,
                  "failure_stats": 1875,
                  "latency_stats": 1875,
                  "lcb_exception_stats": 1875,
                  "log_level": 3,
                  "num_processed_events": 1732,
                  "processed_events_size": 1253132,
                  "thr_count": 3,
                  "thr_map": 3,
                  "v8_init": 3,
                  "v8_load": 3
              },
              "events_remaining": {
                  "dcp_backlog": 0
              },
              "execution_stats": {
                  "agg_queue_memory": 242229,
                  "agg_queue_size": 281,
                  "curl": {
                      "delete": 0,
                      "get": 1735,
                      "head": 0,
                      "post": 0,
                      "put": 0
                  },
                  "curl_success_count": 1732,
                  "dcp_delete_msg_counter": 0,
                  "dcp_delete_parse_failure": 0,
                  "dcp_mutation_msg_counter": 1735,
                  "dcp_mutation_parse_failure": 0,
                  "enqueued_dcp_delete_msg_counter": 0,
                  "enqueued_dcp_mutation_msg_counter": 2016,
                  "enqueued_timer_msg_counter": 0,
                  "feedback_queue_size": 0,
                  "filtered_dcp_delete_counter": 0,
                  "filtered_dcp_mutation_counter": 0,
                  "lcb_retry_failure": 0,
                  "messages_parsed": 12427,
                  "no_op_counter": 0,
                  "num_processed_events": 1732,
                  "on_delete_failure": 0,
                  "on_delete_success": 0,
                  "on_update_failure": 0,
                  "on_update_success": 1732,
                  "processed_events_size": 1253132,
                  "timer_callback_failure": 0,
                  "timer_callback_success": 0,
                  "timer_cancel_counter": 0,
                  "timer_create_counter": 0,
                  "timer_create_failure": 0,
                  "timer_msg_counter": 0,
                  "timer_responses_sent": 0,
                  "timestamp": {
                      "56273": "2022-01-04T07:23:53Z",
                      "56274": "2022-01-04T07:23:53Z",
                      "56293": "2022-01-04T07:23:53Z"
                  },
                  "uv_msg_parse_failure": 0,
                  "uv_try_write_failure_counter": 0
              },
              "failure_stats": {
                  "app_worker_setting_events_lost": 0,
                  "bkt_ops_cas_mismatch_count": 0,
                  "bucket_cache_overflow_count": 0,
                  "bucket_op_cache_miss_count": 0,
                  "bucket_op_exception_count": 0,
                  "checkpoint_failure_count": 0,
                  "curl_failure_count": 0,
                  "curl_max_resp_size_exceeded": 0,
                  "curl_non_200_response": 1732,
                  "curl_timeout_count": 0,
                  "dcp_events_lost": 0,
                  "debugger_events_lost": 0,
                  "delete_events_lost": 0,
                  "mutation_events_lost": 0,
                  "n1ql_op_exception_count": 0,
                  "timeout_count": 0,
                  "timer_callback_missing_counter": 0,
                  "timer_context_size_exceeded_counter": 0,
                  "timer_events_lost": 0,
                  "timestamp": {
                      "56273": "2022-01-04T07:23:53Z",
                      "56274": "2022-01-04T07:23:53Z",
                      "56293": "2022-01-04T07:23:53Z"
                  },
                  "v8worker_events_lost": 0
              },
              "function_id": 1672050187,
              "function_name": "Function_604777109_test_bearer_auth",
              "gocb_creds_request_counter": 1,
              "internal_vb_distribution_stats": {
                  "worker_Function_604777109_test_bearer_auth_0": "[0-341]",
                  "worker_Function_604777109_test_bearer_auth_1": "[342-682]",
                  "worker_Function_604777109_test_bearer_auth_2": "[683-1023]"
              },
              "latency_percentile_stats": {
                  "100": 4352000,
                  "50": 1276700,
                  "80": 2076300,
                  "90": 2341400,
                  "95": 3012100,
                  "99": 3857900
              },
              "lcb_creds_request_counter": 3,
              "lcb_exception_stats": {},
              "metastore_stats": {},
              "planner_stats": [
                  {
                      "host_name": "172.23.107.247:8096",
                      "start_vb": 0,
                      "vb_count": 1024
                  }
              ],
              "vb_distribution_stats_from_metadata": {
                  "172.23.107.247:8096": {
                      "worker_Function_604777109_test_bearer_auth_0": "[0-341]",
                      "worker_Function_604777109_test_bearer_auth_1": "[342-682]",
                      "worker_Function_604777109_test_bearer_auth_2": "[683-1023]"
                  }
              },
              "worker_pids": {
                  "worker_Function_604777109_test_bearer_auth_0": 56273,
                  "worker_Function_604777109_test_bearer_auth_1": 56274,
                  "worker_Function_604777109_test_bearer_auth_2": 56293
              }
          }
      ]
      

      Issue is affecting multiple curl tests and most likely a regression due to https://review.couchbase.org/c/eventing/+/166999.

      Attachments

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

        Activity

          People

            sujay.gad Sujay Gad
            sujay.gad Sujay Gad
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty