Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Carts is incompatible with mongo:latest image #900

Open
Tehsmash opened this issue Sep 2, 2022 · 2 comments
Open

Carts is incompatible with mongo:latest image #900

Tehsmash opened this issue Sep 2, 2022 · 2 comments

Comments

@Tehsmash
Copy link

Tehsmash commented Sep 2, 2022

After installing sock-shop on kubernetes using deploy/kubernetes/complete-demo.yaml the carts API endpoint fails and I see errors in the carts service logs.

2022-09-02 09:54:31.652 ERROR [carts,,,] 7 --- [p-nio-80-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data
.mongodb.UncategorizedMongoDbException: Query failed with error code 352 and error message 'Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal' on server carts-db:27017
; nested exception is com.mongodb.MongoQueryException: Query failed with error code 352 and error message 'Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal' on server
 carts-db:27017] with root cause

com.mongodb.MongoQueryException: Query failed with error code 352 and error message 'Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal' on server carts-db:27017

mongo:latest now points to mongo 6.x.x and that has removed the OP_QUERY opcode resulting in this error. Mongo 5 is still compatible and downgrading the image reference to image: mongo:5 in complete-demo.yaml resolves this error.

@dyegowermelinger
Copy link

I'm facing the same issue.

To replicate, call the endpoint: http://10.31.30.144:30001/cart

Screenshot 2022-09-07 at 17 00 23

@dyegowermelinger
Copy link

dyegowermelinger commented Sep 7, 2022

@Tehsmash ,
If you are still experiencing the problem you can set the image version for the services order-db and carts-db, by changing the lines below for: image: mongo:5.0.11

Then you only need to redeploy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants