0
votes

Facing an issue with the integration of couchbase sync-gateway with couchbase-server from an android emulator

Environment Details

  1. Android Emulator running on Windows
  2. Couchbase Lite installed on Windows
  3. VirtualBox hosting couchbase server and sync-gateway Docker containers on Ubuntu

Setup

  1. sync-gateway and couchbase-server able to communicate with each other as per the logs from the Docker container
  2. Both Docker container are part of same network as mentioned in the documentation of Docker-hub couchbase
  3. Port Forwarding enabled from the Windows to integrate with Virtual box and able to access 8091/4984/4985
  4. Created a new database/bucket on couchbase-server : rssfeeder
  5. Sync-gateway log confirms the server up and running with rssfeeder details

Issue 1. Android Emulator starts the app having replication push/pull continues true 2. Emulator initiate the remote connection and with IP address

http://10.0.2.2:4984/rssfeeder

Error log on console:

404 Not found
  1. The database not able to access from the browser of host machine as well.

It would be really appreciated to get this going as I am working with couches/Docker/VM first time

1
Have you tried accessing the Sync Gateway admin web server? If you can't reach that from the host machine, it's an issue with Docker/Virtualbox config. - Hod
Yes you hit on the correct direction. When tried to reach the admin portal it is not as expected due to the Docker+Virtualbox and the host machine Windows. - Rizwan

1 Answers

0
votes

Double checking if you changed the default port that the Couchbase Sync Gateway listens to in your config file. If not, then note that the Sync Gateway listens on ports 4984(public) and 4985(admin). Your request says "4584". Also, I would recommend making a http query directly using curl (or any http client) from your device to the sync gateway. If that works, you know your configuration is fine.

curl -X GET 'http://user:pass@localhost:4984/rssfeeder/_all_docs'