Installing sabnzbd on gentoo [updated to 0.5.6]

Feel free to talk about anything and everything in this board.

Installing sabnzbd on gentoo [updated to 0.5.6]

Postby kiorky » December 30th, 2009, 1:42 pm

Add the cryptelium overlay to have yenc, latest cherrypy and sabnzbd

GENTOO RELATED BUG: http://bugs.gentoo.org/show_bug.cgi?id=132590

Code: Select all
layman  -L -o  http://hg.cryptelium.net/hg/system/gentoo/overlay/raw-file/tip/layman.xml  -a cryptelium



Demask all neccessary stuff to use sabnzbd
Code: Select all
emerge -av sabnzbd



Edit configuration file to set/verify at least host, port, admin, password and api_key
Code: Select all
$EDITOR /etc/sabnzbd.conf


Check the directories are in place in /var/lib/sabnzbd
Code: Select all
ls /var/lib/sabnzbd/
admin  cache  complete  dirscan  download  nzb_backup  scripts


Start it
Code: Select all
/etc/init.d/sabnzbd restart

* Starting SABnzbd...                                                [ ok ]


Naviguate:

Code: Select all
firefox http://localhost:8080
Last edited by kiorky on January 3rd, 2011, 1:57 pm, edited 1 time in total.
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby thegreyman » January 11th, 2010, 11:23 pm

Can;t for the life of me add your repo to Layman. ( mercurial is installed ). The only response I get is 'Overlay "cryptelium" does not exist!' . I have tried using Layman -f -o [url] but the result is still the same. Any ideas?
thegreyman
Newbie
Newbie
 
Posts: 1
Joined: January 11th, 2010, 10:34 pm

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby Ramgoti » January 23rd, 2010, 12:19 pm

How are you? I would like to Thanks for the informative post. I really appreciate it. I hope that I can get more benefit from this topic.

Thanks
User avatar
Ramgoti
Newbie
Newbie
 
Posts: 1
Joined: January 5th, 2010, 5:37 am
Location: dhaka

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby kiorky » January 25th, 2010, 10:21 am

-
Last edited by kiorky on January 25th, 2010, 10:26 am, edited 1 time in total.
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby kiorky » January 25th, 2010, 10:25 am

thegreyman wrote:Can;t for the life of me add your repo to Layman. ( mercurial is installed ). The only response I get is 'Overlay "cryptelium" does not exist!' . I have tried using Layman -f -o [url] but the result is still the same. Any ideas?


You can try this:
Code: Select all
layman  -L -o
http://hg.cryptelium.net/hg/system/gentoo/overlay/raw-file/tip/layman.xml
layman -a cryptelium

(See the 2steps)



Anyway, which version of portage and layman are you using ?

However, you can directly fetch the overlay and add it to your PORTDIR_OVERLAYS.
The url is : http://hg.cryptelium.net/hg/system/gentoo/overlay/
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby dprus » February 5th, 2010, 12:37 am

Hi,

I installed sabnzbd as you suggested and it appears to work except for the init script.

When I run:
Code: Select all
# /etc/init.d/sabnzbd restart

I get the red [!!], however SABnzbd starts up just fine and also appears to work just fine, too.

The problem is that your init script has assumed the start was a failure and so trying to run:
Code: Select all
# /etc/init.d/sabnzbd stop

results in:
Code: Select all
server / # /etc/init.d/sabnzbd stop
 * Caching service dependencies ...                                                                              [ ok ]
 * WARNING:  sabnzbd has not yet been started.


Can you perhaps suggest how I can solve this problem?

Thanks.
dprus
Newbie
Newbie
 
Posts: 3
Joined: January 9th, 2010, 10:48 pm

Re: Installing sabnzbd on gentoo [updated to beta6]

Postby kiorky » February 6th, 2010, 9:42 am

dprus wrote:Hi,

I installed sabnzbd as you suggested and it appears to work except for the init script.

When I run:
Code: Select all
# /etc/init.d/sabnzbd restart

I get the red [!!], however SABnzbd starts up just fine and also appears to work just fine, too.

The problem is that your init script has assumed the start was a failure and so trying to run:
Code: Select all
# /etc/init.d/sabnzbd stop

results in:
Code: Select all
server / # /etc/init.d/sabnzbd stop
 * Caching service dependencies ...                                                                              [ ok ]
 * WARNING:  sabnzbd has not yet been started.


Can you perhaps suggest how I can solve this problem?

Thanks.

I can not reproduce on my gentoo boxes (tested on 3 hosts).
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to RC3]

Postby dprus » February 6th, 2010, 4:55 pm

Do you have any idea what I can do to debug it? I've tried to run the start-stop-daemon command from the shell directly and SABnzbd starts up fine from there.

Trying to figure out what actually causes the init script to display [ok] vs [!!].
dprus
Newbie
Newbie
 
Posts: 3
Joined: January 9th, 2010, 10:48 pm

Re: Installing sabnzbd on gentoo [updated to RC3]

Postby dprus » February 6th, 2010, 5:10 pm

ok, I managed to get it working. I changed my init.d script to look like this and it works:

