Apeman
Posts: 2
Joined: Sun Mar 24, 2013 1:18 pm

Re: Tests wanted: Tor, Freenet & I2P

Thu Dec 12, 2013 8:36 pm

unclejed613 wrote:i just saw this this, hope it helps:
http://blog.icewheel.org/2013/03/raspbe ... -home.html
Unfortunately the thread behind your link is unrelated to our problem.

We have problems getting the client to the p2p-darknet/opennet called "freenet" (see http://www.freenetproject.org) to work. Your link has something to do with an IP6 service provided by the gogoNet company. Unfortunately the latter is also called freenet.

Anyway, thank you for trying to help us out.

bigobelix
Posts: 1
Joined: Tue Jan 07, 2014 5:44 pm

Re: Tests wanted: Tor, Freenet & I2P

Tue Jan 07, 2014 5:48 pm

Freenet OK

# 2013-12-20-wheezy-raspbian.img
sudo apt-get update
sudo apt-get upgrade
sudo apt-get xrdp #(Windows-Remote raspberrypi)
sudo apt-get mc #(I love mc & Total Commander)
sudo raspi-config # set overclocking 800MHz, memory 16MB, password, language etc.

mkdir ~/Downloads
cd ~/Downloads

# Download Oracle JDK 1.8.0 and extract e.g. to /opt
http://www.java.net/download/jdk8/archi ... 013.tar.gz
sudo tar zxvf jdk-8-ea-b121-linux-arm-vfp-hflt-19_dec_2013.tar.gz -C /opt

# Download apache-ant and extract to /opt/jdk1.8.0/
wget http://mirror.dkd.de/apache//ant/binari ... bin.tar.gz
sudo tar zxvf apache-ant-1.9.3-bin.tar.gz -C /opt/jdk1.8.0/

# Set JAVA_HOME and PATH, make sure this is set every time you do a build
export JAVA_HOME=/opt/jdk1.8.0/
export PATH=$JAVA_HOME/bin:$PATH
export ANT_HOME=/opt/jdk1.8.0/apache-ant-1.9.3/
export PATH=$ANT_HOME/bin:$PATH

# check
java -version
ant -version

wget http://sourceforge.net/projects/wrapper ... src.tar.gz
tar zxvf wrapper_3.5.23_src.tar.gz
cd wrapper_3.5.23_src
./build32.sh

wget https://freenet.googlecode.com/files/ne ... e_1457.jar -O new_installer_offline.jar
java -jar new_installer_offline.jar

cd ../../Freenet
./run.sh start # <-- Segmentation fault

cp ~/Downloads/wrapper_3.5.23_src/bin/wrapper ~/Freenet/bin/wrapper-linux-armhf-32
cp ~/Downloads/wrapper_3.5.23_src/lib/libwrapper.so ~/Freenet/lib/libwrapper-linux-armhf-32.so
cd ~/Downloads/wrapper_3.5.23_src/build/classes/
jar cf wrapper.jar org
cp wrapper.jar ~/Freenet/
cd ~/Freenet
./run.sh start :))

Basil_R
Posts: 16
Joined: Sun Oct 06, 2013 9:38 pm

Re: Tests wanted: Tor, Freenet & I2P

Sun Feb 09, 2014 1:52 pm

bigobelix

Thanks for the well laid out instructions, which as something of a noob, appeared to go well. For other noobs i would suggest adding a line under the "java -jar new_installer_offline.jar" instruction to change the default directory to /home/pi/Freenet (or maybe that is obvious for most!).

Unfortunately when Freenet tries to start, the JVM has 5 attemps to load, but fails. The following text is from the wrapper.log in DEBUG mode (i have removed the timestamps to save space):-

