Enter The Freenetrix
The Freenet Help Site
Enter The Freenetrix
Licences used on this wiki
Welcome admin to Freenet WikiServer
Edit Page - Diff - Revisions - Title Search - Preferences - Bottom
 
TOP TEN PROBLEMS & SOLUTIONS






RNF and other error-messages


"I can't get connected! I always get an RNF or other error-message, what must I do?"


  • Unlike most P2P systems, fred takes some time to get integrated in the network before it is fully functional.

At first, you will see a lot of RNF (Route Not Found) or other error messages, such as that it couldn't connect to the network, or didn't find any nodes, etc.


Apart from being NATted (Network Address Translation - i.e. unable to recieve incoming connections because you haven't forwarded your listenPort, see discussion in Transient Vs Non Transient) or possible problems with the settings of your firewall, the most likely cause, especially when the tray-bunny (in Windows) turned blue just fine is that your node is just too new and needs to get integrated into the network. The best way to do this is just wait, and make requests e.g. by periodically refreshing the first Web Interface page. Slowly your node will become better connected, which can be seen by the appearance of activelinks on the web interface or other pages, or by the percentage on the load-bar.

It usually takes around 2-3 hours before your node becomes responsive enough to start browsing the network. Full integration (and speed) is only achieved after 48 hours, probably less if you have a particularly fast Internet connection. The 0.7 version should work faster.



Freezing of your Internet Connection



"I'm experiencing the following problem with Freenet :


After some uptime, Freenet usually freezes my internet connection. Neither Freenet nor other applications send or receive any data anymore."



  • This is often caused by your router or DSL modem being unable to handle sufficient simultaneous connections. Freenet uses a lot more TCP connections than most other software.


Try adding the line:


maxNodeConnections=100


to your freenet.conf (or freenet.ini) file and restart freenet. (Currently the default is 200.)


Decrease the number until you stop experiencing 'connection freezing' problems.


Alternatively, buy a better router ;^) or if you have an old PC lying around and are a bit geeky you might consider putting it in bridge mode, turning off NAT and installing Smooth Wall or similar to handle the NAT etcetera instead. I haven't actually tried this but in theory it should take the load off your router and make it work better with many connections.




Problems installing Freenet on Linux



"I'm a Linux/Unix newbie but want to install and have freenet started as a daemon at system-boot time. (Runlevel 3+5). I tried some stuff, but still failed to get it to work.


There seems to be at least 2 problems left:


1. I installed (unpacked) freenet to a DATA Volume (partition) like /vol1/freenet and configured it to have any required directories for storage and temp etc below that base-directory /vol1/freenet.


2. Java runtime is installed and after a real User-login ($PATH extension is set within /etc/profile) it can be accessed directly by entering "java" at the console prompt.


3. while PWD is /vol1/freenet i can type "sh start-freenet.sh" and freenet will fire up as expected.


4. however, if i try to do all that within a RUNLEVEL Script it will fail! Either there is no JAVA found OR if i extended the $PATH variable for JAVA binaries within the Start-Script it wont find the corresponding freenet files like the freenet.jar and so on.


So does anybody know how to get that thing up working ??"


  • The "Dirty" Solution For Dummies and anybody with the same problem:


Example: System is a Su SE 9.0 Pro Linux. Target is to install and config FREENET the way that it will start up automaticly at System-Boot time using RUNLEVEL scripts.



Things to do:


1. Make sure you actually have the Java JRE installed, Sun's is recommended.


You should probably use whatever is currently stable although quite a few people have found the currently beta 1.5b2 release to have less bugs and be faster.


2. Install FREENET (unpack it somewhere) e.g. "/freenet"


3. edit the included Freenet START-Script and insert these two lines at the


beginning:



~~~~~~~~~~~~~~~~~~~~~


#!/bin/sh



export PATH=$PATH:/usr/lib/Sun Java 2-1.4.2/jre/bin/ <<< NEW LINE TO INSERT!



