tlrobinson / narwhal

[DEPRECATED] A JavaScript standard library, package manager, and more.
http://narwhaljs.org/
372 stars 16 forks source link

Tusk: network is unreachable error #84

Open alsonkemp opened 14 years ago

alsonkemp commented 14 years ago

Fix found here: http://www.mail-archive.com/cassandra-commits@incubator.apache.org/msg07174.html

Error message:

JavaException: java.net.SocketException: Network is unreachable org.mozilla.javascript.WrappedException: Wrapped java.net.SocketException: Network is unreachable (/home/alson/projects/narwhal/engines/rhino/lib/http-engine.js#5)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1776)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1688)
at script(/home/alson/projects/narwhal/engines/rhino/lib/http-engine.js:5)

alsonkemp commented 14 years ago

Occurs with Java 6

alsonkemp commented 14 years ago

Fix:

Add the following to engines/rhino/bin/narwhal-rhino:

NARWHAL_JAVA_ARGUMENTS=-Djava.net.preferIPv4Stack=true

tlrobinson commented 14 years ago

Interesting. Do we think this should be included the in narwhal-rhino shell script? Or should it be left up to Linux users having problems?

narwhal-rhino supports an environment variable for these sort of things:

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

should do it.