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

cbq error messages need error code and improved message

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • 4.0.0
    • 4.0.0
    • query
    • Security Level: Public
    • None
    • sherlock 1891

    Description

      After setting up a simple cluster (1 node data, 1 node index, 1 node query), i was following instructions to run first n1ql query.

      I made a mistake (probably very common) and attempted to run cbq from the index node against localhost, instead of from the query node with localhost.
      e.g. I ran this on index node:
      ./cbq -engine=http://localhost:8093

      cbq> CREATE PRIMARY INDEX ON `travel-sample`;
      ERROR : Post http://localhost:8093/query: dial tcp 127.0.0.1:8093: connection refused

      Two pieces of feedback:
      1) The error message should have an error code associated with it. I'm not sure what our overall product strategy for error codes is, but just making an example up, if we instead had:
      "ERROR : CB-1234 Post http://localhost:8093/query: dial tcp 127.0.0.1:8093"
      Then I could google "CB-1234" and find the relevant docs/stack overflow questions which would instantly tell me I'd made a rookie mistake and either run from wrong machine, or input wrong hostname to connect.

      2) The error message output to interactive terminal could be more helpful. "dial tcp" isn't very user friendly. "Connection Refused" is I guess OK. Perhaps this might be better:
      "Unable to connect to query service on http://localhost:8093/query"

      Cheers,
      Tom

      Attachments

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

        Activity

          People

            ajay.bhullar Ajay Bhullar
            tom.green Tom Green (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty