adsense728x90


Couchbase GrocerySync sync gateway 문제해결 Web backend

couchbase GrocerySync로 sync gateway를 써 보기



As long as you don't lock down access control with your sync function though, you can still see stuff like so:


It seems like there are no docs in there currently though! Here is what it should look like when you've got docs properly syncing:



{"committed_update_seq":2,"compact_running":false,"db_name":"sync_gateway","disk_format_version":0,"instance_start_time":1397923461690940,"purge_seq":0,"update_seq":2}


{"total_rows":5,"rows":[

{"id":"_sync:rev:e706e6b5-9474-4619-823d-4480d7d57fae:38:1-3bcd61f6-f0ab-4789-ae44-62cf767e3840","key":"_sync:rev:e706e6b5-9474-4619-823d-4480d7d57fae:38:1-3bcd61f6-f0ab-4789-ae44-62cf767e3840","value":{"rev":"1-00000983da3783390000000000000000"},"doc":{"meta":{"id":"_sync:rev:e706e6b5-9474-4619-823d-4480d7d57fae:38:1-3bcd61f6-f0ab-4789-ae44-62cf767e3840","rev":"1-00000983da3783390000000000000000","expiration":0,"flags":0},"json":{"check":false,"created_at":"2014-04-19T12:09:13.265Z","text":"a"}}},

{"id":"_sync:seq","key":"_sync:seq","value":{"rev":"5-00000983da2c95180000000000000000"},"doc":{"meta":{"id":"_sync:seq","rev":"5-00000983da2c95180000000000000000","expiration":0,"flags":0},"json":2}},

{"id":"_sync:syncdata","key":"_sync:syncdata","value":{"rev":"1-00000925116799380000000000000000"},"doc":{"meta":{"id":"_sync:syncdata","rev":"1-00000925116799380000000000000000","expiration":0,"flags":0},"json":{"Sync":"function(doc) {channel(\"gro\");}"}}},

{"id":"_sync:user:","key":"_sync:user:","value":{"rev":"2-0000094a4036db760000000000000000"},"doc":{"meta":{"id":"_sync:user:","rev":"2-0000094a4036db760000000000000000","expiration":0,"flags":0},"json":{"admin_channels":{"public":1},"all_channels":{"public":1},"rolesSince":{}}}},

{"id":"e706e6b5-9474-4619-823d-4480d7d57fae","key":"e706e6b5-9474-4619-823d-4480d7d57fae","value":{"rev":"2-00000983da3ae9ce0000000000000000"},"doc":{"meta":{"id":"e706e6b5-9474-4619-823d-4480d7d57fae","rev":"2-00000983da3ae9ce0000000000000000","expiration":0,"flags":0},"json":{"_sync":{"rev":"2-4acd6e4f-7076-4935-93d6-f85929035fdc","sequence":2,"history":{"revs":["1-3bcd61f6-f0ab-4789-ae44-62cf767e3840","2-4acd6e4f-7076-4935-93d6-f85929035fdc"],"parents":[-1,0],"bodies":["",""],"channels":[["gro"],["gro"]]},"channels":{"gro":null},"time_saved":"2014-04-20T01:11:08.782466737+09:00"},"check":true,"created_at":"2014-04-19T12:09:13.265Z","text":"a"}}}

]

}


문제 없는 것 같은뎅.. T_T

data랑 sync metadata랑 같이 있는 게 문제인가?


이런 로그가 막 찍혀야 정상인뎅.

