Got LiteCore error: WebSocket error 1002 "Incompatible replication protocol (missing 'Sec-WebSocket-Protocol' response header)"

Hello,

I am getting this following error while testing couch base lite (2.7) with Sync Gateway (3.1.6).

01:18:58,576 ERROR [stderr] (Thread-249) E/CouchbaseLite/REPLICATOR:{Repl#3}==> litecore::repl::Replicator /opt/couchbase/db/reservations.cblite2/ ->wss://SYNCGATEWAYXX:4984/reservations/_blipsync @0x7f82f81f17f8
01:18:58,576 ERROR [stderr] (Thread-250) E/CouchbaseLite/REPLICATOR:{Repl#3} Got LiteCore error: WebSocket error 1002 “Incompatible replication protocol (missing ‘Sec-WebSocket-Protocol’ response header)”
01:20:58,705 ERROR [stderr] (Thread-260) E/CouchbaseLite/REPLICATOR:{Repl#4}==> litecore::repl::Replicator /opt/couchbase/db/minihotels.cblite2/ ->wss://SYNCGATEWAYXX:4984/minihotels/_blipsync @0x7f82f831baf8

Documents are flowing fine but getting this error in our logs. Is this something I need to worry about or it is harmless?
I know we are using out dated Couchbase lite but will upgrade it to latest version.

Version: Couchbaselite 2.7
SDK : Java

Any suggestions please?

Thanks,
Lisha

That error means the server response isn’t a valid WebSocket response. You can troubleshoot by getting the response headers from the replicator after you get the error. Sometimes this happens if there’s a server-side misconfiguration and you aren’t actually reaching SG at all.

If this were happening every time, replication wouldn’t work at all. But you say “documents are flowing fine” … that implies either the error is intermittent, or you’ve got multiple replications configured and at least one of them doesn’t fail.