2

I have a SpringBoot project pushed to GitHub and inside it I have some semi-integration tests in which I use embedded mongo as a database. My build is successfull locally and tests are passing but when running the "Java with Maven" GitHub action, it fails with the following:

nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.MongoDbFactorySupport]: Factory method 'mongoDbFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedMongoServer' defined in class path resource [org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.flapdoodle.embed.mongo.MongodExecutable]: Factory method 'embeddedMongoServer' threw exception; nested exception is java.lang.IllegalArgumentException: Could not move /tmp/embedmongo-download-8a0542da-3c32-4e65-9aa8-b6da3e8d9ca4.TGZ to /home/runner/.embedmongo/linux/mongodb-linux-x86_64-3.5.5.tgz
2dor
  • 851
  • 3
  • 15
  • 35

1 Answers1

0

I got same issue using Jenkins+Docker(maven 3.8-openjdk-11). I also pulled the image and run the build in local docker, everything goes well. Then I realized that I have a parallel pipeline stage in the jenkins file. I think that's the cause of the error. The multiple maven test stages(for multiple sub-modules) trying to move the file at the same time. For me I just change the test stage from parallel to non-parallel solved my issue.

Z.D.W
  • 1
  • 1