FreenetWiki : Freenet0Point7withFreeVm

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

General FAQ


I want Freenet start when my system boots up

The freenet installer creates a cronjob which does this.

If you use debian, ubuntu or gentoo, you can use this init.d script.
It is an unofficial script but it works very well !

It doesn't work ...
Complain to nextgens :)

Why it is so hard ?
Because many users use Sun Java VM

I found a bug that does not exist with Sun Java VM ...
Fill a bug report.
Please set Category to freejvms.

Installing Freenet 0.7 on GNU/Linux with the OpenJDK JVM


OpenJDK is a project by Sun to release a Java Development Kit using completely free and open source code.

Install requirements
If you use debian or ubuntu, do:
aptitude install openjdk-6-jre
or, on a headless system (or if you don't want/need GUI support):
aptitude install openjdk-6-jre-headless

Then install freenet as normal, ie. ./run.sh.

Installing Freenet 0.7 on GNU/Linux with the GNU Interpreter for Java (GIJ)


The GNU Interpreter for Java (GIJ) is a Free version of Java that is an alternative to Sun's version of Java.

Install requirements
In theory, at least gij 4.1 with classpath 0.90 and gnu-crypto 2.0.1.
If you use debian or ubuntu, do:
apt-get install libgnucrypto-java gij classpath classpath-tools

Then install freenet as normal, ie. ./run.sh.

However, this doesn't actually work since GCJ hasn't implemented the JKS algorithm and so you'll get something along the lines of this:
INFO: Error while handling the CA :JKS
java.security.KeyStoreException: JKS
   at java.security.KeyStore.getInstance(libgcj.so.90)
   at java.security.KeyStore.getInstance(libgcj.so.90)
   at Sha1Test.main(Sha1Test.java:46)
Caused by: java.security.NoSuchAlgorithmException: Algorithm [JKS] of type [KeyStore] from provider [gnu.javax.security.auth.callback.GnuCallbacks: name=GNU-CALLBACKS version=2.1] is not found
   at gnu.java.security.Engine.getInstance(libgcj.so.90)
   at java.security.KeyStore.getInstance(libgcj.so.90)
   ...2 more


Runtime requirements

However, a complete install of freenet runs perfectly fine on GIJ. (You probably need GNU classpath as well.)

So, if you're determined to run freenet on GIJ, install it with some other JVM (such as openJDK), then use GIJ. You can even install it on a different computer, copy the files over, and use GIJ.

Freenet 0.7 with other free virtual machines


Note that the issues listed here are not necessarily properties of the virtual machine but rather depend on what version of gnu classpath they happen to be using.
Only gcj 4.1 is/will be officially supported by primary developers. If you want your jvm supported, send us patches. :P
Please use at least classpath 0.90

Kaffe
  1. On startup freenet first throws the following exception:
    ERROR: The resource freenet/support/CPUInformation/libjcpuid-x86-linux.so was not a valid library for this platform
    java.lang.UnsatisfiedLinkError: Could not load library /tmp/jcpuid10aa82666b5lib.tmp
       at java.lang.Runtime.load (Runtime.java:683)
       at java.lang.System.load (System.java:493)
       at freenet.support.CPUInformation.CPUID.loadFromResource (CPUID.java:488)
       at freenet.support.CPUInformation.CPUID.loadNative (CPUID.java:411)
       at freenet.support.CPUInformation.CPUID.<clinit> (CPUID.java:40)
       at net.i2p.util.NativeBigInteger.resolveCPUType (NativeBigInteger.java:139)
       at net.i2p.util.NativeBigInteger.<clinit> (NativeBigInteger.java:124)
       at freenet.crypt.Util.<clinit> (Util.java:87)
       at freenet.crypt.Yarrow.generator_init (Yarrow.java:248)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:82)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:68)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:64)
       at freenet.node.Node.main (Node.java:483)
    WARN: Native CPUID library jcpuid not loaded - will not be able to read CPU information using CPUID
    ERROR: The resource net/i2p/util/libjbigi-linux-none.so was not a valid library for this platform
    java.lang.UnsatisfiedLinkError: Could not load library /tmp/jbigi10aa8266833lib.tmp
       at java.lang.Runtime.load (Runtime.java:683)
       at java.lang.System.load (System.java:493)
       at net.i2p.util.NativeBigInteger.loadFromResource (NativeBigInteger.java:511)
       at net.i2p.util.NativeBigInteger.loadNative (NativeBigInteger.java:427)
       at net.i2p.util.NativeBigInteger.<clinit> (NativeBigInteger.java:125)
       at freenet.crypt.Util.<clinit> (Util.java:87)
       at freenet.crypt.Yarrow.generator_init (Yarrow.java:248)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:82)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:68)
       at freenet.crypt.Yarrow.<init> (Yarrow.java:64)
       at freenet.node.Node.main (Node.java:483)
    INFO: Native BigInteger library jbigi not loaded - using pure java
  2. After startup freenet throws the following exceptions forever:
    Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
    java.lang.RuntimeException: java.net.SocketException: Unsupported address family
       at freenet.io.comm.UdpSocketManager.getPacket (UdpSocketManager.java:213)
       at freenet.io.comm.UdpSocketManager.realRun (UdpSocketManager.java:144)
       at freenet.io.comm.UdpSocketManager.runLoop (UdpSocketManager.java:134)
       at freenet.io.comm.UdpSocketManager.run (UdpSocketManager.java:93)
       at java.lang.VMThread.run (VMThread.java:123)
    Caused by: java.net.SocketException: Unsupported address family
       at gnu.java.net.PlainDatagramSocketImpl.receive0 (PlainDatagramSocketImpl.java)
       at gnu.java.net.PlainDatagramSocketImpl.receive (PlainDatagramSocketImpl.java:154)
       at java.net.DatagramSocket.receive (DatagramSocket.java:581)
       at freenet.io.comm.UdpSocketManager.getPacket (UdpSocketManager.java:206)
       ...4 more
  3. /, /plugins, /config, /darknet and index freesite seem to work.
  4. telnet localhost 2323 works. "STATUS" lists both CONNECTED and DISCONNECTED nodes.
  5. tcpdump shows both incoming and outgoing udp traffic.