cd /freenet <<< NEW LINE TO INSERT!



  1. Check to see whether we use echo -n or echo "\c" to suppress newlines.

.


.


.


~~~~~~~~~~~~~~~~~~~~~



1st Line will extent the PATH enviroment Variable to inclusde the JAVA executables. This is however, NOT default in the Su SE 9.0 distribution!


2nd Line just changes PWD to freenet home. seems freenet and java needs that to find anything.



4. create a new RUNLEVEL scriptfile


(e.g. 'cp /etc/init.d/skeleton /etc/init.d/freenet)



5. edit this file and make it look like this:


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


#! /bin/sh


#


  1. /etc/init.d/freenet

  1. and its installation under /freenet

#


      1. BEGIN INIT INFO

  1. Provides: freenet

  1. Required-Start: $local_fs $remote_fs $network

  1. Required-Stop: $local_fs $remote_fs $network

  1. Default-Start: 3 5

  1. Default-Stop: 0 1 2 6

  1. Short-Description: freenetproject.org node/proxy software

      1. END INIT INFO




case "$1" in


start)


echo -n "Starting freenet "


sh /freenet/start-freenet.sh


;;


stop)


echo -n "Shutting down freenet "


sh /freenet/stop-freenet.sh


;;


restart)


    1. Stop the service and regardless of whether it was

    1. running or not, start it again.

$0 stop


$0 start


;;


  • )

echo "Usage: $0 {start |stop |restart}"


exit 1


;;


esac


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



6. let "chkconfig" start the script at the default runlevels for network


services 3+5 by entering "chkconfig freenet on"



On Gentoo Linux, if you used the supplied ebuild all you should have to do is rc-update add freenet default to add it to the default runlevel. See the Newbie Start Guide Unix page for further explanation.



Problems running on OSX (and FreeBSD, possibly others)



"I have problems, including Kernel Panics, when I use Freenet on OSX, what should I do?"



  • Chances are, you are using JVM 1.4.2. There are reports of some major errors on OSX and BSD when running JVM 1.4.2.

Some Linux distro's may also suffer from this problem, but it is quite rare.


If you experience any difficulties, you can either try/revert to JVM 1.4.1, or, which is currently recommended, try Suns' latest JVM version (1.5.x) and see if that solves the problem.




The JVM keeps crashing on startup after having worked fine for ages, what can I do?


OK, maybe this only happened to me because I haven't seen any posts about it but I suspect not :)


My experience was in GNU/Linux (although AFAICS this could happen in Windows also) so suggestions will be orientated for that OS.



Symptoms were as follows : nearly all the time the JVM would die with SIGSEGV during startup or shortly after starting running, very occassionally it would get through this initial "danger period" and then work for extended periods of time, but it was a huge pain restarting it a million times to achieve this.


  • The first thing to recognise is that this is Sun's fault (assuming you're using Sun's JVM, which is recommended currently) because the JVM should never actually crash. So don't
complain about it on the Freenet mailing lists :)


  • Secondly look at your extensive collection of hs_err_pid... crash dumps in the Freenet
directory (does Windows make these?), are they all random looking crashes in different functions or in many cases just addresses with a 'cannot resolve symbol'?


If so (mine were) what you're seeing are very probably a sort of OOM (Out Of Memory) error, even though you don't actually see a OutOfMemoryException. Why has it started happening all of a sudden when it worked fine for ages? Probably because your datastore has filled up so your node has much more data to index and track, and maybe the seednode file has got bigger ...


