Getting "gaierror" running 0.3.0 Source on OS X

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Kinjin
Newbie
Newbie
Posts: 5
Joined: February 27th, 2008, 8:16 pm

Re: Getting "gaierror" running 0.3.0 Source on OS X

Post by Kinjin »

Well I am getting the same error on 0.3.1 (source) , it just happened out of the blue, I'm using FreeBSD 6.3. I have tried removing all traces and reinstalling but no luck.

2008-02-28 22:49:04,314::INFO::SABnzbd.py-0.3.1
2008-02-28 22:49:04,315::INFO::Initializing SABnzbd v0.3.1
2008-02-28 22:49:04,317::INFO::No download_dir defined, setting value to "downloads/incomplete"
2008-02-28 22:49:04,318::INFO::No complete_dir defined, setting value to "downloads/complete"
2008-02-28 22:49:04,320::INFO::No nzb_backup_dir defined, setting value to ""
2008-02-28 22:49:04,321::INFO::No cache_dir defined, setting value to "cache"
2008-02-28 22:49:04,323::INFO::No dirscan_dir defined, setting value to ""
2008-02-28 22:49:04,325::INFO::[sabnzbd] Loading data for rss.sab from /home/blah/.sabnzbd/cache/rss.sab
2008-02-28 22:49:04,327::INFO::[sabnzbd] /home/Daniel/.sabnzbd/cache/rss.sab missing
2008-02-28 22:49:04,328::INFO::[sabnzbd] Loading data for bytes.sab from /home/blah/.sabnzbd/cache/bytes.sab
2008-02-28 22:49:04,329::INFO::[sabnzbd] /home/blah/.sabnzbd/cache/bytes.sab missing
2008-02-28 22:49:04,330::INFO::[sabnzbd] Loading data for queue.sab from /home/blah/.sabnzbd/cache/queue.sab
2008-02-28 22:49:04,332::INFO::[sabnzbd] /home/Daniel/.sabnzbd/cache/queue.sab missing
2008-02-28 22:49:04,336::INFO::_yenc module... found!
2008-02-28 22:49:04,337::INFO::celementtree module... found!
2008-02-28 22:49:04,338::INFO::par2 binary... found (/usr/local/bin/par2)
2008-02-28 22:49:04,339::INFO::rar binary... found (/usr/local/bin/unrar)
2008-02-28 22:49:04,340::INFO::unzip binary... found (/usr/local/bin/unzip)
2008-02-28 22:49:04,341::INFO::Perl interpreter... found (['/usr/bin/perl', '/usr/home/blah/SABnzbd-0.3.1/sabnzbd/utils/sendEmail.pl'])
Traceback (most recent call last):
  File "SABnzbd.py", line 687, in
    main()
  File "SABnzbd.py", line 533, in main
    info = socket.getaddrinfo(socket.gethostname(), None)
socket.gaierror: (8, 'hostname nor servname provided, or not known')
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Getting "gaierror" running 0.3.0 Source on OS X

Post by shypike »

This is a problem that will be fixed in 0.3.3

Somehow Python can no longer resolve the hostname.
Is anything changed in your system's network situation?

If your're not afraid to edit a Python source file,
you can change line 533 in the file SABnzbd.py
from
    info = socket.getaddrinfo(socket.gethostname(), None)
to
    info = socket.getaddrinfo("localhost", None)
Kinjin
Newbie
Newbie
Posts: 5
Joined: February 27th, 2008, 8:16 pm

Re: Getting "gaierror" running 0.3.0 Source on OS X

Post by Kinjin »

Thanks, that worked. The only thing on my network that changed was I replaced my old router. Thing is the server was off when I replaced it, also I used the same subnet and assigned the server the same IP address, so everything should have been the same as before. I dunno why it would have caused this to happen.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Getting "gaierror" running 0.3.0 Source on OS X

Post by shypike »

I'm not sure why it happens either, but I found a way to work around the problem.
This will be in 0.3.3.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Getting "gaierror" running 0.3.0 Source on OS X

Post by shypike »

I think that Leopard may have the same problem as Vista, namely that localhost is ambiguous (due to IPV6).
It probably resolves to [::1] instead of 127.0.0.1.
Try to ping localhost and check what IP address it resolves to.
Post Reply