narwhal
narwhal copied to clipboard
Tusk: network is unreachable error
Fix found here: http://www.mail-archive.com/[email protected]/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)
Occurs with Java 6
Fix:
Add the following to engines/rhino/bin/narwhal-rhino:
NARWHAL_JAVA_ARGUMENTS=-Djava.net.preferIPv4Stack=true
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.