-
Notifications
You must be signed in to change notification settings - Fork 31
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
macOS Catalina and Mojave fails due to hardened rules #21
Comments
Ok, thanks for the report, I'll take a look at it. |
Ok, I already know what is causing the problem. The problem is in EnterpriseDB binaries. Because the MacOS bundle contains exactly these binaries but only in reduced and repacked form. The previous binaries were not notarized and was running in legacy mode, so it was working fine. Whereas the new version of binaries are running in the hardened runtime which was introduced in macOS 10.14 Mojave. Apps running in the hardened runtime have some restrictons. One of them relates to using dynamically linked libraries. For using them must be enabled runtime exception to allow DYLD environment variables and maybe some other exceptions. Unfortunately, at this moment the EnterpriseDB binaries do not have this exception enabled, so it does not work with the latest MacOS versions (Mojave and Catalina). We can only hope that people from EnterpriseDB will fix this issue and the next versions will be working again. |
Arg, so we can't run these on OSx 😢 |
Downgrading to 12.1 fixed this for me thankfully 😥 |
@chrisjenx Thanks for the confirmation. |
Any progress on this? |
I dropped embedded postgres db, we now run a local test db and our ci (GitHub Actions) runs a postgres server. Not only is this much much faster ~2s per test down to ~200ms (including dropping the pragma and recreating it for each test). It's a little closer to how your application would probably be talking db, we found some interesting connection closed issues by moving to a single instance which was masked by dropping and creating a new db on each test. |
@phiros Nope, the latest versions have the same problem. |
@chrisjenx Good for you. However, database cloning should not have such an impact on performance. Creating a new database on my machine takes only a few milliseconds, depending on the size of the database. |
BTW for people thinking they are affected by exactly this bug: |
Yeah not sure, it would of thought so too, probably an osx issue? (My unix machine runs the same stack about 2-3x faster, so probably some crappy bottleneck in osx) |
There is an issue with versions after this one which hasn't been solved yet (zonkyio/embedded-postgres-binaries#21).
This fixed for me |
@trecloux Nope, still the same problem. |
I did some more digging and it seems that the primary problem was a missing libz library. I included the library into the bundle and now everything works fine. |
Hi @tomix26 |
The fixed versions were not officially released yet, I've released them right now. But since already published versions cannot be overridden in maven central repository, I had to release special versions with |
I figured a similar but probably unrelated problem causes my initdb execution failure. I am using docker/toolbox that communicates with an in-memory Linux and Docker daemon running in a VirtualBox VM. The Linux kernel mounts my laptop's /Users filesystem, and that mounting is limited to providing "a minimal file system to allow exchange of files between the host and guest", https://forums.virtualbox.org/viewtopic.php?f=3&t=91596 The following permission error precedes my initdb execution failure (after using
The output of my failed
The cause is different from the hardened runtime issue uncovered by @tomix26 . As a work-around, I used an unnamed volume in
|
All versions of zonky embedded postgres still fail for me. MacOS 12.2 M1 Pro |
For me ru.yandex.qatools.embed.postgresql started failing after I upgraded Mac os from 11 to 12. |
Still a problem. I'm using testcontainers-scala instead (for some testcontainers-java may be more helpful). Maybe it's even better like this. Still the problem exists. |
Same problem here with MacOS Monetary (12.3.1) M1! |
Same problem here with MacOS Monterey (12.3) M1 |
Same problem here with MacOS 12.5 on a MacBook Pro 16-inch 2019 |
FYI Using these dependencies is working for me:
I was using only embedded-database-spring-test 1.6.3 before:
After upgrading I just needed to set the provider and type for the embedded db:
|
Since the last release, 9.6.17, i'm no longer able to use embedded-postgres. I get an IllegalStateException saying initDb failed:
Some more investigation reveals that initDb is indeed unable to run:
It seems like this issue: #17 seems to cause this problem since going back to 9.6.16 fixes the issue.
I'm running on MacOS 10.15.2 and java 11:
The text was updated successfully, but these errors were encountered: