I installed the Couchbase Server 4.0 AMIs on Amazon Web Services and it looks like its running ok.
I created a Swift iOS 9 iPhone app (I have attached my Couchbase swift code) and I created the database, create a document, save it. I also have the Replication Running for push and pull.
All records are saved fine on the local database but none of them are synced to the Couchbase Server on Amazon.
Any help is greatly appreciated, am I using the wrong server url? Not getting any errors. How do you check if the Sync gateway is running on Amazon, I did not see it on the control panel.
Port 8092 is for Couchbase Server view queries; that’s not Sync Gateway.
Make sure that the AMI you installed explicitly says that it includes and runs Sync gateway. I know very little about this area, but I thought that SG still wasn’t part of the default image.
So far I have not found any information on how to install the Couchbase Sync Gateway on the current Couchbase Server 4.0 hosted on Amazon. Do I need to setup a new Server for the Sync Gateway or?
I logged into the Amazon AMI Couchbase Sync Gateway via ssh and type in the commands at that page but the file is not found. I am wondering if the AMI has something different…
At the terminal I type sync_gateway or ./sync_gateway but error says “No such file or directory”
In that case sync_gateway should be installed in one of the normal Linux places, like /usr/bin or /usr/local/bin. One more mysterious thing that can cause this error message is if you are trying to run on a 32-bit system (The command uname -m will tell you, a 64-bit OS will output x86_64)
I used the Amazon AMI Couchbase Sync Gateway image and I think it has issues I am going to delete this server and try to re-create. If that does not work I think I will create a VM and install it manually.
Finally found where the sync_gateway is on the AMI… /opt/couchbase-sync-gateway/bin/sync_gateway
Sync Gateway is now running with below command line, but when my iOS app tries to connect to Sync Gateway Server to start Replication the connection is refused…lol I checked the Ports and they are open on the firewall.
If your app is running on iOS 9, the problem is probably on the client side — iOS 9 won’t allow an app to make an insecure (http:) connection by default. In the long run you should use SSL; in the short term you can add a key to the Info.plist to bypass the error. (Look up App Transport Security; Apple has a technote with the details.)
What is the exact output of the curl command that fails?
I went through the whole process of getting it working, which was a pretty bumpy ride … (we need to do some serious improvements here!). I wrote up a README here:
I think the main change you need to make is to use -interface=0.0.0.0:4984 rather than -interface=:4984. In my testing, using -interface=:4984 only listened on localhost.