rembo10 / headphones

Automatic music downloader for SABnzbd
GNU General Public License v3.0
3.35k stars 603 forks source link

HTTP Error 503: Service Unavailable #553

Closed hardcoreparkour closed 10 years ago

hardcoreparkour commented 12 years ago

Using the latest version (1249153db722d001469f2dd346362ac24766083b). No matter the artist, I get http 503: service unavailable. After a little while, it'll change to Unable to get release information for {Album} - there may not be any official releases in this release group. If you go back and look at Musicbrainz's site, you'll see all of them and you can verify that there IS an official release.

skarekrow commented 12 years ago

I am also experiencing this issue :)

rembo10 commented 12 years ago

What mirror are you guys using? You can check at the bottom of the config page. Musicbrainz started rate limiting headphones - I'm working on a few things on my end but in the meantime there are several options to get it working again.

Tbueter.com is down for now.... I had an open mirror for a while but I had to make it private because it was getting hammered and it became basically unusable, so it was the only real option to get something stable up.

You can join at http://headphones.codeshy.com/vip

There's also an option to use a custom/local server which i put in for people who didn't mind setting up their own VM.

skarekrow commented 12 years ago

I have tried Musicbrainz and Tbueter, will look into that other option here soon. Thanks!

hardcoreparkour commented 12 years ago

rembo10 - tried using the default musicbrainz one. tbueter.com was down, figured that one out. donated (to use the other one and contribute to the thank_you_for_developing_this server... and it works like a champ). seriously considering building a custom/local server to host (it would probably be way faster).

hardcoreparkour commented 12 years ago

going to be hosting my own server using gentoo linux in a vm. don't want to put it on my main linux box :P

rembo10 commented 12 years ago

If you get stuck at all pm me since i went through the steps. I might try to make a wiki for it. I did it on debian without a vm though, from scratch :-) On Apr 7, 2012 5:48 PM, "hardcoreparkour" < reply@reply.github.com> wrote:

going to be hosting my own server using gentoo linux in a vm. don't want to put it on my main linux box :P


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5007821

AF9210 commented 12 years ago

please do make a wiki for the steps on it, i have a capable machine :) would like to spare your vip whenever I can!

rembo10 commented 12 years ago

Ah don't worry about my server. It can handle it :-)

I will write something up - if not only for my own reference in case something goes horribly wrong :-)

AF9210 commented 12 years ago

Thanks; always nice to learn how to do it!

war59312 commented 12 years ago

Ugh, that sucks. Was working great until today.

Guess I will be hosting my own build at some point.

rembo10 commented 12 years ago

I put a pretty bare bones guide in the wiki - it definitely needs more work, better formatting, etc., but it will get you a working musicbrainz mirror/server

On Apr 8, 2012, at 10:08 AM, war59312reply@reply.github.com wrote:

Ugh, that sucks. Was working great until today.

Guess I will be hosting my own build at some point.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5013394

war59312 commented 12 years ago

Hi,

Nice, I updated it a bit.

Got to be a better command for "Installation and Setup" step #4.

Having to watch it and hit the enter key (yes) a few dozen times is obviously not good.

Sadly though I am stuck @ "Create the database" step 3.

Where is the pg_hba.conf file? I searched my system and finds nothing. Running Ubuntu Server 11.04.

Thanks,

Will

rembo10 commented 12 years ago

Oh - when I did the carton install, it asked me if I just wanted to use default settings or have it try to detect settings automatically or something and I clicked yes. Then there were only a few questions about updating certain modules, etc.

Ah yes, that step should be clearer. I think its /etc/postgresql/8.4/pg_hba.conf (its something very similar - I just don't remember off the top of my head)

Basically in that file you want to just allow/trust all local connections. There's more info in the musicbrainz how to

Let me know if you get stuck anywhere else

KenzoB73 commented 12 years ago

I've gotten to the point of creating the clean database with this command:

carton exec ./admin/InitDb.pl -- --createdb --clean

Fails every time.

Failed query: 'SELECT 1 FROM pg_shadow WHERE usename = ?' (musicbrainz) install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC contains: /home/musicbrainz/musicbrainz-server/admin/../lib local/lib/perl5/i686-linux-gnu-thread-multi-64int local/lib/perl5 . /usr/share/perl/5.12 /usr/lib/perl/5.12) at (eval 422) line 3. Perhaps the DBD::Pg perl module hasn't been fully installed, or perhaps the capitalisation of 'Pg' isn't right.