JVM did not exit on request, termination requested.
Signal trapped. Details:
signal number=17 (SIGCHLD), source="unknown"
Received SIGCHLD, checking JVM process status.
VM received a signal SIGKILL (9).
JVM process is gone.
JVM process exited with a code of 1, setting the wrapper exit code to 1.
JVM exited after being requested to terminate.
Preparing to restart with mode 2.
JVM was only running for 30 seconds leading to a failed restart count of 2.
Waiting 5 seconds before launching another JVM.
Reloading Wrapper configuration...
Working directory set to: /home/pi/Freenet/bin
Working directory set to: /home/pi/Freenet
Working directory set to: /home/pi/Freenet
Unable to resolve the real path of wrapper.java.command as a relative reference: java
Attempt to locate wrapper.java.command on system PATH: java
Resolved the real path of wrapper.java.command from system PATH: /opt/jdk1.8.0/bin/java
Magic number for file /opt/jdk1.8.0/bin/java: 0x7f454c46
Command[0] : /opt/jdk1.8.0/bin/java
Command[1] : -Dnetworkaddress.cache.ttl=0
Command[2] : -Dnetworkaddress.cache.negative.ttl=0
Command[3] : -Djava.net.preferIPv4Stack=true
Command[4] : -Xms60m
Command[5] : -Xmx128m
Command[6] : -Djava.library.path=lib
Command[7] : -classpath
Command[8] : wrapper.jar:bcprov-jdk15on-149.jar:freenet-ext.jar:freenet.jar
Command[9] : -Dwrapper.key=kyWnn-b6FhZHbXQ1
Command[10] : -Dwrapper.backend=pipe
Command[11] : -Dwrapper.debug=TRUE
Command[12] : -Dwrapper.disable_console_input=TRUE
Command[13] : -Dwrapper.pid=1846
Command[14] : -Dwrapper.version=3.5.23
Command[15] : -Dwrapper.native_library=wrapper
Command[16] : -Dwrapper.arch=armhf
Command[17] : -Dwrapper.ignore_signals=TRUE
Command[18] : -Dwrapper.service=TRUE
Command[19] : -Dwrapper.cpu.timeout=10
Command[20] : -Dwrapper.jvmid=3
Command[21] : freenet.node.NodeStarter
Command[22] : freenet.ini
Startup Timeouts: wrapper.startup.timeout=30, wrapper.startup.delay.console=0,
wrapper.startup.delay.service=0, wrapper.restart.delay=5
Ping settings: wrapper.ping.interval=5, wrapper.ping.interval.logged=1,
wrapper.ping.timeout=30, wrapper.ping.alert.threshold=7
Shutdown Timeouts: wrapper.startup.timeout=30, wrapper.shutdown.timeout=120,
wrapper.jvm_exit.timeout=10, wrapper.jvm_cleanup.timeout=10, wrapper.jvm_terminate.timeout=170
socket not open, so packet not sent LOGFILE : wrapper.log
active log file changed: wrapper.log
Launching a JVM...
Startup failed: Timed out waiting for a signal from the JVM.


Have you or anybody else had this issue? And if so is there a workaround?

Thanks Baz

Basil_R
Posts: 16
Joined: Sun Oct 06, 2013 9:38 pm

Re: Tests wanted: Tor, Freenet & I2P

Sun Oct 19, 2014 4:44 pm

So I've come back to this project after some time, and following the purchase of a Raspberry Pi model B+ (not that the B+ makes any difference to these instructions). However this new Pi is only going to act as a TOR proxy (courtesy of Adafruit's excellent instuctions, https://learn.adafruit.com/onion-pi/overview) and the Freenet node to leave as much resource for the JVM.

A big thanks to bigobelix, because those instructions still form the core of the Freenet installation on the Pi. I am still very much a noob and I am writing these instructions for fellow Pi fans who are also far from Linux experts (so other more experienced users will be bored!).

To start I am assuming that the Pi is up and running with a static IP address, and in my case I am accessing it from my Windows machine via Putty & WinSCP. Because I am more familiar with a Windows box i grab the downloads from the following sites:-

http://www.java.net/download/jdk8/archi ... 013.tar.gz
http://www.mirrorservice.org/sites/ftp. ... bin.tar.gz
http://en.sourceforge.jp/projects/wrapp ... rc.tar.gz/

The last two are more recent than those in the bigobelix post. Ok, back to Putty and

Code: Select all

mkdir ~/Downloads
cd ~/Downloads
Using WinSCP transfer the three downloaded files from the Windows folder to /home/pi/Downloads, then:-

Code: Select all

sudo tar zxvf jdk-8-ea-b121-linux-arm-vfp-hflt-19_dec_2013.tar.gz -C /opt
sudo tar zxvf apache-ant-1.9.4-bin.tar.gz -C /opt/jdk1.8.0/

# Set JAVA_HOME and PATH, make sure this is set every time you do a build
export JAVA_HOME=/opt/jdk1.8.0/
export PATH=$JAVA_HOME/bin:$PATH
export ANT_HOME=/opt/jdk1.8.0/apache-ant-1.9.4/
export PATH=$ANT_HOME/bin:$PATH

# check
java -version
ant -version

tar zxvf wrapper_3.5.25_src.tar.gz
cd wrapper_3.5.25_src
./build32.sh

wget 'https://freenetproject.org/jnlp/freenet_installer.jar' -O new_installer_offline.jar
java -jar new_installer_offline.jar -console # At the date of this post the installer was version 1465
I included the -console argument to the java command because you can then choose where to install freenet. In my case this was /home/pi/Freenet

Code: Select all

cd ../../Freenet
./run.sh start # <-- Segmentation fault

cp ~/Downloads/wrapper_3.5.25_src/bin/wrapper ~/Freenet/bin/wrapper-linux-armhf-32
cp ~/Downloads/wrapper_3.5.25_src/lib/libwrapper.so ~/Freenet/lib/libwrapper-linux-armhf-32.so
cd ~/Downloads/wrapper_3.5.25_src/build/classes/
jar cf wrapper.jar org
cp wrapper.jar ~/Freenet/
cd ~/Freenet
./run.sh start
This is the end of the bigobelix Freenet node installation. Daft is it sounds I didn't know how to connect from a remote machine to the Pi node, so for the benefit of others the following pulls together my research:-

First thing is to ammend the freenet.ini file in the /home/pi/Freenet folder. This can only be done when Freenet isn't running, so

