# Freenet broke in portage?

## zephirus

I wanted to check out freenet - concept seems interesting and though I hear it is slow, RIAA & MPAA can't really do anything about it...

Only thing is, I can't get it to start! I run it and get an '[ok]' but it never starts...

'/etc/init.d/freenet start' shows

```
# /etc/init.d/freenet start

 * Starting Freenet now...                                                [ ok ]
```

'freenet.stderr.log' shows

```
Opening log file failed!

ERROR: Resource name [freenet/support/CPUInformation/libjcpuid-x86-linux.so] was not found

WARN: Native CPUID library jcpuid not loaded - will not be able to read CPU information using CPUID

NOTICE: Resource name [net/i2p/util/libjbigi-linux-none.so] was not found

INFO: Native BigInteger library jbigi not loaded - using pure java

Exception in thread "main" java.lang.NullPointerException

        at freenet.support.LoggerHookChain.setThreshold(LoggerHookChain.java:96)        at freenet.support.LoggerHook.setThreshold(LoggerHook.java:111)

        at freenet.Core.setupLogger(Core.java:841)

        at freenet.node.Main.main(Main.java:447)

```

'/etc/init.d/freenet stop' shows

```
# /etc/init.d/freenet stop

 * Stopping Freenet...

start-stop-daemon: warning: failed to kill 1970: No such process          [ !! ]
```

Any suggestions?

----------

## zephirus

Okay, if I sudo into the freenet user, and run the start-freenet.sh script after exporting the variables it works. 

If I run '/etc/init.d/freenet start' as root, ps shows it starting the server with the appropriate command, so the export works, but then the processes crap out with a freenet.stderr.log that looks like:

```

Opening log file failed!

ERROR: Resource name [freenet/support/CPUInformation/libjcpuid-x86-linux.so] was not found

WARN: Native CPUID library jcpuid not loaded - will not be able to read CPU information using CPUID

NOTICE: Resource name [net/i2p/util/libjbigi-linux-none.so] was not found

INFO: Native BigInteger library jbigi not loaded - using pure java

Exception in thread "main" java.lang.NullPointerException

        at freenet.support.LoggerHookChain.setThreshold(LoggerHookChain.java:96)        at freenet.support.LoggerHook.setThreshold(LoggerHook.java:111)

        at freenet.Core.setupLogger(Core.java:841)

        at freenet.node.Main.main(Main.java:447)

```

when I run it manually under either root or freenet users the log looks like

```

ERROR: Resource name [freenet/support/CPUInformation/libjcpuid-x86-linux.so] was not found

WARN: Native CPUID library jcpuid not loaded - will not be able to read CPU information using CPUID

NOTICE: Resource name [net/i2p/util/libjbigi-linux-none.so] was not found

INFO: Native BigInteger library jbigi not loaded - using pure java

```

Any ideas?

----------

## NeddySeagoon

zephirus,

The ebuild was broken last time I tried. Its easy to install without the ebuild, since its a Java app.

I found it wanted about 150 threads so it will really benefit from USE="nptl".

It speeds up with use but you need it  up 24/7 so you can run a persistant node.

----------

## zephirus

NeddySeagoon:

Thanks, I might look into that, but I would rather get the one from portage working... seems like a fun challange. Also, a fix would be nice for a bug report.

----------

## strnger

 *zephirus wrote:*   

> 
> 
> Only thing is, I can't get it to start! I run it and get an '[ok]' but it never starts...
> 
> 

 

   I'm having the exact same issues.   Have you had any luck resolving them?

----------

## salahx

Actually, I believe the problem is sudo: See Bug 71835, where I posted the fix.

----------

## paulbiz

Just download the files from the freenet website, edit the config file and use the shell script to start & update it. It doesn't need to "install" any files anywhere and works fine without using portage.  Be sure to read the docs on security recommendations (basically run freenet software under it's own user, browse freenet from yet another user and block that user at the firewall from accessing anything other than localhost just in case the freenet software has any security holes).

When I tried it, it seemed like it is best suited to be a text-based WWW. The way it works makes large files (and even JPG's) somewhat too bulky to deal with reliably. If you want to download an MP3 it could take hours, if you're able to get the entire thing at all. It's designed with anonymity in mind, not fast access to files. Every little 16k chunk of a file you download is being routed through dozens of different nodes, so any of them could be slow or dead and this causes you to have to retry things zillions of times before (or if) they finally make it through. Plus a lot of the "Freesites" require the publishers to re-upload the files on a daily basis, so if they don't, the site is inaccessible.

If you're wanting to plot a coup or trade state secrets, whistleblowing etc it seems like a place you can go.  If you're wanting to download warez, movies, mp3's then it'll disappoint you.

----------

## Mindphaser

Possible Solution: i edited the /etc/init.d/freenet file

find this line:

CLASSPATH=/usr/lib/freenet/freenet.jar...

and replace with:

CLASSPATH=/usr/lib/freenet/freenet.jar:/var/freenet/distrib/freenet-ext.jar:$CLASSPATH

so the error messages in the stderr.log are history

i hope it helps someone  :Smile: 

----------

