narwhal icon indicating copy to clipboard operation
narwhal copied to clipboard

Tusk: network is unreachable error

Open alsonkemp opened this issue 15 years ago • 3 comments

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)

alsonkemp avatar Dec 25 '09 21:12 alsonkemp

Occurs with Java 6

alsonkemp avatar Dec 25 '09 21:12 alsonkemp

Fix:

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

NARWHAL_JAVA_ARGUMENTS=-Djava.net.preferIPv4Stack=true

alsonkemp avatar Dec 25 '09 21:12 alsonkemp

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.

tlrobinson avatar Mar 31 '10 22:03 tlrobinson