Code: Select all

./run.sh stop # should see Freenet exit
The next step assumes a basic understanding of the nano editor (there are plenty of resources on the net to explain how). WinSCP can also be used as an editor by double clicking the file.

Code: Select all

sudo nano freenet.ini # and change the following as:-

fproxy.allowedHosts=127.0.0.1,192.168.x.0/255.255.255.0,0:0:0:0:0:0:0:1
fproxy.bindTo=127.0.0.1,192.168.x.yy,0:0:0:0:0:0:0:1
fproxy.allowedHostsFullAccess=127.0.0.1,192.168.x.0/255.255.255.0,0:0:0:0:0:0:0:1

fcp.allowedHosts=127.0.0.1,192.168.x.0/255.255.255.0,0:0:0:0:0:0:0:1
fcp.bindTo=127.0.0.1,,0:0:0:0:0:0:0:1
fcp.allowedHostsFullAccess=127.0.0.1,192.168.x.0/255.255.255.0,0:0:0:0:0:0:0:1
The 192.168.x.0/255.255.255.0 allows access to any user on your network, change the 'x' to suit your own network. In my case this would be 0.
The 192.168.x.yy is the address of the Raspberry Pi on your network, change the 'x' & 'yy' to suit. I have no intention of accessing the node from outside my LAN so haven't investigated router port forwarding or any security issues associated with it.

Save the edited freenet.ini and restart Freenet

Code: Select all

./run.sh start
Back at the remote machine start your browser in private viewing window (I use Firefox) and put 192.168.x.yy:8888 into the address bar (the URL to match the Pi's IP address). If everything has gone correctly you should now see the Freenet opening page.

The changes made to the fcp settings in freenet.ini should allow the remote connection of Frost and Fuqid. In both packages the settings will need to be amended to the Pi's IP address rather than local.

At the time of writing there appear to be two performance issues, with the following an extract from the wrapper.log:-

INFO | wrapper | 2014/10/19 16:23:37 | Wrapper Process has not received any CPU time for 29 seconds. Extending timeouts.
STATUS | wrapper | 2014/10/19 16:24:36 | Pinging the JVM took 16 seconds to respond.
STATUS | wrapper | 2014/10/19 16:25:01 | Pinging the JVM took 8 seconds to respond.
STATUS | wrapper | 2014/10/19 16:27:41 | Pinging the JVM took 14 seconds to respond.
STATUS | wrapper | 2014/10/19 16:28:36 | Pinging the JVM took 24 seconds to respond.
INFO | wrapper | 2014/10/19 16:28:36 | Wrapper Process has not received any CPU time for 25 seconds. Extending timeouts.
STATUS | wrapper | 2014/10/19 16:30:07 | Pinging the JVM took 14 seconds to respond.
STATUS | wrapper | 2014/10/19 16:31:52 | Pinging the JVM took 13 seconds to respond.
STATUS | wrapper | 2014/10/19 16:32:34 | Pinging the JVM took 16 seconds to respond.
STATUS | wrapper | 2014/10/19 16:33:45 | Pinging the JVM took 12 seconds to respond.
STATUS | wrapper | 2014/10/19 16:34:30 | Pinging the JVM took 11 seconds to respond.
STATUS | wrapper | 2014/10/19 16:35:36 | Pinging the JVM took 12 seconds to respond.


And the following from freenet-latest.log:-

Oct 19, 2014 15:36:19:939 (freenet.node.RequestTag, Slow callback for [email protected](5066), WARNING): Removing wrong node or removing twice? on [email protected]:[email protected]@[email protected]: debug
at freenet.node.UIDTag.removeRoutingTo(UIDTag.java:167)
at freenet.node.PeerNode.noLongerRoutingTo(PeerNode.java:5376)
at freenet.node.RequestSender.finish(RequestSender.java:1614)
at freenet.node.RequestSender.access$700(RequestSender.java:61)
at freenet.node.RequestSender$7.blockReceived(RequestSender.java:1170)
at freenet.io.xfer.BlockReceiver.complete(BlockReceiver.java:463)
at freenet.io.xfer.BlockReceiver.access$1400(BlockReceiver.java:75)
at freenet.io.xfer.BlockReceiver$3.onMatched(BlockReceiver.java:314)
at freenet.io.comm.MessageFilter$3.run(MessageFilter.java:423)
at freenet.support.PooledExecutor$MyThread.innerRun(PooledExecutor.java:248)
at freenet.support.PooledExecutor$MyThread.realRun(PooledExecutor.java:188)
at freenet.support.io.NativeThread.run(NativeThread.java:129)


I haven't come across easy to understand guidance on either so far, however Freenet continues to work

I have changed / added the following to the wrapper.conf file:-

Code: Select all

wrapper.java.maxmemory=512
wrapper.ping.timeout=30
wrapper.cpu.timeout=20
Not certain if this has had much effect, but it hasn't made it worse!

I've put this together just 24 hours after completing the install but I may have missed something or included typos, so any feedback would be valued.

Cheers Baz

Return to “General discussion”