Testing cover arts (CAA) in local development MusicBrainz Server

Continuing the discussion from How difficult is it to setup a local MusicBrainz server?:

Thanks @dns_server, I already did direct searches to find releases that are present in the smaller database of the development MBS but the releases I find, all have Cover Art (0) tab.

Did I do anything wrong that makes no releases have cover arts despite they have Add cover art edits in their history, with visible cover arts?

I took for instance the oldest Add cover art edit found (localhost) but this one too has Cover Art (0) tab.

Or this one:

Sorry for my newbies questions.

Are you looking for this view:

1 Like

Yes OMG!
Maybe you have the full database?
I have the sample development database.

Yes, replicated and indexed.
(To be honest: I’m not sure, if this is the reason for your missing cover art. You could have a look inside your test sample data and check if there are some tables or links with this information. I have no experience at all with the sample data.)

1 Like

OK I never opened a PostGreSQL database before but was not afraid! :smile:

I installed several clients they did not work until I saw your cool advice on how to open musicbrainz database for query..

Then I did \dt *.* to list all tables in all schemas.

I saw cover_art_archive.cover_art but it’s empty indeed.
cover_art_archive.art_type and cover_art_archive.image_type for instance are not empty.


On a side note do you know why select * from cover_art_archive.image_type doesn’t wotk with psql?
It seems that you are all using psql.

I kept using pgcli because it works there with same commands… :thinking:
psql queries only work on tables in default musicbrainz schema.


@InvisibleMan78 or @dns_server, or someone with a full DB:
Could you give me the content of (I don’t know the exact syntax, my table is empty):

select * from cover_art_archive.cover_art where release = 2117950

I will then try to insert the same 2 rows in my empty table (2117950 is the release we saw above).

2 Likes

For a gui database tool take a look at https://dbeaver.io/

3 Likes

INSERT INTO "cover_art_archive"."cover_art" ("id", "release", "comment", "edit", "ordering", "date_uploaded", "edits_pending", "mime_type", "filesize", "thumb_250_filesize", "thumb_500_filesize", "thumb_1200_filesize") VALUES
(19078188449, 2117950, '', 50856599, 1, '2018-02-11 01:00:04.47014+00', 0, 'image/jpeg', NULL, NULL, NULL, NULL);
INSERT INTO "cover_art_archive"."cover_art" ("id", "release", "comment", "edit", "ordering", "date_uploaded", "edits_pending", "mime_type", "filesize", "thumb_250_filesize", "thumb_500_filesize", "thumb_1200_filesize") VALUES
(19078213651, 2117950, '', 50856611, 2, '2018-02-11 01:04:25.42456+00', 0, 'application/pdf', NULL, NULL, NULL, NULL);

BTW:

select
    count(*)
from
    cover_art_archive.cover_art

returns:
2718944


Maybe a developer like @yvanzo can tell you what kind of data is included in the sample data and why it doesn’t include a cover art example.

1 Like

Super! It worked! Thanks very much!

I had a problem when launching the sudo docker-compose up local server:

"Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use"

So I had to use sudo netstat --listening --programs|grep 5432 to find out what was using it. And then I killed this process.

Read more about that (boring)

I don’t know why something (called postgresql or postgres I think) was listening to this port, even if musicbrainz-docker was not running any more.
Maybe because I had just installed a pgadmin3 on the same PC where MBS-docker is running?

I removed pgadmin3 and reboot but still the port was used and musicbrainz-docker could not launch.

Problem and its solution sounded like Error while importing DATABASE dump of bookbrainz on my local setup.
So I killed the process that was using port 5432, and could relaunch musicbrainz-docker OK, then.

I hope I won’t have to redo that kill thing everytime, now.

@dns_server Thanks for your advice DBeaver. It looks good but it’s not available in Debian packages.

For the musicbrainz-docker database manip., I accessed it remotely from a Raspberry Pi (because it’s where I wanted to test a fix to some issue I had with MBS) with pgcli (because postgresql-client’s psql did not work good for me, see my previous post).

I first installed GUI clients (4 or 5 randomly found in apt, including tora, the only one with simple name I can remember) there (on RPi), none were working so I installed this pgcli command line client.
But it was before I found out why nothing was working (Publish ports of all services, see my previous post).

After all that I wanted to retry a GUI client, as you advised me too.
But I shouldn’t have installed it this time on the same PC as where musicbrainz-docker was running.

I installed pgadmin3 on the same Debian PC where musicbrainz-docker is running.
It’s the first PG client I install on this PC.
But at this very moment, I got this error that 5432 port was in use when I tried to start docker.

So I removed the client hoping docker would resume. But no… :confused: I had to do that kill thing. Maybe now I will always have to do that kill thing… :thinking:


BTW PostgreSQL is really the worst program name ever.
Horribly ugly, impossible to spell, to pronounce, to remember.
Hopefully, I can apparently call it PG, as confirmed by the abbreviation plug-in.
They should have asked me a name (SUPER-DB, DATACOOL, any stupid name would have been prettier)

2 Likes

If you just installed the postgres package you have installed the database and client tools.
So you most likely have the database running from your os as well as the database running in the docker container and as the os version starts before docker it is running when you
You can just have the client tools as that is all you need, uninstall postgres and install postgresql-client-12.

If you still want the os instance of postgres you can change the port this uses, edit /etc/postgresql/12/main/postgresql.conf and change the port number.

3 Likes

Thanks @dns_server, I eventually removed all PG stuff from my main PC, to leave only musicbrainz-docker. Now I don’t have any PG funny stuff running in the background.

I could add @InvisibleMan78 INSERT commands in pgcli on my remote Raspberry Pi and then later I noticed that I could also access musicbrainz_db remotely simply with pre-installed LibreOffice Base!

2 Likes