Most recent edit on 2008-07-17 13:58:42 by Infinity0 [update gij (broken), add openjdk]
Additions:
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 !
I found a bug that does not exist with Sun Java VM ...
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)
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:
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.
Deletions:
Installing Freenet 0.7 on Linux with the GNU Interpreter for Java (GIJ)
What is required ?
At least gij 4.1 with classpath 0.90 and gnu-crypto 2.0.1.
If you use debian or ubuntu, you can try:
What do you have to do ?
- Locate your classpath.security by doing find / -name classpath.security
- Add to this file:
security.provider.2=gnu.crypto.jce.GnuCrypto
security.provider.3=gnu.javax.crypto.jce.GnuSecurity
- Create somewhere a directory named freenet07
- Download freenet07.tar.gz∞ and extract it using tar xvzf freenet07.tar.gz.
- Edit wrapper.conf to look like:
wrapper.java.classpath.1=freenet.jar
wrapper.java.classpath.2=freenet-ext.jar
wrapper.java.classpath.3=/usr/share/java/javax-security.jar
wrapper.java.classpath.4=/usr/share/java/javax-crypto.jar
wrapper.java.classpath.5=/usr/share/java/gnu-crypto.jar
- Make sure that you have a file named freenet.jar, if not create a symbolic link to freenet-stable-latest.jar using ln -s freenet-stable-latest.jar freenet.jar
- Launch run.sh
Note that if you experience a long delay (5 or 10 seconds) before a Freesite page is sent to the browser, this is due to the fact that Classpath's URI constructor (used in the HTML content filter) is extremely slow (can take up to a couple of seconds for a single call). If / when a solution is found to this problem, or it resolved upstream, it will be reflected in this page.
I want Freenet start when my Linux boot
If you use debian, ubuntu or gentoo, you can use this init.d script∞.
It is an unofficial script but it works very well !
I found a bug that do not exist with Sun Java VM ...
I got Exception in thread "main" java.lang.NoClassDefFoundError: freenet.node.Node
Reread step 6 !
Edited on 2008-07-17 12:09:48 by Infinity0 [remove redundant ones (ie. dependancies of others)]
Additions:
~apt-get install libgnucrypto-java gij classpath classpath-tools
Deletions:
~apt-get install libgnucrypto-java gij java-gcj-compat classpath-common classpath-common-unzipped libgcj-common classpath-tools
Edited on 2006-08-11 16:17:06 by NicO [Final edit !]
Additions:
~1) Locate your classpath.security by doing find / -name classpath.security
- Download freenet07.tar.gz∞ and extract it using tar xvzf freenet07.tar.gz.
- Make sure that you have a file named freenet.jar, if not create a symbolic link to freenet-stable-latest.jar using ln -s freenet-stable-latest.jar freenet.jar
Deletions:
~1) Locate your classpath.security by doing find / -name classpath.security
Download freenet07.tar.gz∞ and extract it.
Make sure that you have a file named freenet.jar, if not create a symbolic link to freenet-stable-latest.jar using ln -s freenet-stable-latest.jar freenet.jar
Edited on 2006-08-11 16:15:02 by NicO [Forgot something]
Additions:
~1) Make sure that you have a file named freenet.jar, if not create a symbolic link to freenet-stable-latest.jar using ln -s freenet-stable-latest.jar freenet.jar
Reread step 6 !
Deletions:
wrapper.working.dir=./
I think that freenet-cvs-snapshot.jar has been renamed to freenet-rsomething-snapshot.jar.
Please rerename this file :)
Edited on 2006-08-11 16:02:24 by NicO [Update to use the wrapper :)]
Additions:
~1) Download freenet07.tar.gz∞ and extract it.
- Edit wrapper.conf to look like:
wrapper.working.dir=./
wrapper.java.classpath.1=freenet.jar
wrapper.java.classpath.2=freenet-ext.jar
wrapper.java.classpath.3=/usr/share/java/javax-security.jar
wrapper.java.classpath.4=/usr/share/java/javax-crypto.jar
wrapper.java.classpath.5=/usr/share/java/gnu-crypto.jar
- Launch run.sh
Deletions:
~1) Download freenet-cvs-snapshot.jar∞ and freenet-ext.jar∞
Create a file called runme.sh containing:
#!/bin/bash
# My First Starting Freenet with Free Java VM Script
# By nico <nico@thenico.fr.eu.org>
# This script is in public domain (I do not own copyright nor anything to that)
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar freenet.node.Node
exit
Do chmod +x ./runme.sh
Fire on with ./runme.sh
Find some friend
Welcome to Freenet 0.7's Network !!
Edited on 2006-07-06 22:14:26 by ColinDavis
Additions:
~apt-get install libgnucrypto-java gij java-gcj-compat classpath-common classpath-common-unzipped libgcj-common classpath-tools
Locate your classpath.security by doing find / -name classpath.security
Deletions:
~apt-get install libgnucrypto-java gij java-gcj-compat classpath-common classpath-common-unzipped libgcj-common classpath-tools.
Locate your classpath.security by doing slocate classpath.security
Edited on 2006-06-03 19:01:49 by EthicalAnarhist [grammar 's']
Additions:
It is an unofficial script but it works very well !
Because many users use Sun Java VM
Deletions:
It is an unofficial script but it work very well !
Because many user use Sun Java VM
Edited on 2006-05-30 23:46:43 by DaveBaker [Add note about Classpath's insanely slow URI constructors.]
Additions:
Note that if you experience a long delay (5 or 10 seconds) before a Freesite page is sent to the browser, this is due to the fact that Classpath's URI constructor (used in the HTML content filter) is extremely slow (can take up to a couple of seconds for a single call). If / when a solution is found to this problem, or it resolved upstream, it will be reflected in this page.
Edited on 2006-05-22 15:56:58 by NicO [wrapper.jar's bug fixed, restore the old version]
Additions:
~1) Download freenet-cvs-snapshot.jar∞ and freenet-ext.jar∞
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar freenet.node.Node
Deletions:
~1) Download freenet-cvs-snapshot.jar∞, freenet-ext.jar∞ and wrapper.jar∞.
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar:wrapper.jar freenet.node.Node
Edited on 2006-05-20 19:30:16 by NicO [the wrapper.jar bug]
Additions:
~1) Download freenet-cvs-snapshot.jar∞, freenet-ext.jar∞ and wrapper.jar∞.
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar:wrapper.jar freenet.node.Node
Deletions:
~1) Download freenet-cvs-snapshot.jar∞ and freenet-ext.jar∞
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar freenet.node.Node
Edited on 2006-04-19 12:37:34 by NicO
Additions:
~1) After startup freenet throws the following exceptions forever: %%Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
Deletions:
~1) After startup freenet throws the following exceptions forever: %%Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
Edited on 2006-04-19 12:36:17 by NicO
Additions:
~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
INFO: Native BigInteger library jbigi not loaded - using pure java
~1) After startup freenet throws the following exceptions forever:
Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
~1) telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.SocketTimeoutException: Timeout)
~1) Throws the following on startup unless -Xmx256M is used:
Exception in thread "main" java.lang.OutOfMemoryError
- telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.SocketTimeoutException: Timeout)
- 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
Deletions:
~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
INFO: Native BigInteger library jbigi not loaded - using pure java
- After startup freenet throws the following exceptions forever:
Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
~1) telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.SocketTimeoutException: Timeout)
~1) Throws the following on startup unless -Xmx256M is used:
Exception in thread "main" java.lang.OutOfMemoryError
- telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.SocketTimeoutException: Timeout)
- 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
Edited on 2006-04-19 11:29:48 by NicO [:)]
Additions:
%%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
Deletions:
%%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
Edited on 2006-04-19 10:46:06 by NicO
Additions:
ERROR: The resource freenet/support/CPUInformation/libjcpuid-x86-linux.so was not a valid library for this platform
INFO: Native BigInteger library jbigi not loaded - using pure java
Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
...4 more
Bye... (java.net.SocketTimeoutException: Timeout)
Exception in thread "main" java.lang.OutOfMemoryError
at freenet.node.Node.main (Node.java:508)
java.lang.Error: java.security.NoSuchAlgorithmException: SHA-256
...4 more
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
at java.lang.reflect.Method.Invoke (Method.java)
Deletions:
ERROR: The resource freenet/support/CPUInformation/libjcpuid-x86-linux.so was not a valid library for this platform
INFO: Native BigInteger library jbigi not loaded - using pure java
Caught java.lang.RuntimeException: java.net.SocketException: Unsupported address family
...4 more
Exception in thread "main" java.lang.OutOfMemoryError
java.lang.Error: java.security.NoSuchAlgorithmException: SHA-256
...4 more
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
at java.lang.reflect.Method.Invoke (Method.java)
Edited on 2006-04-19 09:38:41 by NicO
Additions:
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
Edited on 2006-04-19 09:28:13 by NicO
Additions:
At least gij 4.1 with classpath 0.90 and gnu-crypto 2.0.1.
If you use debian or ubuntu, you can try:
Deletions:
At least gij 4.0 (and it wrapper) with gnu-crypto 2.0.1.
If you use debian or ubuntu, try:
Edited on 2006-04-19 09:11:16 by NicO
Additions:
~1) DataStore Limit !∞
Edited on 2006-04-17 14:10:05 by TimoLindfors [add ikvm]
Additions:
ikvm
- 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.
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 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)
Oldest known version of this page was edited on 2006-04-17 14:01:51 by TimoLindfors [MyHowto]
Page view:
Installing Freenet 0.7 on 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.
What is required ?
At least gij 4.0 (and it wrapper) with gnu-crypto 2.0.1.
If you use debian or ubuntu, try:
apt-get install libgnucrypto-java gij java-gcj-compat classpath-common classpath-common-unzipped libgcj-common classpath-tools.
What do you have to do ?
- Locate your classpath.security by doing slocate classpath.security
- Add to this file:
security.provider.2=gnu.crypto.jce.GnuCrypto
security.provider.3=gnu.javax.crypto.jce.GnuSecurity
- Create somewhere a directory named freenet07
- Download freenet-cvs-snapshot.jar∞ and freenet-ext.jar∞
- Create a file called runme.sh containing:
#!/bin/bash
# My First Starting Freenet with Free Java VM Script
# By nico <nico@thenico.fr.eu.org>
# This script is in public domain (I do not own copyright nor anything to that)
gij -cp /usr/share/java/javax-security.jar:/usr/share/java/javax-crypto.jar:/usr/share/java/gnu-crypto.jar:freenet-ext.jar:freenet-cvs-snapshot.jar freenet.node.Node
exit
- Do chmod +x ./runme.sh
- Fire on with ./runme.sh
- Find some friend
- Welcome to Freenet 0.7's Network !!
I want Freenet start when my Linux boot
If you use debian, ubuntu or gentoo, you can use
this init.d script∞.
It is an unofficial script but it work very well !
It doesn't work ...
Complain to nextgens :)
Why it is so hard ?
Because many user use Sun Java VM
I found a bug that do not exist with Sun Java VM ...
Fill a bug report∞.
Please set
Category to
freejvms.
I got Exception in thread "main" java.lang.NoClassDefFoundError: freenet.node.Node
I think that freenet-cvs-snapshot.jar has been renamed to freenet-r
something-snapshot.jar.
Please rerename this file :)
Freenet 0.7 with other free virtual machines
Kaffe
- 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
- 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
- /, /plugins, /config, /darknet and index freesite seem to work.
- telnet localhost 2323 works. "STATUS" lists both CONNECTED and DISCONNECTED nodes.
- tcpdump shows both incoming and outgoing udp traffic.
jamvm
- freenet does not throw any exceptions on startup.
- / and /plugins/ load correctly but /config/, /darknet/ or index freesite don't respond.
- jamvm does not die with ctrl-c.
- telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.
SocketTimeoutException: Timeout)
- tcpdump shows both incoming and outgoing udp traffic.
cacao
- 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)
- /, /plugins and /darknet responds but /config and index freesite don't. /darknet shows both CONNECTED and DISCONNECTED nodes.
- telnet localhost 2323 lists possible commands but then disconnects immediately and the following is printed to stdout:
Bye... (java.net.
SocketTimeoutException: Timeout)
- tcpdump shows both incoming and outgoing udp traffic.
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.