Mongo 4.2

17 views
Skip to first unread message

Tim van Dijen

unread,
Oct 26, 2019, 5:24:35 AM10/26/19
to OpenConext Community
Hey all,

Just a heads up for anyone considering upgrading MongoDB to the latest 4.2 stable:
It will horribly break Manage, even with compatibility mode set to 4.0.

Oct 26 10:01:18 webapp-4 MANAGE: [main] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongobee' defined in class path resource [manage/mongo/MongobeeConfiguration.class]: Invocation of init method failed; nested exception is com.mongodb.MongoQueryException: Query failed with error code 13 and error message 'not authorized on metadata to execute command { find: "system.indexes", filter: { ns: "metadata.dbchangelog", key: { changeId: 1, author: 1 } }, limit: 1, singleBatch: true, $db: "metadata" }' on server database-1:27017

Apparently they have introduced some BC-breaking changes to indexes.
Also reverting / downgrading isn't exactly a picnic..

- Tim

Okke Harsta

unread,
Oct 26, 2019, 7:51:08 AM10/26/19
to openc...@googlegroups.com
Hi,

Thanks for the heads up. Locally I run "mongodb-community/4.2.1” without any problems. However locally I run without any access control . The error you got indicates an authentication problem. Can you check that the spring.data.mongodb.uri in your application.yml is correct? E.g. does the user still has rights to query the metadata collection with the query specified in the error message? You can easily reproduce with the mongo shell. Perhaps something got screwed up in the authorisation roles.

Rgds,
Okke

--
OpenConext - Open For Collaboration
---
You received this message because you are subscribed to the Google Groups "OpenConext Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openconext+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openconext/80ef3bbf-a4c8-4d05-8660-4e727a5405fd%40googlegroups.com.

Tim van Dijen

unread,
Oct 26, 2019, 10:26:37 AM10/26/19
to openc...@googlegroups.com

Hi Okke,

My application.yml hasn't changed and a downgrade fixed things, but I verified it anyway:

spring:
    mongodb:
      uri: mongodb://manage:sec...@database-1.example.org:27017,database-2.example.org:27017/metadata

From the command-line:

> mongo -u manage -p secret mongodb://database-1.example.org:27017/metadata

MongoDB shell version v4.2.1
connecting to: mongodb://database-1.example.org:27017/metadata?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("6a405456-b79d-4ca8-b399-dd570b88cf47") }
MongoDB server version: 4.2.1
manage:PRIMARY> show collections
dbchangelog
mongobeelock
oidc10_rp
oidc10_rp_revision
saml20_idp
saml20_idp_revision
saml20_sp
saml20_sp_revision
sequences
sessions
single_tenant_template
single_tenant_template_revision


I tried upgrading Manage to 4.0.11 but that didn't make any difference.. I also tried removing / recreating the user, but that also didn't help.
Could it be that Manage needs a newer version of some library to work with Mongo 4.2?

- Tim

Op 26-10-2019 om 13:51 schreef Okke Harsta:
You received this message because you are subscribed to a topic in the Google Groups "OpenConext Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openconext/BISGVeNlra8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openconext+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openconext/9F13A186-5790-4983-8247-072A24A15F1E%40zilverline.com.

Tim van Dijen

unread,
Nov 6, 2019, 3:23:22 PM11/6/19
to OpenConext Community
I found out what the issue is and it is in fact a dependency that causes this, as I suspected..
Apparently mongobee uses some deprecated functionality that was dropped in MongoDB 4.2

- Tim

Op zaterdag 26 oktober 2019 16:26:37 UTC+2 schreef Tim van Dijen:

Hi Okke,

My application.yml hasn't changed and a downgrade fixed things, but I verified it anyway:

To unsubscribe from this group and stop receiving emails from it, send an email to openconext+unsubscribe@googlegroups.com.
--
OpenConext - Open For Collaboration
---
You received this message because you are subscribed to a topic in the Google Groups "OpenConext Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openconext/BISGVeNlra8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openconext+unsubscribe@googlegroups.com.

Okke Harsta

unread,
Nov 7, 2019, 2:09:03 AM11/7/19
to openc...@googlegroups.com
Looking at the recent activity of mongobee it does not seem likely that this pull-request will be merged soon. I had a look at the source and it is very difficult to override this behaviour without dirty hacks. I’ll discuss with SURF how to go forward. I think a fork of mongobee or a migration to a different database version  framework are our best bets.


To be continued,
Okke

To unsubscribe from this group and stop receiving emails from it, send an email to openconext+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openconext/7d257679-072e-4d4b-bdc0-40f1351fe3df%40googlegroups.com.

Tim van Dijen

unread,
Nov 7, 2019, 3:16:14 AM11/7/19
to openc...@googlegroups.com
Hi Okke,

I agree, mongobee seems dead.. I will try the workaround and let you know if it helps..
There is a fork available that has the fix we're looking for:  https://github.com/mongobee/mongobee/issues/92#issuecomment-443294813


Op do 7 nov. 2019 om 08:09 schreef Okke Harsta <oha...@zilverline.com>:
Looking at the recent activity of mongobee it does not seem likely that this pull-request will be merged soon. I had a look at the source and it is very difficult to override this behaviour without dirty hacks. I’ll discuss with SURF how to go forward. I think a fork of mongobee or a migration to a different database version  framework are our best bets.


To be continued,
Okke

On 6 Nov 2019, at 21:23, Tim van Dijen <tvd...@gmail.com> wrote:

I found out what the issue is and it is in fact a dependency that causes this, as I suspected..
Apparently mongobee uses some deprecated functionality that was dropped in MongoDB 4.2

- Tim

Op zaterdag 26 oktober 2019 16:26:37 UTC+2 schreef Tim van Dijen:

Hi Okke,

My application.yml hasn't changed and a downgrade fixed things, but I verified it anyway:

To unsubscribe from this group and stop receiving emails from it, send an email to openconext+...@googlegroups.com.
-- 
OpenConext - Open For Collaboration
--- 
You received this message because you are subscribed to a topic in the Google Groups "OpenConext Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openconext/BISGVeNlra8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openconext+...@googlegroups.com.

-- 
OpenConext - Open For Collaboration
--- 
You received this message because you are subscribed to the Google Groups "OpenConext Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openconext+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openconext/7d257679-072e-4d4b-bdc0-40f1351fe3df%40googlegroups.com.

--
OpenConext - Open For Collaboration
---
You received this message because you are subscribed to a topic in the Google Groups "OpenConext Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openconext/BISGVeNlra8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openconext+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openconext/E3890D7B-B591-4D0F-AE24-1D385F06EC42%40zilverline.com.
Reply all
Reply to author
Forward
0 new messages