How to connect to Couchbase Server (AMI) on Amazon?

That is awesome, I really appreciate it. I will make the necessary changes and updated once I know its working.

Regarding iOS 9 I already have the App Transport Security open to all URL’s.

  • Changing to -interface=0.0.0.0:4984 allows connection to Sync Gateway… but :smile:

  • When I try to add records from iOS 9 app I receive error:
    22:16:29.160‖ WARNING: CBLSocketChangeTracker[0x7f922a3ac2e0 ]: Can’t connect, giving up: Error Domain=CBLHTTP Code=404 “404 not_found” UserInfo={NSURL=http://ec2-01-23-456-009.compute-1.amazonaws.com:4984/_changes?feed=normal&heartbeat=300000&style=all_docs, NSLocalizedFailureReason=not_found, NSLocalizedDescription=404 not_found}

Show I delete and recreate the Sync Gateway AMI image?
In my scenarios I have one AMI for Couchbase Server 4.0 and once server AMI for Sync Gateway. The Sync Gateway connects to the remote Couchbase Server.

Thank you for the help.

  1. That’s a redirect asking you to append a “/” to the URL.
  2. You didn’t put a database name in the replication URL.

Yea… :slight_smile: Its working… Thank you guys very much for the help.

A question on the sync_gateway commands. At this point I am using the -dbname for the app I am using. Let’s say I would like to use multiple databases to sync with Couchbase Server. Do I pass multiple DB’s names for the sync_gateway or should the -dbname default to sync_gateway?

/opt/couchbase-sync-gateway/bin/sync_gateway -url=http://ec0-00-00-000-123.compute-1.amazonaws.com:8091/ -interface=0.0.0.0:4984 -bucket=sync_gateway -dbname=relist

You can use a configuration file to specify multiple databases as specified in the documentation

Great. I will create a config.json and upload it to sync gateway server.

Hey @marco,

Also adding in these two blogs for reference on how to get started with Couchbase AMI and setting up Sync Gateway with a Mobile application for yourself and for anyone reading up on this topic thread in the future.

Part 1 : Database on Amazon: Installing Couchbase AMI on AWS
Part 2 : Database on Amazon: Connecting Couchbase Sync Gateway to Couchbase AMI on AWS

@sweetiewill Thanks for adding the detailed info on the blog.

ps: I am also setting up the new Azure Virtual Machine (not Classic but the new suggested Resource Manager VM ) Couchbase Server and Sync Gatway on the same Virtual Machine.

Just a suggestion for a similar blog for the new Azure VM Resource Manager Couchbase Sync Gateway setup :smile:
ps: There is an older blog on Azure but uses the Classic VM.

Thanks.

Cool! Let us know how that goes @marco and thanks for the suggestions :grinning: Will investigate and keep you posted!

I have the Azure VM (Resource Manager) setup with Couchbase Server 4.0 and Sync Gateway 1.1 running.

So far its working great. Love it. Everyone that is involved with Couchbase has done an incredible job. I am starting to use it for our Mobile and Web apps. The offline sync and attaching blobs are key features in our decision.