# FreeBSD + Jails + Deluge = Trouble



## VoX (May 7, 2012)

Hello, 

I have a problem using deluge in a jail with freebsd FreeBSD. I installed deluge with the ports system. When *I* launch deluged (daemon deluge), the daemon starts correctely with no error, but stops immediately and generates a python.2.7.core of about 30 MB. I can't read the python.2.7.core, I don't know how to do it because it's not a text file. 

I have absolutly no problem using deluged in the real system (not in a jail), by this way everything works properly. *I* have no problem with my jail, *I* can use web services, and other services, all ports are redirected correctly in packet filter, etc. *E*verything ok. Python works properly in a jail too. *I*f i use it manua*l*ly and try some basic commands, it's ok.

But nothing works when *I* start deluged in FreeBSD jails. *I* try to launch deluged with debug level mode and sent the log to a file, everything is ok with no error, but deluged stops itself automatical*l*y 1 or 2 seconds after starting and generates this python.2.7.core.

Does anyone have an idea about what is going on? *W*hy does it start and work properly in a real freebsd FreeBSD system, but not in a jail?

I'm really hoping *I* will be able to use it in a jail.

Thanks for your help


----------



## rpglover64 (Dec 12, 2012)

I'm having the same problem. I haven't solved it yet, but I've made some progress; and long story short, I think it's the result of a misconfigured jail.

I will tell my narrative under the assumption that it lines up with yours; if it doesn't, please point out the differences. When I run *deluged*, it exits and generates a file called python2.7.core. This file is a core dump, which results from a crash within the C or C++ portion of the application. Running *gdb /usr/local/bin/python2.7 -c python2.7.core* and typing *bt* in the resulting prompt yields this backtrace, in which, notably, the last function called was "libtorrent::enum_net_interfaces".


----------



## rpglover64 (Dec 12, 2012)

Upon further investigation, I found this bug report. It appears that the bug has been patched in the later versions of libtorrent 0.16, which Deluge does not use, and in the 0.15 RC version, which isn't the version packaged in FreeBSD (and I don't think it's a coherent released version).


----------



## rpglover64 (Dec 13, 2012)

*Eureka!*

I've solved the problem (whether this is the best solution remains to be seen...) with the help of this post. I had to add the patch mentioned in the bug report, extracted here to the files directory (which I had to create) in my /usr/ports/net-p2p/libtorrent-rasterbar-15 directory in my jail's ports tree (well, technically in the ports tree in the basejail directory, since I'm using ezjail, but it's morally the same).

Hope this helps.


----------



## bbzz (Dec 13, 2012)

Any reason why you use that and not transmission? Works very well jailed and with transmission-remote.


----------



## SirDice (Dec 13, 2012)

bbzz said:
			
		

> Any reason why you use that and not transmission? Works very well jailed and with transmission-remote.



On my server I use net-p2p/transmission-daemon. I've found this add-on for Firefox works really well too. Plugin should work on Windows (7), OS-X and FreeBSD.

https://addons.mozilla.org/en-us/firefox/addon/add-to-transmission/


----------



## bbzz (Dec 13, 2012)

Yeah that's what I was trying to refer to;
transmission-daemon + transmission-remote for ultimate console sex.
It handles a large number of simultaneous torrents quite well.


----------



## kpa (Dec 13, 2012)

bbzz said:
			
		

> Yeah that's what I was trying to refer to;
> transmission-daemon + transmission-remote for ultimate console sex.
> It handles a large number of simultaneous torrents quite well.



Don't forget the WEB UI, www/transmission-web. If you prefer a GUI over terminal that is.


----------

