Open
Description
Problem:
For some reason, when used Panache instead of MongoTemplate following errors appeared.
Logs from orders-history-view-service:
16:24:17.661 [Test worker] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:5, serverValue:5}] to localhost:27017
16:24:17.686 [Test worker] DEBUG org.mongodb.driver.protocol.command - Sending command '{"insert": "Customer", "ordered": true, "writeConcern": {"j": true}, "documents": [{"_id": {"$oid": "601952811bb3304e42fad3b4"}, "creditLimit": {"amount": {"$numberDecimal": "2000"}}, "eventuateId": "3f429aa9-d6d5-4809-9cd7-5be675d3ed9a", "name": "Fred", "orders": {}}]}' with request id 11 to database customers_and_orders on connection [connectionId{localValue:5, serverValue:5}] to server localhost:27017
16:24:17.697 [Test worker] DEBUG org.mongodb.driver.connection - Closing connection connectionId{localValue:5, serverValue:5}
16:24:17.700 [Test worker] DEBUG org.mongodb.driver.protocol.command - Execution of command with request id 11 failed to complete successfully in 22.91 ms on connection [connectionId{localValue:5, serverValue:5}] to server localhost:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
Logs from mongo:
mongodb_1 | 2021-02-02T13:15:28.358+0000 I - [conn24] Assertion: 10307:Client Error: bad object in message: invalid bson type in object with unknown _id
mongodb_1 | 2021-02-02T13:15:28.361+0000 I CONTROL [conn24]
mongodb_1 | 0xf7a0f9 0xf19121 0xefe28f 0xefe33c 0xa072dd 0x890c57 0xad0d57 0x82b88d 0xf2d22b 0x7f916d655b50 0x7f916c19b95d
mongodb_1 | ----- BEGIN BACKTRACE -----
mongodb_1 | {"backtrace":[{"b":"400000","o":"B7A0F9"},{"b":"400000","o":"B19121"},{"b":"400000","o":"AFE28F"},{"b":"400000","o":"AFE33C"},{"b":"400000","o":"6072DD"},{"b":"400000","o":"490C57"},{"b":"400000","o":"6D0D57"},{"b":"400000","o":"42B88D"},{"b":"400000","o":"B2D22B"},{"b":"7F916D64F000","o":"6B50"},{"b":"7F916C0C0000","o":"DB95D"}],"processInfo":{ "mongodbVersion" : "3.0.4", "gitVersion" : "0481c958daeb2969800511e7475dc66986fa9ed5", "uname" : { "sysname" : "Linux", "release" : "5.4.0-26-generic", "version" : "#30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020", "machine" : "x86_64" }, "somap" : [ { "elfType" : 2, "b" : "400000", "buildId" : "EB7A0F7D9F202DB3ADD7637D20509D9DE82AC5A1" }, { "b" : "7FFDB5AE1000", "elfType" : 3, "buildId" : "4ED14590F0E64C2DC463FF8C8898D7493771AC54" }, { "b" : "7F916D64F000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3, "buildId" : "FEF281218797AD6AE726DD5FCEDECADD9E9F51DC" }, { "b" : "7F916D3EE000", "path" : "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.0", "elfType" : 3, "buildId" : "ED2B7FC51D2E7ADD0D4F1A3667E2B6ED7257663F" }, { "b" : "7F916CFF6000", "path" : "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0", "elfType" : 3, "buildId" : "7C7F328E0814F339D251A8F8C9459E50978EC254" }, { "b" : "7F916CDEE000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3, "buildId" : "F58D5DE3E7A2989E915422BA4203FE53DBA449A0" }, { "b" : "7F916CBEA000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3, "buildId" : "5D1CA3A3D93ED5B6C6462FFA03E787FDBE4013A3" }, { "b" : "7F916C8E3000", "path" : "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", "elfType" : 3, "buildId" : "8711429397A5AF8B6269B867D830EDF6E0225B8D" }, { "b" : "7F916C661000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3, "buildId" : "7F58D6664571941C86B2D969701A572AD4D7BF1D" }, { "b" : "7F916C44B000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", "elfType" : 3, "buildId" : "F980B1188708F8D8B5C35D185444AF4CB939AA1E" }, { "b" : "7F916C0C0000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3, "buildId" : "A745EBA2C16BA80AE1EF1A7A7B70740C2CF1B363" }, { "b" : "7F916D86B000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3, "buildId" : "9B23F2A44CC8CA6175CBD8D64584B1C7EA5FD18C" }, { "b" : "7F916BEA9000", "path" : "/lib/x86_64-linux-gnu/libz.so.1", "elfType" : 3, "buildId" : "1EFEB71FD4999C2307570D673A724EA4E1D85267" } ] }}
mongodb_1 | mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xf7a0f9]
mongodb_1 | mongod(_ZN5mongo10logContextEPKc+0xE1) [0xf19121]
mongodb_1 | mongod(_ZN5mongo11msgassertedEiPKc+0xAF) [0xefe28f]
mongodb_1 | mongod(+0xAFE33C) [0xefe33c]
mongodb_1 | mongod(_ZN5mongo9DbMessage9nextJsObjEv+0x25D) [0xa072dd]
mongodb_1 | mongod(_ZN5mongo12QueryMessageC2ERNS_9DbMessageE+0x57) [0x890c57]
mongodb_1 | mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x967) [0xad0d57]
mongodb_1 | mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xDD) [0x82b88d]
mongodb_1 | mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x34B) [0xf2d22b]
mongodb_1 | libpthread.so.0(+0x6B50) [0x7f916d655b50]
mongodb_1 | libc.so.6(clone+0x6D) [0x7f916c19b95d]
mongodb_1 | ----- END BACKTRACE -----
Solved by updating mongo to 4.2.12.
Looks like panache uses API from newer mongo version.
Metadata
Assignees
Labels
No labels