jamvm
  1. freenet does not throw any exceptions on startup.
  2. / and /plugins/ load correctly but /config/, /darknet/ or index freesite don't respond.
  3. jamvm does not die with ctrl-c.
  4. telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
    Bye... (java.net.SocketTimeoutException: Timeout)
  5. tcpdump shows both incoming and outgoing udp traffic.

cacao
  1. DataStore Limit !
  2. Throws the following on startup unless -Xmx256M is used:
    Exception in thread "main" java.lang.OutOfMemoryError
       at java.nio.ByteBuffer.allocate (ByteBuffer.java:70)
       at com.sleepycat.je.log.LogBuffer.<init> (LogBuffer.java:47)
       at com.sleepycat.je.log.LogBufferPool.reset (LogBufferPool.java:117)
       at com.sleepycat.je.log.LogBufferPool.<init> (LogBufferPool.java:73)
       at com.sleepycat.je.log.LogManager.<init> (LogManager.java:104)
       at com.sleepycat.je.log.SyncedLogManager.<init> (SyncedLogManager.java:34)
       at com.sleepycat.je.dbi.EnvironmentImpl.<init> (EnvironmentImpl.java:200)
       at com.sleepycat.je.dbi.DbEnvPool.getEnvironment (DbEnvPool.java:101)
       at com.sleepycat.je.dbi.DbEnvPool.getEnvironment (DbEnvPool.java:54)
       at com.sleepycat.je.Environment.<init> (Environment.java:81)
       at freenet.store.BerkeleyDBFreenetStore.<init> (BerkeleyDBFreenetStore.java:99)
       at freenet.node.Node.<init> (Node.java:897)
       at freenet.node.Node.main (Node.java:508)
  3. /, /plugins and /darknet responds but /config and index freesite don't. /darknet shows both CONNECTED and DISCONNECTED nodes.
  4. telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
    Bye... (java.net.SocketTimeoutException: Timeout)
  5. tcpdump shows both incoming and outgoing udp traffic.

sablevm
  1. Fails with the following exception
java.lang.Error: java.security.NoSuchAlgorithmException: SHA-256
   at freenet.node.Node.readNodeFile (Node.java:374)
   at freenet.node.Node.Node (Node.java:779)
   at freenet.node.Node.main (Node.java:508)
   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
   at java.lang.VirtualMachine.main (VirtualMachine.java:108)
Caused by: java.security.NoSuchAlgorithmException: SHA-256
   at java.security.MessageDigest.getInstance (MessageDigest.java:147)
   at freenet.node.Node.readNodeFile (Node.java:372)
   ...4 more


ikvm
  1. Fails with
    INFO: Native CPUID library jcpuid not loaded, reason: 'Dont know jcpuid library name for os type 'Unix 2.4.29.0'' - will not be able to read CPU information using CPUID
    INFO: Native BigInteger library jbigi not loaded, reason: 'Dont know jbigi library name for os type 'Unix 2.4.29.0'' - using pure java
    Exception in thread "main" cli.System.NotSupportedException: The invoked member is not supported in a dynamic module.
    	    at cli.System.Reflection.Emit.TypeBuilder.check_created (Unknown Source)
    	    at cli.System.Reflection.Emit.TypeBuilder.GetMethodImpl (Unknown Source)
    	    at cli.System.Type.GetMethod (Unknown Source)
    	    at cli.System.Type.GetMethod (Unknown Source)
    	    at cli.IKVM.Internal.DynamicTypeWrapper$JavaTypeImpl.GenerateMethod (Unknown Source)
    	    at cli.IKVM.Internal.DynamicTypeWrapper$JavaTypeImpl.LinkMethod (Unknown Source)
    	    at cli.IKVM.Internal.DynamicTypeWrapper.LinkMethod (Unknown Source)
    	    at cli.IKVM.Internal.MethodWrapper.Link (Unknown Source)
    	    at java.lang.reflect.Method.Invoke (Method.java)
  2. Does not listen on 8888 or 2323.
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.0481 seconds