rembo10 commented 12 years ago

Try following the official guide and using mine as a suppliment. I just noticed the wiki was edited a bit and may not be correct - like creating the musicbrainz user by doing mkdir /home/musicbrainz. Its actually more like: adduser musicbrainz (on debian), and then 'su musicbrainz' to switch to the musicbrainz user. Also with the perl modules - if you're getting a failure something isn't right, maybe a dependency was not installed correctly

KenzoB73 commented 12 years ago

Thanks, I was able to get past all of that, imported the databases (it was really quick, surprised me). I started up the service and was able to browse to my own server, did a search for an artist which worked. But then trying to go into that artist to see albums, it fails.

I also tried the various techniques I found on the musicbrainz site to perform a replication, but none of them worked. I get a schema sequence mismatch (codebase is 14, database is 0). Musicbrainz irc channel is quiet. :(

rembo10 commented 12 years ago

Did you download the database dumps? I remember that taking quite a while to import.

For the LoadReplicationChanges, you want to do "carton exec -- LoadReplicationChanges"

I might just copy the official guide and add in the few modifications I had to make to get it to work.

On Apr 11, 2012, at 9:05 PM, Borgcustomreply@reply.github.com wrote:

Thanks, I was able to get past all of that, imported the databases (it was really quick, surprised me). I started up the service and was able to browse to my own server, did a search for an artist which worked. But then trying to go into that artist to see albums, it fails.

I also tried the various techniques I found on the musicbrainz site to perform a replication, but none of them worked. I get a schema sequence mismatch (codebase is 14, database is 0). Musicbrainz irc channel is quiet. :(


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5071602

rembo10 commented 12 years ago

For your second error, make sure you're running "carton exec -- LoadReplicaionChanges"

If you don't mind doing a bit of digging, google "rembo10 musicbrainz + your errors". I basically got stuck on all those same parts since their README isnt clear, and it should be in the irc logs., hope it helps! :)

KenzoB73 commented 12 years ago

I figure it out, thanks for your help. The import was failing because I was literally using 'mbdump*.tar.bz2'. When I used the full path, it worked. My bad. Hopefully I don't have any more questions. :)

kevinlekiller commented 12 years ago

Hello Borgcustom, can you elaborate how you fixed the issue (carton exec ./admin/InitDb.pl -- --createdb --clean Fails every time.) I'm having the same issue. Here is a pastebin : http://pastebin.com/RCRPLLeB

Thanks.

kevinlekiller commented 12 years ago

I figured out the DBD Pg issue, after sudo carton install --deployment , you need to install it manually : carton install DBD::Pg .

The location of pg_hba.conf for anyone wondering : /etc/postgresql/8.4/main/pg_hba.conf

I'm still having issues with the (carton exec ./admin/InitDb.pl -- --createdb --clean) command. Here's a new pastebin : http://pastebin.com/raw.php?i=kA9GWt7Q

Thanks.

rembo10 commented 12 years ago

You need the two dashes after carton exec. Not sure if github uses markdown on these comments but if not, do something like: "carton exec -- ./admin/..." On Apr 14, 2012 8:39 PM, "kevinlekiller" < reply@reply.github.com> wrote:

I figured out the DBD Pg issue, after sudo carton install --deployment , you need to install it manually : carton install DBD::Pg .

The location of pg_hba.conf for anyone wondering : /etc/postgresql/8.4/main/pg_hba.conf

I'm still having issues with the (carton exec ./admin/InitDb.pl -- --createdb --clean) command. Here's a new pastebin : http://pastebin.com/raw.php?i=kA9GWt7Q

Thanks.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5131928

kevinlekiller commented 12 years ago

Thanks rembo10!

Sun Apr 15 08:27:28 2012 : InitDb.pl starting psql: FATAL: database "musicbrainz" does not exist

Failed to create schema Sun Apr 15 08:27:28 2012 : InitDb.pl failed

How would I create the database "musicbrainz"?

Sorry for my confusion.

Edit: Ok, I figured out how to create the database : login as root : su Login as posgres : su - postgres Create user musicbrainz : createuser -d -a -P musicbrainz Create database : createdb musicbrainz_db

rembo10 commented 12 years ago

No worries. Its tough to know where you're getting tripped up without knowing what you did. The musicbrainz db is created by the carton exec -- ./admin/InitDb.pl -- --createdb command. I used the --import /tmp/dumps/mbdump*.tar.bz2 --echo switches

Maybe that's an authorization issue though - but you edited the PG_hba.conf file. Are you following my wiki or the official guide? On Apr 14, 2012 10:01 PM, "kevinlekiller" < reply@reply.github.com> wrote:

Thanks rembo10!

Sun Apr 15 08:27:28 2012 : InitDb.pl starting psql: FATAL: database "musicbrainz" does not exist

Failed to create schema Sun Apr 15 08:27:28 2012 : InitDb.pl failed

How would I create the database "musicbrainz"?

Sorry for my confusion.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5132520

kevinlekiller commented 12 years ago

I'm following both.

After adding the database and user and re running the --createdb command, I got this error :

Sun Apr 15 08:42:11 2012 : psql:/home/musicbrainz/musicbrainz-server/admin/sql/CreateFunctions.sql:33: ERROR: language "plpgsql" does not exist

So I added the language : psql -c "CREATE LANGUAGE plpgsql"

Now I get this error : ERROR: relation "annotation" already exists : http://pastebin.com/raw.php?i=BPzLEZRf

I will try to import the database now. Thanks.

Edit: Same error importing, maybe because the information is already there? , I will try starting the server.

rembo10 commented 12 years ago

Ah, check the official guide. It mentions that error. I might take my wiki down since it seems to be causing more issues than solving them :-)

I'll keep my notes up for where the guide isn't clear

On Apr 14, 2012, at 10:23 PM, kevinlekillerreply@reply.github.com wrote:

I'm following both.

After adding the database and user and re running the --createdb command, I got this error :

Sun Apr 15 08:42:11 2012 : psql:/home/musicbrainz/musicbrainz-server/admin/sql/CreateFunctions.sql:33: ERROR: language "plpgsql" does not exist

So I added the language : psql -c "CREATE LANGUAGE plpgsql"

Now I get this error : ERROR: relation "annotation" already exists : http://pastebin.com/raw.php?i=BPzLEZRf

I will try to import the database now. Thanks.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5132708

kevinlekiller commented 12 years ago

Thanks for all the help, I will restart fresh will all this new info, it will probably work this time.

kevinlekiller commented 12 years ago

Update : It seems to work now (did a full reinstall of the os)

My poor athlon 2800+ (found in the dumpster) is taking its time :

http://img138.imageshack.us/img138/1239/82387344.gif

In case anyone in the future sees this and has the same issues I had, here is the steps I took :

http://pastebin.com/raw.php?i=a99EqPzb

Edit: It eventually did finish , but with the "language "plpgsql" does not exist" (I did add it before). Headphones can pull information from the server, so I won't bother trying to fix that problem. Thanks again for all the help.

war59312 commented 12 years ago

Thanks for the updates guys.

Sadly I am still suck:

Warning: this is a slave replication server, but there is no READONLY connection defined Sun Apr 15 04:10:21 2012 : InitDb.pl starting psql: FATAL: Ident authentication failed for user "musicbrainz"

Failed to create schema Sun Apr 15 04:10:21 2012 : InitDb.pl failed

rembo10 commented 12 years ago

war59312: I think that error has to do with the authentication in /etc/postgresql/8.4/main/pg_hba.conf

if you set it to: local all all trust (see kevinlekiller's pastebin above) it should work. i think it might be the first line that deals with local connections in the conf file. The wiki seems to have created more trouble than it's fixing :-) I'm going to edit it now with basically the official musicbrainz instructions plus my notes

war59312 commented 12 years ago

Turns out it's because the config file has to be reloaded after making any changes:

/usr/lib/postgresql/8.4/bin/pg_ctl reload -D /var/lib/postgresql/8.4/main

But now when I try and run it I am getting this:

carton exec -- plackup -Ilib -r Watching ./lib app.psgi for file updates. Odd number of elements in anonymous hash at lib/DBDefs.pm line 312. Error while loading app.psgi: Can't locate Catalyst/Plugin/StackTrace.pm in @INC (@INC contains: lib local/lib/perl5/x86_64-linux-gnu-thread-multi local/lib/perl5 . /usr/share/perl/5.10 /usr/lib/perl/5.10) at local/lib/perl5/Module/Runtime.pm line 205. at app.psgi line 21 Compilation failed in require at app.psgi line 21. BEGIN failed--compilation aborted at app.psgi line 21.

rembo10 commented 12 years ago

Check the updated wiki page. You might just need to run the carton install --deployment step again.

See under "Installing Perl dependencies", Step 2

On Apr 15, 2012, at 2:40 PM, war59312reply@reply.github.com wrote:

Turns out it's because the config file has to be reloaded after making any changes:

/usr/lib/postgresql/8.4/bin/pg_ctl reload -D /var/lib/postgresql/8.4/main

But now when I try and run it I am getting this:

carton exec -- plackup -Ilib -r Watching ./lib app.psgi for file updates. Odd number of elements in anonymous hash at lib/DBDefs.pm line 312. Error while loading app.psgi: Can't locate Catalyst/Plugin/StackTrace.pm in @INC (@INC contains: lib local/lib/perl5/x86_64-linux-gnu-thread-multi local/lib/perl5 . /usr/share/perl/5.10 /usr/lib/perl/5.10) at local/lib/perl5/Module/Runtime.pm line 205. at app.psgi line 21 Compilation failed in require at app.psgi line 21. BEGIN failed--compilation aborted at app.psgi line 21.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5137962

chriscohen commented 12 years ago

Sorry guys but I think you have got sidetracked here. rembo, your work is excellent and you have put together a great product. However, without a working API integration with musicbrainz (or anywhere else), Headphones is simply not useful. A user shouldn't be expected to set up his or her own mirror in order to get it to work.

Making users pay for the VIP access is fine, as you're not asking a lot, but you need to make it clear from the outset that Headphones is not usable unless you either pay or set up a mirror.

Obviously the best option is just to make it work out of the box with the musicbrainz API, but I appreciate that, if like me, most people have large music collections (in the thousands of albums) then musicbrainz will not be happy about their API getting hammered.

I really hope you can find a solution to this problem and I hope you put it top of your priorities! All other issues should fall by the wayside as you're basically offering a broken product to your users right now, but worse, people are not finding out that it's broken until going through considerable setup. Once again, I don't want to take anything away from the tremendous effort you've put into this project, and I hope you keep up the excellent work, but without a fix for the API issue, it might put a LOT of people off.

rembo10 commented 12 years ago

You're absolutely right - and the feedback is appreciated. I'm working on cutting down the musicbrainz requests now - but even then, i think some users still might get hit with the rate limit. Maybe a second music index?

Eh, fuck it. I might start my own......

The fact that it's not working bothers me a lot, and I hate that people even need to tinker with stuff like this. These are short term fixes while I get a solid long term solution working.

On Sun, Apr 15, 2012 at 4:08 PM, chriscohen < reply@reply.github.com

wrote:

Sorry guys but I think you have got sidetracked here. rembo, your work is excellent and you have put together a great product. However, without a working API integration with musicbrainz (or anywhere else), Headphones is simply not useful. A user shouldn't be expected to set up his or her own mirror in order to get it to work.

Making users pay for the VIP access is fine, as you're not asking a lot, but you need to make it clear from the outset that Headphones is not usable unless you either pay or set up a mirror.

Obviously the best option is just to make it work out of the box with the musicbrainz API, but I appreciate that, if like me, most people have large music collections (in the thousands of albums) then musicbrainz will not be happy about their API getting hammered.

I really hope you can find a solution to this problem and I hope you put it top of your priorities! All other issues should fall by the wayside as you're basically offering a broken product to your users right now, but worse, people are not finding out that it's broken until going through considerable setup. Once again, I don't want to take anything away from the tremendous effort you've put into this project, and I hope you keep up the excellent work, but without a fix for the API issue, it might put a LOT of people off.


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5138366

John-Gee commented 12 years ago

Hello,

I have just followed the wiki and setup my own mirror, but now I am curious. How do I keep it up to date? I have looked at the Live Feed Data, but I cannot find a tutorial on how to set it up. Could anyone add that to the wiki as well?

Thanks!

rembo10 commented 12 years ago

You can use this script to run load the replication changes:

http://paste.pocoo.org/show/555245/

Save it to /usr/bin/mbcontrol or something, chmod a+x the file to make it executable, and then call it as "mbcontrol hourly" as your musicbrainz user. You can also start/stop the server (mbcontrol start/stop). You'll need write access to /var/{log,run}/musicbrainz

You can also stick in into a cronjob to run 10 minutes past every hour. That's how I have mine set up.

Will add this to the wiki now.

John-Gee commented 12 years ago

Thank you for the quick answer. Do you know if we are downloading diff/updates to the db every hour or the full thing again?

rembo10 commented 12 years ago

Its the incremental updates, so the first one might take a while depending on which dumps you got, but the subsequent ones only take a few mins

John-Gee commented 12 years ago

Cool!

Marcoevich commented 12 years ago

Hey Rembo10,

Maybe this question is asked you a 1000 times before, but ehm. Have you looked at other sites with an API to get your data from?

Perhaps you can try http://www.discogs.com/developers/. They have a really good api with extended FAQ.

You already know Large.FM. Have you looked into their API? http://www.last.fm/api I know there is a scraper for XBMC for it, so you must be able to retrieve artist information from last.FM

Also, Allmusic.com seems to have a pretty large database with music information. But I don't know if they provide an api...

A last site that may be useful for you:

http://developer.yahoo.com/music/ (don't know if they provide album images..)

John-Gee commented 12 years ago

Rembo:

I have setup everything (correctly?) But all I get in musicbrainz is: [debug] Response Code: 400; Content-Type: text/plain; charset=utf-8; Content-Length: 129 and in headphones : Attempt to retrieve artist information from MusicBrainz failed for artistid: UUID (HTTP Error 400: Bad Request)

clicking on the artist link in MB works, and if I replace the musicbrainz.org by my server in the address it still works... so not sure what to do...

rembo10 commented 12 years ago

What do you have set for the mirror values on the config page?

Marcoevich: ha, yeah I'm looking/have looked into all those options but there's some things lacking on every one of them, from a developers standpoint and as a user. Plus, who knows if headphones will get rate limited or blocked or whatever by them also.... working on a solution

Marcoevich commented 12 years ago

Ok lol, I'm starting to understand why it must be really difficult for you to please everyone lol ;) It sucks that you can't use those other sites. But I am confident that you have something shiny for us in the making ;) Perhaps your own server? I can't wait to see it ;)

