Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    7

    DBI Exception: DBD::mysql::st execute failed: Column 'contributor' cannot be null

    Hi All,

    I hope, someone can help me to resolve the following issue:
    DBI Exception: DBD::mysql::st execute failed: Column 'contributor' cannot be null

    I'm running:

    Logitech Media Server Version: 7.7.2 - r33893 @ Wed Mar 14 06:40:27 MDT 2012
    Hostname: MyNAS
    Server IP Address: 192.168.1.2
    Server HTTP Port Number: 9000
    Operating system: Linux - EN - utf8
    Platform Architecture: arm-none-linux-gnueabi
    Perl Version: 5.10.0 - arm-none-linux-gnueabi
    Database Version: MySQL 4.1.22 [WITHOUT INNODB]

    Required packages built from sources.

    As soon as scanner.pl start working the following exception is thrown:
    DBI Exception: DBD::mysql::st execute failed: Column 'contributor' cannot be null

    Please see other attachments:


    Thanks,
    tals
    Attached Files Attached Files

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,140

    DBI Exception: DBD::mysql::st

    > I hope, someone can help me to resolve the following issue:
    > DBI Exception: DBD::mysql::st execute failed: Column 'contributor'
    > cannot be null


    I'd shut down LMS, remove the cache folder and start over.

    --

    Michael

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    7
    Quote Originally Posted by mherger View Post
    > I hope, someone can help me to resolve the following issue:
    > DBI Exception: DBD::mysql::st execute failed: Column 'contributor'
    > cannot be null


    I'd shut down LMS, remove the cache folder and start over.

    --

    Michael
    Thanks for the reply, Michael!

    Well, I followed your advise and got the same result

    There was a similar issue http://forums.slimdevices.com/showth...execute+failed
    As far as I understand MySQL issues no more addressed since LMS v7.7.1
    Agree with the author: It could take ages to rebuild all necessary CPAN packages which come with LMS-no_CPAN (especially if they have to be crosscompiled).

    A good advise from a LMS developer concerning the reason of the problem would be very much appreciated. Just to know what package to rebuild.
    (Rebuilding DBIx::Class didn't help.)


    Thanks,

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    616
    Hi,

    why is your datadir and tmpdir in the same folder? (/home/squeezebox/cache/MySQL)
    How did you bind the mysql instrance into LMS? shure port & Username/passwd (and so on) are ok?
    Under which account does mysql run?
    Does this user have the needed rights for the folders?
    Can you connect to the mysql instance with a mysqlclient ?

    What is the output of cat /home/squeezebox/cache/mysql-error-log.txt
    What say top

    How much ram your nas had?

    edit
    http://forums.slimdevices.com/showth...l=1#post730076

    With minor changes mysql ist┤still running under 7.72 - but you need a "little" more ram for mysql versus sqlite.
    And why Mysql 4? you know the security holes as big as a barn door in 4?
    Last edited by DJanGo; 2013-02-08 at 12:42.
    Gruss

    Jan

  5. #5
    Junior Member
    Join Date
    Jan 2013
    Posts
    7
    Quote Originally Posted by DJanGo View Post
    Hi,

    why is your datadir and tmpdir in the same folder? (/home/squeezebox/cache/MySQL)
    How did you bind the mysql instrance into LMS? shure port & Username/passwd (and so on) are ok?
    Under which account does mysql run?
    Does this user have the needed rights for the folders?
    Can you connect to the mysql instance with a mysqlclient ?

    What is the output of cat /home/squeezebox/cache/mysql-error-log.txt
    What say top

    How much ram your nas had?

    edit
    http://forums.slimdevices.com/showth...l=1#post730076

    With minor changes mysql ist┤still running under 7.72 - but you need a "little" more ram for mysql versus sqlite.
    And why Mysql 4? you know the security holes as big as a barn door in 4?

    Hallo Jan!
    Danke fuer die Antwort.

    Well since LMS 7.7.2 compiled from scratch all data (& DBs) stored in the home directory.
    There is no problem with the connection etc. I'm sure.
    skip-grant-tables option is used;
    dbi:mysql:hostname=127.0.0.1;port=9092;database=%s

    And I can connect to it: mysql -P9092 -h127.0.0.1 slimserver
    mysql-error-log.txt:
    /opt/share/logitechmediaserver/Bin/mysqld: ready for connections.
    Version: '4.1.22' socket: '/home/squeezebox/cache/squeezebox-mysql.sock' port: 9092 optware distribution 4.1.22-3
    130208 7:57:35 [Note] /opt/share/logitechmediaserver/Bin/mysqld: Normal shutdown

    130208 7:57:35 [Note] /opt/share/logitechmediaserver/Bin/mysqld: Shutdown complete



    The problem is somewhere between the DBD-MySQL driver and the scanner. Unfortunately, log4perl.logger.scan.import = DEBUG
    doesn't provide me more info than I already have.
    As soon as the problem is resolved I'll migrate to MySQL 5.x

    However, it didn't help. The same result with MySQL 5.0.88. (both default config and manually created slimserver DB)

    I'll try to rebuild all platform specific packages. Maybe I didn't see something very import.


    Danke nochmal.
    tals

  6. #6
    Senior Member
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    616
    Quote Originally Posted by tals View Post
    However, it didn't help. The same result with MySQL 5.0.88. (both default config and manually created slimserver DB)

    I'll try to rebuild all platform specific packages. Maybe I didn't see something very import.


    Danke nochmal.
    tals

    Hi
    maybe another Thread in the German subforum would be easier ;-)

    Did you
    * Stop LMS
    * install MySQL
    * create a new database in MySQL
    * create a user account in MySQL
    * grant this user all permissions to the new database
    * install DBD::mysql [http://cpansearch.perl.org/src/RUDY/.../INSTALL.html]
    * modify server.prefs like them in the other answer from me
    * start LMS
    * open a mysql connection
    * use "database";
    * show tables;
    is the database empty?
    describe table;
    is any of them empty ?


    EDIT
    > And I can connect to it: mysql -P9092 -h127.0.0.1 slimserver

    gotit ;-)
    you must use a user with a given password!
    an empty password doesnt work ;-)
    Last edited by DJanGo; 2013-02-09 at 14:50.
    Gruss

    Jan

  7. #7
    Junior Member
    Join Date
    Jan 2013
    Posts
    7
    Quote Originally Posted by DJanGo View Post
    maybe another Thread in the German subforum would be easier ;-)
    Hallo Jan,

    We can do that as soon as a solution is found (with English we can have bigger audience)

    So I did what you had asked me about - the result is the same (http://wiki.slimdevices.com/index.ph...gMySQLInstance)

    Some tables are empty; some are not.

    mysql> use slimserver;
    Database changed
    mysql> show tables;
    +----------------------+
    | Tables_in_slimserver |
    +----------------------+
    | albums |
    | comments |
    | contributor_album |
    | contributor_track |
    | contributors |
    | dbix_migration |
    | genre_track |
    | genres |
    | images |
    | metainformation |
    | playlist_track |
    | pluginversion |
    | progress |
    | rescans |
    | scanned_files |
    | tracks |
    | tracks_persistent |
    | unreadable_tracks |
    | videos |
    | years |
    +----------------------+
    20 rows in set (0.00 sec)

    NON-empty tables:
    ------------------
    albums
    comments
    contributors
    dbix_migration
    metainformation
    progress
    tracks
    tracks_persistent
    years

    --------------
    mysql> describe albums;
    +--------------------+----------------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +--------------------+----------------------+------+-----+---------+----------------+
    | id | int(10) unsigned | | PRI | NULL | auto_increment |
    | title | blob | YES | MUL | NULL | |
    | titlesort | text | YES | MUL | NULL | |
    | titlesearch | text | YES | MUL | NULL | |
    | customsearch | text | YES | MUL | NULL | |
    | compilation | tinyint(1) | YES | MUL | NULL | |
    | year | smallint(5) unsigned | YES | MUL | NULL | |
    | artwork | varchar(8) | YES | MUL | NULL | |
    | disc | tinyint(1) unsigned | YES | MUL | NULL | |
    | discc | tinyint(1) unsigned | YES | MUL | NULL | |
    | replay_gain | float | YES | | NULL | |
    | replay_peak | float | YES | | NULL | |
    | musicbrainz_id | varchar(40) | YES | | NULL | |
    | musicmagic_mixable | tinyint(1) | YES | | NULL | |
    | contributor | int(10) unsigned | YES | | NULL | |
    +--------------------+----------------------+------+-----+---------+----------------+
    15 rows in set (0.00 sec)

    mysql> describe contributors;
    +--------------------+------------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +--------------------+------------------+------+-----+---------+----------------+
    | id | int(10) unsigned | | PRI | NULL | auto_increment |
    | name | blob | YES | MUL | NULL | |
    | namesort | text | YES | MUL | NULL | |
    | namesearch | text | YES | MUL | NULL | |
    | customsearch | text | YES | MUL | NULL | |
    | musicbrainz_id | varchar(40) | YES | | NULL | |
    | musicmagic_mixable | tinyint(1) | YES | | NULL | |
    +--------------------+------------------+------+-----+---------+----------------+
    7 rows in set (0.00 sec)


    -----------------

    Same examples;

    mysql> select id,title,year from albums;
    +----+--------------------------------------------------+------+
    | id | title | year |
    +----+--------------------------------------------------+------+
    | 1 | Greatest hits. CD1 | 2007 |
    +----+--------------------------------------------------+------+
    1 row in set (0.01 sec)


    mysql> select * from contributors;
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    | id | name | namesort | namesearch | customsearch | musicbrainz_id | musicmagic_mixable |
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    | 2 | A-ha | A-HA | A-HA | NULL | NULL | NULL |
    | 3 | No Artist | NO ARTIST | NO ARTIST | NULL | NULL | NULL |
    | 4 | Various Artists | VARIOUS ARTISTS | VARIOUS ARTISTS | NULL | NULL | NULL |
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    3 rows in set (0.00 sec)



    I tried different DBD::mysql & MySQL versions. The result was always the same.

    So the problem doesn't lie on MySQL or DBD::MySQL driver. Client is connected, DB, tables created. But when it comes to data import....

    Thank you,
    tals

  8. #8
    Senior Member
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    616
    Quote Originally Posted by tals View Post
    Hallo Jan,

    Some tables are empty; some are not.

    mysql> select id,title,year from albums;
    since the error is
    Column 'contributor' cannot be null
    select * from albums;
    should be more interesting.

    +----+--------------------------------------------------+------+
    | id | title | year |
    +----+--------------------------------------------------+------+
    | 1 | Greatest hits. CD1 | 2007 |
    +----+--------------------------------------------------+------+
    1 row in set (0.01 sec)
    ok - 1 Album only....
    mysql> select * from contributors;
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    | id | name | namesort | namesearch | customsearch | musicbrainz_id | musicmagic_mixable |
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    | 2 | A-ha | A-HA | A-HA | NULL | NULL | NULL |
    | 3 | No Artist | NO ARTIST | NO ARTIST | NULL | NULL | NULL |
    | 4 | Various Artists | VARIOUS ARTISTS | VARIOUS ARTISTS | NULL | NULL | NULL |
    +----+-----------------------+-----------------+-----------------+--------------+----------------+--------------------+
    3 rows in set (0.00 sec)
    but 3 artists - try the import with a Album - that had only one Artist and is fully tagged - "No Artist" :-(

    Last but not least i am under 7.72 also and Perl-Version: 5.14.2 - this is the 7.72 std you are under 5.10.
    Its only a suggestion - i am not completly sure if 5.14 is needed or just a bugfixed Version.
    Gruss

    Jan

  9. #9
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,916
    I'm a little surprised it runs using MySQL without InnoDB. Then again, maybe it doesn't.

  10. #10
    Junior Member
    Join Date
    Jan 2013
    Posts
    7
    Quote Originally Posted by JJZolx View Post
    I'm a little surprised it runs using MySQL without InnoDB. Then again, maybe it doesn't.
    Hi All,

    Well, MySQL 4.1.22 (optware distribution) is built without InnoDB just to save memory (only 128Mb is available on my NAS)
    Never the less, I rebuilt it with InnoDB support but the issue persists, unfortunately. (both with MySQL 4.1.22 & 5.0.88)

    The funniest thing is that everything is working when I switch to SQLite DB. So the question is why doesn't work with MySQL?
    The issue occurs when data are imported but with wrong parameters. In fact it is logical when LMS tries to insert empty data into a not-nullable column and an SQL exception is thrown...

    I'll try to re-build all platform specific packages by the end of this weekend and hope it will help.

    Thank you,
    tals

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •