MongoDB server version - The client driver may require an upgrade

Hi Greetings

I’m setting up a new installation of OpenHab 3.3 and I’m having difficulties setting up MongoDB persistence.
I’m getting the following error in openhab.log

2022-08-23 16:38:32.257 [ERROR] [b.internal.MongoDBPersistenceService] - Failed to connect to collection “”: { “serverUsed” : “localhost:27017” , “ok” : 0.0 , “errmsg” : “Unsupported OP_QUERY command: createIndexes. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal” , “code” : 352 , “codeName” : “UnsupportedOpQueryCommand”}
com.mongodb.CommandFailureException: { “serverUsed” : “localhost:27017” , “ok” : 0.0 , “errmsg” : “Unsupported OP_QUERY command: createIndexes. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal” , “code” : 352 , “codeName” : “UnsupportedOpQueryCommand”}

Mongo server version: 6.0.0
OpenHab version: 3.3
Java version:
openjdk 11.0.16 2022-07-19 LTS
OpenJDK Runtime Environment Zulu11.58+15-CA (build 11.0.16+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.58+15-CA (build 11.0.16+8-LTS, mixed mode)
OS: Debian 11 BullsEye

Can you please help?
Thank you.

According to the mongodb peristence binding’s jar file the included mongodb client driver is of version 3.9. This is as well documented on the bindings page at MongoDB - Persistence Services | openHAB.

The mongodb compatibility page lists compatibility between driver version and server version:

According to this table client driver 3.9 is compatible with mongodb server versions 2.6 … 4.0.

So I think there are two options:

  • raise a ticket on github to ask for support of a newer client driver and wait for the update of the binding
  • install mongodb with a version that is supported

Thank you.
I’ll try to downgrade the server version to an older version of mongodb.
I could not find the client driver version on the binding page.

Thanks for finding it.

Regads.