4-19 11:56:10.829    2670-2683/com.couchbase.grocerysync V/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync] inserting 20122612-D425-49C0-8985-77475F170D77 [3-941042b61973ae84bd86a80b09eb5f57, 2-ba46c5754ce2c721e5a8bd76501948cc, 1-806c5f8d2459d7fe37efaba1dccb6798]
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Begin transaction (level 2)
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Committing transaction (level 2)
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync V/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync] inserting 6DF61B51-7B84-4BAA-8F1E-88826C5619E9 [13-f5b507a77c15bc3ba6e6c6c5f81dbc16, 12-1705dabcfd1e25d49468aa7654f57e02, 11-6adce373d755818767d7e1c1d3c88654, 10-f79de080d2d7a4154181f45dbb7336af, 9-4ed618923b2c905cb9beb944196b8419, 8-5f352a952dbe7f41dc1c8067f9a494b8, 7-b7961c67c4bf5b3c46df02516e59770e, 6-7c4b1499a607b61a9d54b1e6aa603638, 5-86642e5a5da06c00b38f36d41e26301d, 4-6b5932c17a214772987a72f4bf735340, 3-c5ab9324aef374ba3b09ae258cfac10f, 2-ff7ec66b36924a403942504085ad3e7d, 1-6c27e70e2eecac3dc74908eb4015525a]
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Begin transaction (level 2)
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Committing transaction (level 2)
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync V/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync] inserting D4614764-C615-4F2C-A0DD-DE7C919DF0F2 [9-620e010857e524b9891e3b2d1b96d8dc, 8-e98e58c30d733db5d65f346d64bb8e43, 7-4521baa7ae7c60e27554a58b75392c4a, 6-06379459f47178ead8f98671d3111078, 5-0b323787e266e531bf7b6a2bc82ee26a, 4-b61af00105d3a5e77eee4d5c337168bb, 3-bafe964c3f6f2f2eb452a1dbfad4b8e8, 2-faf6b618565821350442f1ee7021be95, 1-1c727dccf58f956e1efd64e4648b2967]
04-19 11:56:10.829    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Begin transaction (level 2)
04-19 11:56:10.879    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Committing transaction (level 2)
04-19 11:56:10.879    2670-2683/com.couchbase.grocerysync V/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync] inserting 285FB5AB-A3C7-4021-AC2D-D701BDDE61CA [9-42592687981a19b99d7a0a8616d83329, 8-aca31ac2540315f357b6065c8596703b, 7-bd5bb9abf8d6d8c69d4f67d045efd5c1, 6-e21fa11665b78e1fba7f4fe009ba0663, 5-892530950b7ff3bb5ea3b002516d4099, 4-3fba89332adcbfd1012a19f8d1e69173, 3-99a4dd79126a865a45b470ff261203e8, 2-5d0e0191426cfb52ec5e34bccb7bad03, 1-f3f965c8d34a6eaa4dcfc744a46d00a5]
04-19 11:56:10.879    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Begin transaction (level 2)
04-19 11:56:10.879    2670-2683/com.couchbase.grocerysync I/CBLSQL﹕ pool-1-thread-1 Committing transaction (level 2)
...
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]: pullRemoteRevisions() with revsToPull size: 228
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]: add {5CC3EC38-3F6D-4639-A887-71E508EB325D #3-3d93d04a66a5cab1092ec72a71abc36bDEL} to workToStartNow
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]|Thread[pool-1-thread-1,5,main]: pullRemoteRevision with rev: {5CC3EC38-3F6D-4639-A887-71E508EB325D #3-3d93d04a66a5cab1092ec72a71abc36bDEL}
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]|Thread[pool-1-thread-1,5,main]: pullRemoteRevision() calling asyncTaskStarted()
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]|Thread[pool-1-thread-1,5,main]: asyncTaskStarted() called, asyncTaskCount: 25
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ asyncTaskStarted() updated asyncTaskCount to 26
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ Puller@b150dc80[http://sync.couchbasecloud.com/grocery-sync]|Thread[pool-1-thread-1,5,main]: asyncTaskStarted() called, asyncTaskCount: 26
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ asyncTaskStarted() updated asyncTaskCount to 27
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.replicator.Puller$3@b12c38e0: pullRemoteRevision add rev: {29DB31D8-F785-438B-B2A7-97DDDD688F1D #5-743c8a29afafd19522fc955bf46295d3DEL} to batcher
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: queueObjects called with 1 objects: [{29DB31D8-F785-438B-B2A7-97DDDD688F1D #5-743c8a29afafd19522fc955bf46295d3DEL}]
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: inbox size before adding objects: 10
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: 1 objects added to inbox.  inbox size: 11
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: inbox.size() < capacity, schedule processing
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: delta 98 < delay 1000 --> using delay 1000
04-19 11:56:11.469    2670-2683/com.couchbase.grocerysync D/Database﹕ scheduleWithDelay called with delay: 1000 ms

...

04-19 11:56:22.309    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: queueObjects called with 1 objects: [{911c0e80-0a82-4045-80c2-c4e233d3577e #7-431c14d148acff844d4ea3bb5a46266eDEL}]
04-19 11:56:22.309    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: inbox size before adding objects: 25
04-19 11:56:22.309    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: 1 objects added to inbox.  inbox size: 26
04-19 11:56:22.309    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: inbox.size() < capacity, schedule processing
04-19 11:56:22.309    2670-2683/com.couchbase.grocerysync D/Database﹕ com.couchbase.lite.support.Batcher@b1560f70: delta 593 < delay 1000 --> using delay 1000




Getting Help

If you’re having trouble, feel free to ask for help on the mailing list. If you’re pretty sure you’ve found a bug, please file a bug report.


문제가 생기면 mailing list google groups에 문의하기



groups 글 보고 고쳤다.


the problem is that GrocerySync application is not very "channel aware", and does not put the document into the "public" channel (or any other channel for that matter).

Can you delete your current GUEST user and either use the config I posted earlier, or run:

curl -X PUT localhost:4985/grocery-sync/_user/GUEST --data '{"disabled": false, "all_channels": ["*"], "admin_channels": ["*"]} '



이제서야 ios, android 통신이 되네 ㅎㅎ
내 서버를 통해서.

couchbase lite contributer는 hiring하나보다.






덧글

댓글 입력 영역