-----Original Message----- From: rembo10 Sent: Thursday, April 19, 2012 9:32 AM To: Rick Subject: Re: [headphones] HTTP Error 503: Service Unavailable (#553)

What do you have set for the mirror values on the config page?

Marcoevich: ha, yeah I'm looking/have looked into all those options but there's some things lacking on every one of them, from a developers standpoint and as a user. Plus, who knows if headphones will get rate limited or blocked or whatever by them also.... working on a solution


Reply to this email directly or view it on GitHub: https://github.com/rembo10/headphones/issues/553#issuecomment-5216369

John-Gee commented 12 years ago

@rembo10 : mirror -> localhost / 5000 The connection looks fine since my musicbrainz server does see the requests, but it always replies 400 though...

wondergod commented 12 years ago

I tried signing up at http://headphones.codeshy.com/vip but the "Sign Up" button does nothing. Am I doing something wrong?

war59312 commented 12 years ago

Indeed, its broken now. If you turn off java-script the button will work. Very odd.

rembo10 commented 12 years ago

Seems alright for me. What browser are you using so I can get it fixed? See if it works if you type a but slower :-) it queries the database to check if the username exists and sometimes it just gets stuck :-)

wondergod commented 12 years ago

I'm using firefox 10.0 and I tried in IE9. No I will not try in Chrome.

Yep typing slow fixed it. I'm just to fast for these machines.

rjgould commented 12 years ago

Howdy chaps, I'm no good when it comes to code but surely if Headphones didn't hit the limits mentioned here: http://wiki.musicbrainz.org/XML_Web_Service/Rate_Limiting then it wouldn't have any issues?

cava commented 11 years ago

--- EDIT ---