Java: Network is unreachable error

Ran into this error today while trying to build the docbook file for Refactoring Redmine. It looks like it’s a problem with Java IPv4 IPv6 networking on Debian. Simple solution is to edit /etc/sysctl.d/bindv6only.conf and change net.ipv6.bindv6only=1 to 0. Thanks to Roberto for the fix.

Hope this helps someone.

My error log:

Validating your document...
java.lang.NullPointerException
        at com.sun.msv.driver.textui.DebugController.printLocation(DebugController.java:103)
        at com.sun.msv.driver.textui.DebugController.error(DebugController.java:98)
        at com.sun.msv.reader.Controller.error(Controller.java:49)
        at com.sun.msv.reader.Controller.error(Controller.java:69)
        at com.sun.msv.reader.GrammarReader._parse(GrammarReader.java:461)
        at com.sun.msv.reader.GrammarReader.parse(GrammarReader.java:439)
        at com.sun.msv.schematron.reader.SRELAXNGReader.parse(SRELAXNGReader.java:33)
        at com.sun.msv.schematron.Driver.doMain(Driver.java:44)
        at com.sun.msv.schematron.Driver$1.run(Driver.java:29)
===================================
 There are errors in your document
relmes verifier   Copyright(C) Sun Microsystems, Inc. 2001
parsing    http://www.docbook.org/xml/5.0/rng/docbookxi.rng
Network is unreachable
java.net.SocketException: Network is unreachable
===================================
book.pdf not rendered.