Details
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