Thanks to visit codestin.com
Credit goes to github.com

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

Carts is incompatible with mongo:latest image #900

@Tehsmash

Description

@Tehsmash

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions