开发者

maven not working anymore with new kernel

I'm a bit disappointed by what is happening to me. I'm not a maven expert (ie I just type mvn clean install as I was told) but as I installed a new kernel on my debian machine, it seems maven doesnt work anymore :

on old kernel (2.6.26-1-amd64) it download all dependencies well.

on new kernel (2.6.32-trunk-amd64) it fail downloading dependencies with a "network unreachable" message :

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/objectweb/fractal/parent/2.0/parent-2.0.pom
[WARNING] Unable to get resource 'org.objectweb.fractal:parent:pom:2.0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Network is unreachable
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: null:cecilia:pom:2.2-SNAPSHOT

Reason: Cannot find parent: org.objectweb.fractal:parent for project: null:cecilia:pom:2.2-SNAPSHOT for project null:cecilia:pom:2.2-SNAPSHOT

of course, the network seems totally reachable as this is the problem rega开发者_如何学运维rding network I got.

mvn --version
2.2.1

Any help would be great! Thx


This sounds like bug #563946 (which is actually caused by a JVM bug). The suggested workaround is to set the following system property when running maven (and other Java programs):

-Djava.net.preferIPv4Stack=true

If this works, then you can set it in the MAVEN_OPTS environment variable (e.g. in "~/.mavenrc"):

MAVEN_OPTS="-Djava.net.preferIPv4Stack=true"


In fact a friend of mine find out where this came from, it's a java bug :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560056

so simply editing /etc/sysctl.d/bindv6only.conf

#net.ipv6.bindv6only = 1
# Set to 0 due to java but (#560056)
net.ipv6.bindv6only = 0

should do the trick!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