Closed neottil closed 3 months ago
@neottil if something fails, ubuntu is the fallback.. the libcrypto.so.1.1 error message is triggered by the fallback ubuntu version.. (the binary would run, but libcrypto 1.1 is missing, i guess there is a libcrypto 3.x)
you can override the os detection this way: https://github.com/flapdoodle-oss/de.flapdoodle.os?tab=readme-ov-file#run ..
The detection of Amazon Linux is partial based on just the hostname (see https://github.com/flapdoodle-oss/de.flapdoodle.os/blob/main/src/main/java/de/flapdoodle/os/linux/AmazonVersion.java) .. is this the case?
Thanks for the very quick response.
By looking your link I see: "You can override platform detection with system property de.flapdoodle.os.override=
The dependency de.flapdoodle.embed.mongo.spring31x is sufficient or should I also use de.flapdoodle.os?
I've try to build project on container deployed on EKS, but I've not control of this. Maybe the hostname can contains amzn and its match with Amazon detection. It's possible detect version from os-release file? I think it is more reliable, or not?
@neottil it should be "Linux|X86_64|Oracle|Oracle_9" .. just the enum value from https://github.com/flapdoodle-oss/de.flapdoodle.os/blob/main/src/main/java/de/flapdoodle/os/linux/OracleVersion.java
The dependency de.flapdoodle.embed.mongo.spring31x is sufficient or should I also use de.flapdoodle.os?
the spring dependency is enough:)
Maybe the hostname can contains amzn and its match with Amazon detection.
This was the only way to detect if this could be an amazon linux .. so maybe i must change this to "if its amazon+
Hi, I added in my test application.properties file the property de.flapdoodle.os.override=Oracle_9 as suggested. The error during build persist. When mvn run tests the exception is thrown.
build 01-Jul-2024 09:49:27 2024-07-01T07:49:27.950Z INFO 209 --- [ main] d.f.e.m.s.a.SyncClientServerFactory : sync server factory
build 01-Jul-2024 09:49:28 2024-07-01T07:49:28.045Z WARN 209 --- [ main] d.f.os.common.PeculiarityInspector : more than one match: [Oracle, Amazon]
build 01-Jul-2024 09:49:28 2024-07-01T07:49:28.093Z WARN 209 --- [ main] d.f.e.m.p.linux.LinuxPackageFinder : because there is no package for GenericFeatureAwareVersion{6.0.6}:Platform{operatingSystem=Linux, architecture=X86_64} we fall back to GenericFeatureAwareVersion{6.0.6}:Platform{operatingSystem=Linux, architecture=X86_64, version=Ubuntu_20_04}
build 01-Jul-2024 09:49:28 2024-07-01T07:49:28.775Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : starting...
build 01-Jul-2024 09:49:28 2024-07-01T07:49:28.780Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 0 %
build 01-Jul-2024 09:49:28 2024-07-01T07:49:28.957Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 10 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.079Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 20 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.202Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 30 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.282Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 40 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.332Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 50 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.368Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 60 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.404Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 70 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.439Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 80 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.470Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : 90 %
build 01-Jul-2024 09:49:29 2024-07-01T07:49:29.499Z INFO 209 --- [ main] d.f.e.m.s.autoconfigure.EmbeddedMongo : download https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-6.0.6.tgz : finished
build 01-Jul-2024 09:49:30 2024-07-01T07:49:30.277Z ERROR 209 --- [ Thread-4] d.f.e.m.s.autoconfigure.EmbeddedMongo : /home/build-user/.embedmongo/fileSets/40fbf87d12e31eb507b18eda2d454841b3ab04132d659478f6179b8faaa509b9/mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
build 01-Jul-2024 09:49:30 2024-07-01T07:49:30.361Z WARN 209 --- [ main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoControllerImpl': Unsatisfied dependency expressed through field 'mongoQueryService': Error creating bean with name 'mongoQueryServiceImpl': Unsatisfied dependency expressed through field 'mongoTemplate': Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0: Error creating bean with name 'syncClientServerWrapper' defined in class path resource [de/flapdoodle/embed/mongo/spring/autoconfigure/EmbeddedMongoAutoConfiguration$SyncClientServerWrapperConfig.class]: rollback after error on transition to State(RunningMongodProcess), successful reached:
The property has no effect; it still seems flapdoodle recognize two possible hosts. Any other suggestion?
Thank you.
@neottil .. sorry.. the property value should be: Linux|X86_64|Oracle|Oracle_9
..
So sorry for my mistake in property evaluation. Also with de.flapdoodle.os.override=Linux|X86_64|Oracle|Oracle_9 the error dosn't change. it's reconized [Oracle, Amazon] and not forced Oracle.
@neottil .. ok, i will have to look into this soon..
@neottil there is a new release where the best match is used.. so i would close this issue.. reopen if there is still an issue.
I am work with spring boot 3.1.10 and de.flapdoodle.embed.mongo.spring31x 4.11.0. Building the project in java 17 with container-registry.oracle.com/graalvm/graalvm-community:21 image (based on oracle linux) and maven 3.9.6.
The sync client process discover more than one match (Oracle and Amazon), and by default chose Ubuntu20.04. First question is: why Ubuntu if the match is on Oracle and Amazon? during the tests execution I've the error: "Could not start process: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory". How can I solve this?
I saw in the project documentation that there is an option to force OS, but it is not clear to me how to do it for my specific case. I would like to try to force Oracle. Maybe this can resolve the problem of libcrypto.so.1.1, that I presume is a library for Ubuntu 20.04, but not in my Oracle distribution.
Here the stack trace: