我是 couchDB 的新手,作为起点,我下载了 GrocerySync-Android并尝试在设备(三星 Galaxy S4)上运行,但数据同步正在发生。
这是尝试过的,
1)我在数据桶(couchbase-server)中创建了“杂货同步”
2)我已经更改了同步 URL,如下所示
public static final String SYNC_URL = "http://127.0.0.1:4984/grocery-sync";
当我如上所示更改 URL 时,我得到以下异常。
RemoteRequest io exception. url: http://127.0.0.1:4984/grocery-sync/_local/022315cfb2e1f188613f04c99e49fbd537341d69
org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:4984 refused
然后我尝试将我的 URL 更改为:
http://127.0.0.1:5984/grocery-sync
我仍然得到相同的连接被拒绝异常。
然后我搜索了一些建议用于以下 IP 10.0.2.2的问题,因此 URL 变为:
http://10.0.2.2:4984/grocery-sync
如果我使用上面的 URL,我不会收到 Connection refused 异常,但会收到以下异常:
RemoteRequest: io exception. url: http://10.0.2.2:4984/grocery-sync/_local/840159ea2a7e8f5a483f502f5ae79f2ad9f64ddf
org.apache.http.conn.ConnectTimeoutException: Connect to .. timed out
我没有得到我所缺少的!
3)当我启动sync_gateway 后,我可以在控制台上看到,
**Reset guest user to config
Starting profile server on
Starting admin server on 127.0.0.1:4985
Starting server on localhost:4984..**
之后我不会看到任何日志。
请让我知道我错过了什么或做错了什么。非常感谢任何帮助或指导。