Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-2325

REST _replicate throws errro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.8.5
    • LiteCore
    • Security Level: Public
    • None
    • Jainmin 55
    • 2

    Description

      Korrigan Clark encountered errors as doing replicator/continuous with REST API.

      He built cblite tool with commit f1f28c2bad1d42e530d1e909cd75a0b0b2562216 (HEAD -> release/lithiumorigin/release/lithium).
      i start couchbase mobile lite tool cblite with: /tmp/couchbase-mobile-tools/cblite/build_cmake/cblite --create serve --port 4985 /tmp/couchbase-mobile-tools/db.cblite2
      10:36
      then i push a document in with: curl -X POST -H "Content-Type: application/json" -d '{"_id":"user1011632231655643464","channels":["channel-0"],"field1":"ok"}' http://172.23.97.250:4985/db/
      10:37
      then i try to start continuous push replication with: curl -X POST -H "Content-Type: application/json" -d '

      {"source": "db", "target": "[ws://172.23.100.204:4984/db]", "continuous": "true", "user": "guest", "password": "guest"}

      http://172.23.97.250:4985/_replicate
      10:37
      this last step gives this error log in cblite tool output
      10:38
      00:34:53.119419| [Listener]: POST /_replicate
      00:34:53.119511| [Listener]: Matched rule /_replicate for path /_replicate
      00:34:53.119654| [Listener]: Replicator task #7 starting: local=db, mode=push, scheme=ws, host=172.23.100.204, port=4984, db=db, bidi=0, continuous=1
      00:34:53.119945| [DB]: {DB#26}==> litecore::SQLiteDataFile /tmp/couchbase-mobile-tools/db.cblite2/db.sqlite3 @0x7f7e14001cd0
      00:34:53.120019| [DB]: {DB#26} Opening database
      00:34:53.121321| [DB]: {CollectionImpl#27}==> litecore::CollectionImpl db/_default @0x7f7e1401b330
      00:34:53.121408| [DB]: {CollectionImpl#27} Instantiated
      00:34:53.121944| [Sync]: {Repl#28}==> litecore::repl::Replicator /tmp/couchbase-mobile-tools/db.cblite2/ ->[ws://172.23.100.204:4984/db/_blipsync] @0x7f7e14039e90
      00:34:53.122022| [Sync]: {Repl#28} Push=continuous, Options={{auth:

      {password:"********", type:"Basic", username:"guest"}

      }}
      00:34:53.122297| [Sync]: {C4Replicator#29}==> litecore::C4RemoteReplicator 0x7f7e14001190 @0x7f7e14001190
      00:34:53.122362| [Sync]: {C4Replicator#29} Starting Replicator {Repl#28}
      00:34:53.122448| Response status: 200
      00:34:53.122535| Content-Length: 26
      00:34:53.122621| Now sending body...
      00:34:53.122952| [Sync]: {Repl#28} No local checkpoint 'cp-MUIuaV3ofM80VODsDcPT+/cavlk='
      00:34:53.127362| [Sync]: {Repl#28} Connected!
      00:34:53.127505| [Sync]: {Repl#28} now busy
      00:34:53.127578| [Sync]: {C4Replicator#29} State: busy, progress=0.00%
      00:34:53.127642| [Sync]: {Pusher#30}==> litecore::repl::Pusher {Repl#28} @0x7f7e1409e210
      00:34:53.127746| [Sync]: {Pusher#30} Starting continuous push from local seq #1
      00:34:53.128539| [Sync]: {Repl#28} No remote checkpoint 'cp-MUIuaV3ofM80VODsDcPT+/cavlk='
      00:34:53.146470| ERROR: LiteCore throwing LiteCore error 19: unsupported operation for this database type
       0 cblite          _ZN8litecore24C4CollectionObserverImplC2EP12C4CollectionmSt8functionIFvP20C4CollectionObserverEE + 156
       1 cblite          ZSt11make_uniqueIN8litecore24C4CollectionObserverImplEJRP12C4CollectionmSt8functionIFvP20C4CollectionObserverEEEENSt9_MakeUniqIT_E15single_objectEDpOT0 + 140
       2 cblite          _ZN20C4CollectionObserver6createEP12C4CollectionSt8functionIFvPS_EE + 78
       3 cblite          _ZN8litecore4repl11ChangesFeed14getMoreChangesEj + 294
       4 cblite          _ZN8litecore4repl21ReplicatorChangesFeed14getMoreChangesEj + 84
       5 cblite          _ZN8litecore4repl6Pusher20_maybeGetMoreChangesEv + 205
       6 cblite          _ZN8litecore4repl6Pusher12startSendingEm + 113
       7 cblite          _ZN8litecore4repl6Pusher6_startEv + 174
       8 cblite          ZSt13invoke_implIvRMN8litecore4repl6PusherEFvvERPS2_JEET_St21invoke_memfun_derefOT0_OT1_DpOT2 + 103
       9 cblite          ZSt8invokeIRMN8litecore4repl6PusherEFvvEJRPS2_EENSt15invoke_resultIT_JDpT0_EE4typeEOS9_DpOSA + 63
      10 cblite          ZNSt5_BindIFMN8litecore4repl6PusherEFvvEPS2_EE6_callIvJEJLm0EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE + 87
      11 cblite          ZNSt5_BindIFMN8litecore4repl6PusherEFvvEPS2_EEclIJEvEET0_DpOT + 57
      12 cblite          _ZNSt17_Function_handlerIFvvESt5_BindIFMN8litecore4repl6PusherEFvvEPS4_EEE9_M_invokeERKSt9_Any_data + 32
      13 cblite          _ZNKSt8functionIFvvEEclEv + 50
      14 cblite          _ZNK8litecore5actor15ThreadedMailbox10safelyCallERKSt8functionIFvvEE + 29
      15 0x562614c7e592
      16 0x562614c7f471
      17 cblite          _ZNKSt8functionIFvvEEclEv + 50
      18 cblite          _ZN8litecore5actor15ThreadedMailbox18performNextMessageEv + 210
      19 cblite          _ZN8litecore5actor9Scheduler4taskEj + 293
      20 0x562614c7e052
      21 0x562614c7ff9c
      22 0x562614c7fd8f
      23 0x562614c802cc
      24 0x562614c8029d
      25 0x562614c8027c
      26 0x7f7ed57f2733
      27 0x7f7ed4f666db
      28 libc.so.6         clone + 63
      00:34:53.146541| [Sync] ERROR: {Pusher#30} Threw C++ exception: unsupported operation for this database type
      00:34:53.146585| [Sync] ERROR: {Repl#28} Stopping due to fatal error: LiteCore UnexpectedError, "unsupported operation for this database type"
      00:34:53.147107| [Sync]: {Repl#28} Connection closed with WebSocket/HTTP status 4002: "An exception was thrown" (state=3)
      00:34:53.147221| [Sync] ERROR: {Repl#28} Got LiteCore error: WebSocket error 4002, "An exception was thrown"
      00:34:53.147296| [Sync]: BLIP sent 1 msgs (68 bytes), rcvd 0 msgs (47 bytes) in 0.020 sec. Max outbox depth was 1, avg 1.00
      00:34:53.147450| [Sync] ERROR: {Repl#28} Stopping due to fatal error: LiteCore UnexpectedError, "unsupported operation for this database type"
      00:34:53.327759| [Sync] ERROR: {C4Replicator#29} State: busy, progress=0.00%, error=LiteCore UnexpectedError, "unsupported operation for this database type"
      00:34:53.327854| [Sync]: {Repl#28} now stopped
      00:34:53.327930| [DB]: {CollectionImpl#27} Closed
      00:34:53.328188| [DB]: {DB#26} Closing database
      00:34:53.328304| [Sync] ERROR: {C4Replicator#29} State: stopped, progress=0.00%, error=LiteCore UnexpectedError, "unsupported operation for this database type"
      00:34:53.328374| [Listener]: Replicator task #7 finished
      00:34:53.328424| [Sync]: {C4Replicator#29} Freeing C4BaseReplicator

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jianmin.zhao Jianmin Zhao
            jianmin.zhao Jianmin Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty