Server install documentation

Hi,

short question, is this

the latest documentation for MB server installation?

Many regards and thanks

Yes install.md contains the setup instructions.
I have followed these and have my own instance https://musicbrainz.dns.id.au/

2 Likes

I did, too. Seems to work somehow.

But when I open http://mbserver:5000 I get a page which looks like…

any idea?

You didn’t run script/compile_resources.sh (so there is no CSS, and no JS), and CATALYST_DEBUG is true in lib/DBDefs.pm (so you get extra debugging information).

1 Like

Thanks! And forgot to set WEB_SERVER port :5000 :slight_smile: Seems to work now.

I get a lot of these

Could not retrieve sub-document page from search server. Error: http://search.musicbrainz.org/ws/2/recording/?max=25&type=recording&fmt=xml&offset=0&query="Meine%20Jungs%20%2F%20Deine%20Jungs"AND%20artist%3A"Roger%20%26%20Schu"&dismax=false → 503 Service Temporarily Unavailable

Does that mean queries go to musicbrainz.org and not my server? Do I need to set up a search server?

Yes, if you do a lot of searches (as opposed to lookups and browses), you might want to set up your own search server and change the LUCENE_SERVER setting accordingly.

Setting up a search server is a bit complicated, unfortunately. There are some related posts on the blog.

If you want to run your own search server you will need to download the indexer and the search server war file from
http://ftp.musicbrainz.org/pub/musicbrainz/search/

The search server can run under tomcat but needs to be the root webapp, rename searchserver.war to ROOT.war and place it in /var/lib/tomcat7/webapps/

You then need to build the search indexes with index.jar
The search server is expecting these to be located in /home/search/indexdata/ so create a symlink if you want to store them somewhere else.

Download the freedb database from http://www.freedb.org/en/download__database.10.html

java -Xmx2G -jar index.jar --indexes-dir /home/search/indexdata --freedb-dump dump.tar.gz

1 Like

Note: That’s optional – you only need it if you actually want to do FreeDB searches. (And it seems this feature will be removed.)

Thanks, up and running :-))

Is there a documentation on how to

  • keep the MB server up to date?

and

  • set up replication (in the VM there was some home/vm/bin/replicate stuff)…

Thanks and regards!

For replication, run admin/cron/slave.sh (typically once per hour, shortly after the top of the hour). Remember to set your replication token in DBDefs.pm.

Regarding updates, unless you have specific needs, I wouldn’t bother to update the code except at schema changes (there will be detailed instructions on the blog). But generally, the procedure is to fetch and check out a newer release in git, then re-run script/compile_resources.sh; it may happen, though, that you also need to update or install new Perl or Node.js dependencies or change the configuration.

thanks! so far so good but I get the following:

./admin/replication/LoadReplicationChanges
Mon Dec 12 12:05:33 2016 : Continuing a previously aborted load
Mon Dec 12 12:05:33 2016 : Processing replication changes
WARNING: SET TRANSACTION can only be used in transaction blocks
WARNING: SET CONSTRAINTS can only be used in transaction blocks
XIDs Stmts est% XIDs/sec Stmt/sec
0 0 0% 0 0Failed query:
‘INSERT INTO “musicbrainz”.“artist_credit” (“artist_count”, “created”, “id”, “name”, “ref_count”) VALUES (?, ?, ?, ?, ?)’
(1 2016-12-07 00:15:35.465358+00 1784337 Kassa Overall 0)
23505 DBD::Pg::st execute failed: ERROR: duplicate key value violates unique constraint "artist_credit_pkey"
DETAIL: Key (id)=(1784337) already exists. [for Statement “INSERT INTO “musicbrainz”.“artist_credit” (“artist_count”, “created”, “id”, “name”, “ref_count”) VALUES (?, ?, ?, ?, ?)” with ParamValues: 1=‘1’, 2=‘2016-12-07 00:15:35.465358+00’, 3=‘1784337’, 4=‘Kassa Overall’, 5=‘0’]
at /home/vm/musicbrainz-server/admin/replication/…/…/lib/Sql.pm line 115.
Sql::catch {…} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x412a858)) called at /usr/share/perl5/Try/Tiny.pm line 115
Try::Tiny::try(CODE(0x40c4b28), Try::Tiny::Catch=REF(0x405bad8)) called at /home/vm/musicbrainz-server/admin/replication/…/…/lib/Sql.pm line 116
Sql::do(Sql=HASH(0x405bd78), "INSERT INTO “musicbrainz”.“artist_credit” (“artist_count”, “c”…, 1, “2016-12-07 00:15:35.465358+00”, 1784337, “Kassa Overall”, 0) called at /home/vm/musicbrainz-server/admin/replication/ProcessReplicationChanges line 284
main::mirrorInsert(Sql=HASH(0x40c4de0), Sql=HASH(0x405bd78), ARRAY(0x3b91870), 2518264) called at /home/vm/musicbrainz-server/admin/replication/ProcessReplicationChanges line 252
main::mirrorCommand(“i”, Sql=HASH(0x40c4de0), Sql=HASH(0x405bd78), ARRAY(0x3b91870), 2518264, CODE(0x40d2218)) called at /home/vm/musicbrainz-server/admin/replication/ProcessReplicationChanges line 181