Cannot execute a gradlew task that eventually starts an embedded Mongo twice on Windows
See original GitHub issueReproduction steps:
- Install Java 8
- Clone the repository at https://github.com/hiddenswitch/Spellsource-Server
- In Windows Powershell, run
& ".\gradlew.bat net:local
. - Observe
de.flapdoodle.embed.mongo
correctly downloads and executes amongod
. SIGINT
the process withShift+Ctrl+C
- In Windows Powershell, run
& ".\gradlew.bat net:local
. - Observe the following exception:
10:15:37.426 [main] ERROR d.f.e.p.runtime.AbstractProcess - failed to call onAfterProcessStart()
java.io.IOException: Could not start process: <EOF>
at de.flapdoodle.embed.mongo.AbstractMongoProcess.onAfterProcessStart(AbstractMongoProcess.java:79) [de.flapdoodle.embed.mongo-e5232204c2.jar:na]
at de.flapdoodle.embed.process.runtime.AbstractProcess.<init>(AbstractProcess.java:114) ~[de.flapdoodle.embed.process-2.0.1.jar:na]
at de.flapdoodle.embed.mongo.AbstractMongoProcess.<init>(AbstractMongoProcess.java:53) [de.flapdoodle.embed.mongo-e5232204c2.jar:na]
at de.flapdoodle.embed.mongo.MongodProcess.<init>(MongodProcess.java:50) [de.flapdoodle.embed.mongo-e5232204c2.jar:na]
at de.flapdoodle.embed.mongo.MongodExecutable.start(MongodExecutable.java:44) [de.flapdoodle.embed.mongo-e5232204c2.jar:na]
at de.flapdoodle.embed.mongo.MongodExecutable.start(MongodExecutable.java:34) [de.flapdoodle.embed.mongo-e5232204c2.jar:na]
at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101) [de.flapdoodle.embed.process-2.0.1.jar:na]
at com.hiddenswitch.spellsource.util.LocalMongo.start(LocalMongo.java:66) [main/:na]
at com.hiddenswitch.spellsource.util.Mongo.startEmbedded(Mongo.java:47) [main/:na]
at com.hiddenswitch.spellsource.util.Mongo.connectWithEnvironment(Mongo.java:102) [main/:na]
at com.hiddenswitch.spellsource.applications.Embedded.main(Embedded.java:22) [main/:na]
Mongo failed to start.
java.io.IOException: Could not start process: <EOF>
at de.flapdoodle.embed.mongo.AbstractMongoProcess.onAfterProcessStart(AbstractMongoProcess.java:79)
at de.flapdoodle.embed.process.runtime.AbstractProcess.<init>(AbstractProcess.java:114)
at de.flapdoodle.embed.mongo.AbstractMongoProcess.<init>(AbstractMongoProcess.java:53)
at de.flapdoodle.embed.mongo.MongodProcess.<init>(MongodProcess.java:50)
at de.flapdoodle.embed.mongo.MongodExecutable.start(MongodExecutable.java:44)
at de.flapdoodle.embed.mongo.MongodExecutable.start(MongodExecutable.java:34)
at de.flapdoodle.embed.process.runtime.Executable.start(Executable.java:101)
at com.hiddenswitch.spellsource.util.LocalMongo.start(LocalMongo.java:66)
at com.hiddenswitch.spellsource.util.Mongo.startEmbedded(Mongo.java:47)
at com.hiddenswitch.spellsource.util.Mongo.connectWithEnvironment(Mongo.java:102)
at com.hiddenswitch.spellsource.applications.Embedded.main(Embedded.java:22)
- Delete the
net\.mongo
directory. - Observe running
& ".\gradlew.bat" net:local
despite even deleting the directory does not resolve the issue. - Observe restarting the computer does not resolve the issue.
- Observe that an equivalent sequence of steps produces no issues on Mac or Linux.
Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Flapdoodle Embedded Mongo process won't start
I am using the flapdoodle embedded mongo package to achieve this, but getting an error while attempting to start the tests. My build.gradle...
Read more >Learning the Basics - Gradle User Manual
Gradle represents the scope of a dependency with the help of a Configuration. Every configuration can be identified by a unique name. Many...
Read more >Spring Boot Reference Documentation
Try the How-to documents. They provide solutions to the most common questions. Learn the Spring basics. Spring Boot builds on many other Spring...
Read more >Realm: Create reactive mobile apps in a fraction of the time
Install Realm as a Gradle plugin. Step 1: Add the class path dependency to the project level build.gradle file. Copy to clipboard buildscript...
Read more >WhatsNew 2.0 | Ktor Framework
Maven: ktor-server-test-host-jvm causes dependency error starting from Ktor ... Can't run Ktor Gradle Plugin tasks using IDEA Gradle menu.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am able to reproduce the issue on Windows 7 with flapdoodle mongo version 2.0.1 which defaults to mongo version 3.6.0. From what I can tell is that MongoDB 3.6.x needs
libeay32.dll
andssleay32.dll
. Unless both are available on the PATH the error above matches what I can see.The flapdoodle process extracts the mongod.exe from the zip and copies it to
%TEMP%
. From mongo 3.6.0, it will also have to copy the 2 dlls to that location or probably less prone to interference, create a sub directory in%TEMP%
and extract all 3 files to it.So to fix it temporarily just download the win zip distro from mongo website and extract the above dlls to
%TEMP%
folder which is something likeC:\Users\fred\AppData\Local\Temp
.… if this is still an issue, please reopen.