start-stop-daemon --start --quiet --background -c ${SABNZBD_USER}:${SABNZBD_GROUP} \
        --exec /usr/bin/SABnzbd -- -d -s ${SABNZBD_HOSTNAME}:${SABNZBD_PORT} &> /dev/null
        eend $?

I think the most important addition is the "--background" directive. Everything behaves as expected now.
dprus
Newbie
Newbie
 
Posts: 3
Joined: January 9th, 2010, 10:48 pm

Re: Installing sabnzbd on gentoo [updated to RC3]

Postby kiorky » February 7th, 2010, 7:33 am

commiting with --background on my overlay as it won't do any harm.

cf http://hg.cryptelium.net/hg/system/gentoo/overlay/rev/218486443b1d
Last edited by kiorky on February 7th, 2010, 7:44 am, edited 1 time in total.
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to 0.5.0-final]

Postby kiorky » February 26th, 2010, 6:26 am

up
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to 0.5.0-final]

Postby c0nv1ct » March 1st, 2010, 3:04 pm

Since upgrading from 0.4.6 to 0.5.0 using your cherrypy and sabnzbd ebuilds my sabnzbd is having problems.  It starts up fine but displays a python traceback at first, and then begins to work but crashes soon after.

Code: Select all
2010-03-01 10:54:25,695::INFO::[_cplogging:54] [01/Mar/2010:10:54:25] HTTP
Request Headers:
  COOKIE: speedlog2=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; smplrefresh=5; session_id=d471e9851991cae9f215a5b936597bb421989f66
  HOST: attica:32323
  KEEP-ALIVE: 115
  CONNECTION: keep-alive
  Remote-Addr: 10.10.10.10
  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  ACCEPT-CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  USER-AGENT: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
  X-REQUESTED-WITH: XMLHttpRequest
  ACCEPT-LANGUAGE: en-us,en;q=0.5
  REFERER: http://attica:32323/sabnzbd/
  ACCEPT-ENCODING: gzip,deflate
2010-03-01 10:54:25,695::ERROR::[_cplogging:54] [01/Mar/2010:10:54:25] HTTP Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/cherrypy/_cprequest.py", line 660, in respond
    response.body = self.handler()
  File "/usr/lib64/python2.6/site-packages/cherrypy/lib/encoding.py", line 193, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/sabnzbd-0.5.0/sabnzbd/interface.py", line 1357, in index
    history['total_size'], history['month_size'], history['week_size'] = get_history_size()
  File "/usr/share/sabnzbd-0.5.0/sabnzbd/interface.py", line 3168, in get_history_size
    history_db = cherrypy.thread_data.history_db
AttributeError: '_ThreadData' object has no attribute 'history_db'


I believe I've fixed the complete crash by resolving the admin dir issue, but this cherrypy/history_db issue remains.
c0nv1ct
Newbie
Newbie
 
Posts: 5
Joined: March 30th, 2009, 1:06 pm

Re: Installing sabnzbd on gentoo [updated to 0.5.0-final]

Postby kiorky » March 6th, 2010, 12:41 pm

I personnaly did not have the problem whereas i did never do fresh install but only upgrades from 0.4.12 to 0.5.
You may have forgot/failed to merge (dispatch-conf/etc-update) the configuration file which change a bit (diretories) between 0.4 & 0.5.
Just remerge, and check your configuration file.

If the problem persists, i think you have some garbage leftover somewhere or your history database in bad state.

Maybe purging all but your configuration file (/etc/sabnzbd.conf) that you 'll backup somewhere can help and be the quick and dirty way to fix your installation.
You can also trying first to bakcupdelete the sqlite files in:
/var/lib/sabnzbd/admin/history1.db
/var/lib/sabnzbd/dirscan/history1.db

For example, i could have done that to do the operation:
Code: Select all
emerge -C sabnzbd
# backup what is backupable in /var/lib/sabnzbd (like the complete folder ;) )
rm -rf /var/lib/sabzbd /etc/sabnzbd /usr/share/sabnzbd*


Then remerge it
Code: Select all
emerge sabnzbd


And grab some bits from the bakuped configuration file without copying it as-is.
Code: Select all
vimdiff ~/sabznbd.conf /etc/sabnzbd/sabnzbd.conf
kiorky
Newbie
Newbie
 
Posts: 16
Joined: September 27th, 2009, 7:52 am

Re: Installing sabnzbd on gentoo [updated to 0.5.0-final]

Postby Jimmothy » March 23rd, 2010, 8:29 am

Hi kiorky, I'm having no luck adding your overlay to get sabnzbd. I keep seeing it in the list but it says cryptillium isn't available.

Have you either a more specific guide or a tar of the entire ebuild? Any help is appreciated.
Jimmothy
Newbie
Newbie
 
Posts: 1
Joined: March 23rd, 2010, 8:21 am

Re: Installing sabnzbd on gentoo [updated to 0.5.0-final]

Postby mthode » March 29th, 2010, 8:44 pm

I'm getting a ton of errors in cherrypy, is 3.2.0_rc1 the correct build to have installed (I didn't unmask it, it came with that by default).  Here is a pastebin of the errors I'm getting.

http://pastebin.com/PcVmaLQp
mthode
Newbie
Newbie
 
Posts: 4
Joined: January 17th, 2010, 3:32 am

Next

Return to General Discussion