-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permission denied mac m1 #21
Comments
@NorthlaneKek you are using a old version as you are using spring 2.2.6 .. and flapdoodle 2.2.0 .. is there any way to upgrade to at least spring 2.6.x? |
@michaelmosmann unfortunately, I'm not able to upgrade spring right now |
@NorthlaneKek ,.. hmm.. flapdoodle 2.2.0 is quite old and there was a lot of refactoring done.. you can try to upgrade flapdoodle.mongo up to 3.5.4 and see if this works somehow.. and if 3.5.4 does not work make a step back until you get the newest version possible.. anything newer (>=4.x.x) will not work (or it would be a big surprise for me). I guess that macos is preventing the execution of a binary inside of a temp folder.. so even with newer versions this problem might stick. |
@NorthlaneKek .. is your repo public? |
@michaelmosmann sorry for the late response. But, it seems that now mongo server doesn't even starts up. All I can see in logs related to mongo is: P.S. repository is not public. |
@NorthlaneKek I am not sure if I can backport all the changes to this spring version ... I must think about it... |
@michaelmosmann oh, probably, it's my fault. I think it's better to make it clear now
|
@NorthlaneKek .. the spring versions are kind of .. missleading.. the mongodb integration is part of the spring boot project.. and i have some integrations for 2.6.x, 2.7.x and 3.0.x. This all started because spring wrote the first integrations by themself.. but misunderstood some parts of it. So i started to struggle with their misuse of "functionality" up to a point where any refactoring needed was not possible anymore. So i started to providing my own integration and spring stopped their integration with spring boot 3.0.0. ... some background for this.
Same system? MacOS with M1?
yeah.. there was a lot of api change needed to fix bugs and extend functionality .. I think i try to make an backport to spring boot 2.2.0 and see if this works somehow. |
you can try to start the executable by yourself to see if you can fix this with setting the needed permission OR as you are using an M1 some emulation setup is needed as the mongodb binary is (if you are not using something newer .. like 6.x.x.) for an x86 cpu. |
@michaelmosmann actually, as a more fast way to avoid all exceptions is to start mongo db in a docker container to pass all the tests (everything runs ok) With 3.5.4 version I don't even see any mentions of "permission denied" exception. All I can see is that my application is unable to connect to localhost:27017 (and it's obvious because the application didn't even try to start the embedded mongo server and that's why there is no any 'permission denied' problem anymore) |
@NorthlaneKek i think spring failed to start the integration and eats most of the exceptions around it.. .. one way to go could be https://www.testcontainers.org/ .. so if you are happy with your solution we could close this issue.. if not, it is easy to reopen. |
@michaelmosmann it would be really great to find out any other solutions to run embed mongo server, because I'm the only one in the team who faces this problem. Of course, I can use testcontainers or something like this, but it's not really convenient :( |
@NorthlaneKek ok.. i will try. |
@NorthlaneKek my first attempt to backport it to 2.2.x failed .. so any solution will be a lot more tricky.. don't expect anything in the next two tweeks.. |
@michaelmosmann I spotted a pretty similar error here: flapdoodle-oss/de.flapdoodle.embed.mongo#422 P.S. extract-f....mongod file always created with such permissions: -rw-r--r-- |
@NorthlaneKek .. the problem is here: the mongodb project changed the way how they store their archives for windows/macos/linux.. and the version you are using relies on the "old way" which stopped working with newer versions of mongodb, because the paths for the download are now different.. and not every version is supported on every platform.. so i had to solve this somehow .. and to solve this i had to change many other things.. so the old version you are using my work somehow in some cases.. but sometimes not anymore.. to fix this will be some kind of .. interesting. |
@michaelmosmann is there any update? |
@NorthlaneKek i did not had enough time for a second try to backport this stuff to spring 2.2.x .. and i am afraid that there will be no further progress this week.. (just busy) |
@NorthlaneKek i guess this is still an issue.. but i did not find a way to backport this stuff.. if i can help in any other way, just ask. |
Hey there. Trying to run embed Mongo in test environment but got stuck with this error:
I scrolled all the issues before, tried to set de.flapdoodle.embed.io.tmpdir (with System.setProperty)) and even the TMPDIR env variable to another folder. Unfortunately, the output is the same but with the another folder.
Version of flapdoodle.embed: 2.2.0
Spring boot: 2.2.6
OS: MacOS (M1 chip)
The text was updated successfully, but these errors were encountered: