Amarok does not understand old PostgreSQL database formats

Bug #62456 reported by Jonathan Anderson
4
Affects Status Importance Assigned to Milestone
amarok (Ubuntu)
Invalid
Undecided
Simon Law

Bug Description

Binary package hint: amarok

Hello,

After upgrading my Kubuntu system to Edgy, Amarok was reset to the default settings, including using SQLite for the collection database.

I changed this to use the PostgreSQL database that the previous version of Amarok used... it looked like my collection was empty, even though I could see it wasn't using pgadmin3. Since then, Amarok refuses to start. I run "amarok" or "amarokapp" from the command line, it churns away for a few seconds, then there is nothing. No output to stderr, nothing.

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

I should say: I'm no stranger to a debugger, and I'd like to get to the bottom of this, but is there anything I can check before I download & compile the source?

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :
Download full text (3.9 KiB)

Here's what I get when I run a debug version of amarokapp (compiled from source):

--
amarok: BEGIN: CollectionDB::CollectionDB()
amarok: BEGIN: void CollectionDB::initialize()
amarok: [ThreadWeaver] Creating pthread key, exit value is 0
amarok: [CollectionDB] [PostgresqlConnection::PostgresqlConnection(const PostgresqlConfig*)]
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "podcastchannels" does not exist
amarok:
amarok: FAILED QUERY: SELECT COUNT( url ) FROM podcastchannels LIMIT 1 OFFSET 0;
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "podcastepisodes" does not exist
amarok:
amarok: FAILED QUERY: SELECT COUNT( url ) FROM podcastepisodes LIMIT 1 OFFSET 0;
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "admin" does not exist
amarok:
amarok: FAILED QUERY: SELECT value FROM admin WHERE noption = 'Database Devices Version';
amarok: [CollectionDB] Creating DEVICES table
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "devices_seq" already exists
amarok:
amarok: FAILED QUERY: CREATE SEQUENCE devices_seq;
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "devices" already exists
amarok:
amarok: FAILED QUERY: CREATE TABLE devices (id INTEGER PRIMARY KEY DEFAULT nextval('devices_seq'),type TEXT,label TEXT,lastmountpoint TEXT,uuid TEXT,servername TEXT,sharename TEXT);
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "devices_type" already exists
amarok:
amarok: FAILED QUERY: CREATE INDEX devices_type ON devices( type );
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "devices_uuid" already exists
amarok:
amarok: FAILED QUERY: CREATE INDEX devices_uuid ON devices( uuid );
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "devices_rshare" already exists
amarok:
amarok: FAILED QUERY: CREATE INDEX devices_rshare ON devices( servername, sharename );
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "admin" does not exist
amarok:
amarok: FAILED QUERY: SELECT value FROM admin WHERE noption = 'Database Devices Version';
amarok: [CollectionDB] POSTGRESQL INSERT FAILED: ERROR: relation "admin" does not exist
amarok:
amarok: FAILED SQL: INSERT INTO admin (value, noption) values ( '1', 'Database Devices Version' );
amarok: END__: void CollectionDB::initialize() - Took 0.073s
amarok: [CollectionDB] INotify not available, using QTimer!
amarok: END__: CollectionDB::CollectionDB() - Took 14s
amarok: BEGIN: void CollectionDB::checkDatabase()
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "podcastchannels" does not exist
amarok:
amarok: FAILED QUERY: SELECT COUNT( url ) FROM podcastchannels LIMIT 1 OFFSET 0;
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "podcastepisodes" does not exist
amarok:
amarok: FAILED QUERY: SELECT COUNT( url ) FROM podcastepisodes LIMIT 1 OFFSET 0;
amarok: [CollectionDB] POSTGRESQL QUERY FAILED: ERROR: relation "admin" does not exist
amarok:
amarok: FAILED QUERY: SELECT value FROM admin WHERE noption = 'Database Stats Version';
amarok: [CollectionDB] Beginning...

Read more...

Revision history for this message
Simon Law (sfllaw) wrote :

Hi Jon,

To start out, please try to strace amaroK, which will explore its behaviour a bit. Follow the instructions at https://wiki.ubuntu.com/Strace for instructions on how to do this.

Also, you may be able to find a verbose or debugging mode for amaroK's command line. Try starting it with the --help option to see if one is available.

Thanks.

Changed in amarok:
assignee: nobody → sfllaw
status: Unconfirmed → Needs Info
Revision history for this message
Simon Law (sfllaw) wrote :

Hi Jon,

It looks like it's not seeing the expected database schema for its library. Is that because there's something wrong with the database? Is it empty?

Perhaps the format in which amaroK stores its library has changed?

Thanks.

Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :
Revision history for this message
Jonathan Anderson (jonathan-anderson) wrote :

Mumble grumble... Amarok actually starts now. I had to:

mkdir ~/.postgresql
ln -s /etc/postgresql-common/root.crt ~/.postgresql/

Now I have a PostgreSQL problem:

'An error has occured:

Error connecting to the server: could not read root certificate file "/home/jon/.postgresql/root.crt": No SSL error reported'

This is not an Amarok issue... it's PostgreSQL.

Changed in amarok:
status: Needs Info → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.