I'm guessing here, you would have to ask someone with knowledge of Freenet internals to be sure.


  • Anyway, going off this assumption you should try to i. give the JVM more memory and ii. make it use less memory. Have a look at the "Memory Issues" section of Maintaining Permanent Nodes. The key things are to increase the maximum memory pool to as much as you can whilst leaving slack for JVM overhead and OS usage - this minimal Linux install works well with >=50 MB spare, recent Windows no doubt would need considerably more - with the -Xmx flag, and if you have at least 256 MB RAM add -XX:+AggressiveHeap (it won't let you turn it on otherwise.)

I recommend you add the -server flag also, ignore what it says in the comments about it causing crashes; this significantly optimises memory use in long-running server applications which is exactly what Freenet is, and should improve performance considerably. However I don't know if this actually reduces memory usage. You might also want to set -XX:MaxDirectMemorySize to some semi-conservative value less than your max memory pool size.



For reference, here is my current Freenet-running line :


nice java -server -Xms150000K -Xmx276480K -XX:+AggressiveHeap -XX:MaxDirectMemorySize=140000K freenet.node.Main "$@" &


(I used to advocate removing the "nice" too, but I have found more recently that even on a dedicated node 'nice' stops freenet from grabbing too much CPU for its own good and causing insane system load. Admittedly my freenet box is not very powerful but still, I'd leave it in.)


  • Oh, and perhaps it's obvious but installing more RAM really does help a lot ;) I recently added some more to this node (it was already running OK but thrashing the disks a bit) and my success probability instantly jumped about 0.1 or more across the board.


  • In a similar vein, remove any unncessary services and startup programs to free more memory for Freenet. This is a good idea for general performance / security reasons anyway.

  • If you suspect the OOM is happening due in part to a huge seednodes file just delete or rename it; reseeding usually isn't neccessary anyway, unless your node has been offline for a considerable time it won't even do it. Semi-permenant node operators should in theory only have to seed the first time and maybe after a full network reset (which rarely happen.)

  • You may want to see if using the newer 1.5 JVM helps, which confusingly is now called Java 5.0. Personally I've used it for quite a while if you include the beta versions and it seems to work better, others have reported similar positive experiences. Get it from : http://java.sun.com/j2se/1.5.0/download.jsp (you only need the JRE unless you want to develop Java apps.)

  • Try and reduce your node's memory demands by editing freenet.conf / freenet.ini ... parameters likely to have

an impact include :


maxNodeConnections (default is 200)


maximumThreads (default is 120)


tfAbsoluteMaxThreads (default is 400, I think)



Be cautious changing (decreasing) any of these since it's a tradeoff and you can cripple your node with poor values, for example I have increased maximumThreads to 150 and find it significantly improves performance (less artificial "load due to thread limit.") The main one to try lowering is maxNodeConnections since it effects many other things. Again however be sensible, setting it too low will result in a node that might start but can't achieve anything once it has ... try 150, then 100 if that doesn't help.


Well, hopefully if anyone other than me encounters this situation you can now resolve it faster than I managed to; if you're still having problems try the Freenet support mailing list (http://news.gmane.org/gmane.network.freenet.support)



I am running a router/firewall; what must I do?


Your listenPort is the port Freenet listens on for incoming connections. The configuration tool will suggest a suitable random one, just accept it unless you know what you're doing. If you forgot the (randomnly chosen) portnumber, you can always find it back in the .ini file or on the webinterface on the servlet/nodeinfo/internal/env page, under transports, "Current IPv4 port".


If at all possible, your listenPort should be available from the outside. If you have a firewall or NAT blocking your connection, set up "port forwarding" and poke a hole in the firewall to let it through. See the instructions that came with your router, it's usually done through a nice web browser interface on consumer equipment and is fairly straightforward. This is not *strictly* neccessary now that Freenet has bidirectional (bidi) connections, but it could significantly help performance.


If you don't port forward, bidi connections means that you may still be able to become a useful member of the network by serving requests for nodes that you opened connections to. However, you may not, in practice, have the full benefits, as some nodes behind a closed router/firewall have suffered from detoriating connectivity.


If you DO port forward, then your node's IP address will be detected automatically and everything should just work. (What actually happens is that your node periodically updates a special Address Resolution Key or 'ARK' in freenet that other nodes retrieve to find your IP, cool huh? Personally I like to use a dynamic DNS service too as a backup, and set ipAddress= in freenet.conf/freenet.ini to my dynDNS hostname. Since ARKs were introduced this is no longer neccessary though.)


Automatic port forwarding is possible for some routers via UP&P but has not yet been implemented.


Freenet can't see my data store, but the files are still on the drive

http://127.0.0.1:8888/servlet/nodeinfo/internal/env you see that it has suddenly dropped in size. Looking at the folder for your data store (default for Windows is c:\program files\freenet\store ) you see the data store files are still present.


To restore your data store back to Freenet

  • Stop Freenet
  • Delete the index file in the data store folder
  • Restart Freenet

This was an issue on Windows XP SP2 running version 5096.


Problems with Freenet and fedora


"I try to use Freenet 5099 with Fedora Core 2 (2.6.8-1.521) but that seem not work."


There's two ways to install Java and Freenet, the Quick and Dirty way,

and the elegant way.


Elegant way:


I'm using Freenet with Fedora Core 2 and JPackage's Sun 1.5.0 JRE. Unfortunately, JPackage can't distribute binary RPMs of Sun's JREs, so you'll need to download the nosrc package from JPackage (www.jpackage.org/rpm.php?id=3089) and the jdk-1_5_0-linux-i586.bin file from Sun and rebuild the package manually. First, you'll need jpackage-utils.

Insert the following lines to yum.conf:


[jpackage15-generic]

name=JPackage 1.5, generic

gpgcheck=0


[jpackage15-fc2]

name=JPackage 1.5 for Fedora Core 2 baseurl=//http://mirrors.sunsite.dk/jpackage/1.5/fedora-2/free/

gpgcheck=0


Then install jpackage-utils with:

yum install jpackage-utils


To rebuild the JRE RPM, install the nosrc package (rpm -ivh java-1.5.0-1jpp.nosrc.rpm), put the dk-1_5_0-linux-i586.bin into

/usr/src/redhat/SOURCES/ and run the following command: rpmbuild -bb /usr/src/redhat/SPECS/java-1.5.0-sun.spec


After it's finished, install the JRE with:

rpm -Uvh /usr/src/redhat/RPMS/i386/java-1.5.0-sun-1.5.0-2jpp.i386.rpm


After that, it's relatively smooth sailing. Add the following lines to /etc/yum.conf:


name=Freenet

gpgcheck=0


Then, install the node with:

yum install fred fred-jbigi fec-native

set it to start automatically on reboot:

chkconfig --level 345 fred on

and start it with:

service fred start


Quick And Dirty:


Or, if you prefer to do things the Sun way, download and install Sun's 1.5.0 JRE RPM, then add the JRE (the JRE directory should be in /usr/java) bin directory to the path (a proper place to do that is /etc/profile.d/java.sh). Remember to set the java.sh as executable (chmod +x java.sh) and logout and login for the changes to work. Extract http://freenetproject.org/snapshots/freenet-latest.tgz to a suitable directory and run start-freenet.sh.




Problems running freenet and other P2P/online applications at the same time


"It seems like Freenet was messing my emule & torrent connections which started behaving strangely (low ids/extremely low DL's). But the listening port of my freenet node was nowhere near the emule's and torrent's ports. I could use some advice on how to remedy the situation with slowness and peaceful co-existence with p2p applications."



It may just be the sheer number of connections your computer has simultaneously open. Try editing your freenet config file to reduce the number of connections and see if that clears up your Bit torrent and Emule issues. That won't help your Freenet speed any, but it may let you run all three apps at once. Running Freenet 24/7 with half the connections is still better than at full speed only 1 hour a day.


Two lines you probably want to change are:

maxNodeConnections=60

rtMaxNodes=50


If the numbers are different from this example, just cut them almost in half and see if it works better.In this instance, try using 35 and 25 respectively.


Be sure to remove the # or % sign (if there is one) from the beginning of the line you change in the config file.


Also, it is a very good probability that Freenet is saturating your upstream bandwidth.


You may wish to change:

outputBandwidthLimit=0


change the 0 to 24000 or 12000 I suggest for your connection and amount of traffic

or use a traffic shaper like cfos. it gives the downstream a higher priority than the upstream


?