Closed whaley closed 11 years ago
Just waiting on a release of the upstream flapdoodle API to fix this.
Hmm.. i had similar issues working on my laptop without any network, but the current code did handle this well. So there must be some other cause for this.
Can you answer me the following questions?
On which platform did you get this error?
OSX (10.8)
Does "ping localhost" works?
Turns out that this not working is because my hostname
is set to something else, but I didn't have an entry in /etc/hosts for that particular hostname for 127.0.0.1. That actually makes the problem go away too.
@michaelmosmann I guess we could close flapdoodle-oss/de.flapdoodle.embed.process#3 and not merge the change, but I think this is a common configuration problem and probably worth coding around if we can.
I think i will make some more checks an printout a warning message for helping to solve this problem...
Fixed (a warning is displayed) by upgrading to embedmongo 1.31.
Note: there seems to be a problem calling functions like Network.localhostIsIPv6() on OSX in Java 7. The result is an UnknownHostException with a message like:
jlittlej: jlittlej: nodename nor servname provided, or not known.
If you experience this, the suggested workaround seems to be to add your hostname to /etc/hosts
.
In my case this meant adding:
127.0.0.1 jlittlej
to /etc/hosts
.
When working at local coffee shop I get the following on running the start goal.
This also seems to happen if I disconnect myself and go offline.
In another maven module where I'm using de.flapdoodle.embed.mongo.MongodStarter in code as opposed to using your plugin as part of pre-integration-test and post-integration-test, I am wrapping MongodStarter jin this way to prevent that from happening.
If Network.localhostIsIPV6() fails for whatever reason, I'm just blithely setting MongodConfig's ipv6 property to false.