Connecting local query preview to cloud cluster

noob question:

i have couchbase running on ec2 (ubuntu) and i downloaded the nickel developer preview onto my local mac. when i try this:

./cbq-engine -datastore=http://ec2----*.us-west-2.compute.amazonaws.com:8091

i get this:

_time=“2015-04-14T10:09:54-07:00” _level=“INFO” _msg=“New site created with url http://ec2----.us-west-2.compute.amazonaws.com:8091"
_time=“2015-04-14T10:09:54-07:00” _level=“INFO” _msg=“cbq-engine started” version=“cbq-dp4” datastore="http://ec2-
---**.us-west-2.compute.amazonaws.com:8091”
_time=“2015-04-14T10:10:54-07:00” _level=“INFO” _msg=“Refreshing pool default”

the logs tell me that a new site is created on port 8091.

im trying to query the cloud server from my mac.

what am i doing wrong?

thanks

It sounds like you are successfully connected.

Now you can run cbq on your mac, and then issue queries.

@geraldss Thanks for the quick reply.

I’m trying to run this query from the tutorial web addresses:

SELECT * FROM beer-sample

and get this reply:

500: Internal Server Error

{
“requestID”: “7a3d6447-0500-4087-80da-64696f29d33d”,
“errors”: [
{
“code”: 5000,
“msg”: “syntax error”
}
],
“status”: “fatal”,
“metrics”: {
“elapsedTime”: “266.804us”,
“executionTime”: “239.065us”,
“resultCount”: 0,
“resultSize”: 0,
“errorCount”: 1
}
}

beer-sample needs to be escaped with back ticks:

SELECT * FROM `beer-sample`;

@geraldss that helped. now, i need to create an index for bucket.

./cbq -engine=http://http://ec2----*.us-west-2.compute.amazonaws.com:8093
cbq> CREATE PRIMARY INDEX ON beer-sample

;
2015/04/15 10:33:48 ERROR: Post http://http://ec2----*.us-west-2.compute.amazonaws.com:8093/query: dial tcp: unknown port tcp/ – main.HandleInteractiveMode() at interactive.go:77

Any suggestions?

You have http:// twice in your URL.

Gosh I’m loosing it.

Thanks for all your help!

Here’s my next problem:

cbq> CREATE PRIMARY INDEX ON beer-sample;
2015/04/15 11:26:37 ERROR: Post http://ec2----.us-west-2.compute.amazonaws.com:8093/query: dial tcp ...**:8093: operation timed out – main.HandleInteractiveMode() at interactive.go:77

p.s. I used back ticks also…

@geraldss. I just opened port 8093. It did’t fix the error though.

Also - since its a developer preview, where can I go to report errors?

http://docs.couchbase.com/admin/admin/Install/install-networkPorts.html – needs to be changed to include 8093.

What is the current error?

This forum is fine for reporting issues during the Developer Preview.

Thanks,
Gerald

Here it is:

cbq> CREATE PRIMARY INDEX ON beer-sample;
2015/04/15 11:26:37 ERROR: Post http://ec2----.us-west-2.compute.amazonaws.com:8093/query: dial tcp …...**:8093:operation timed out – main.HandleInteractiveMode() at interactive.go:77

There may be an aws-specific timeout.

Can you run

SELECT 1;

from your cbq?

Can you also try running cbq within aws?

@geraldss – yea, it worked when running from inside the aws cluster.

Any idea, when support for password protected buckets is coming? I read mid-april on the forums somewhere - so, anytime now :slight_smile: :slight_smile:

Next week! We are quite excited to have you all try out Couchbase Server 4.0!!

Hah - awesome.

Thanks again for your help on this problem. I’ll definitely try out 4.0 and let you know if I have that connection problem from outside AWS!