Ad Widget

Collapse

trunk, r7707: sqlite db does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #1

    trunk, r7707: sqlite db does not work

    attempting to use zabbix_proxy with sqlite database fails. logfile lists many warning regarding transactions like :

    Code:
    Query without transaction detected [BEGIN TRANSACTION;CREATE TABLE IF NOT EXISTS...
    Query without transaction detected [PRAGMA synchronous = 0]
    Query without transaction detected [PRAGMA temp_store = 2]
    it sort of creates the database, but then dies with :
    [Z3005] Query failed: [0] no such table: ids [select nextid from ids where table_name='proxy_history' and field_name='history_lastid']
    Zabbix 3.0 Network Monitoring book
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    additional information :
    sqlite 3.2.8;

    and it looks actually tables were not created :

    Code:
    $ sqlite3 zabbix_proxy.db
    SQLite version 3.2.8
    Enter ".help" for instructions
    sqlite> .databases
    seq  name             file
    ---  ---------------  ----------------------------------------------------------
    0    main             /tmp/zabbix_proxy.db
    sqlite> .tables
    sqlite>
    Zabbix 3.0 Network Monitoring book

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #3
      attempting to create table manually from the logged query :
      Code:
      CREATE TABLE IF NOT EXISTS slideshows ( slideshowid bigint DEFAULT '0' NOT NULL, name varchar(255) DEFAULT '' NOT NULL, delay integer DEFAULT '0' NOT NULL, PRIMARY KEY (slideshowid));
      SQL error: near "NOT": syntax error
      Zabbix 3.0 Network Monitoring book

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        ...and, for the record, proxy works just fine if tables are created manually with the same queries, only removing "IF NOT EXISTS" parts
        Zabbix 3.0 Network Monitoring book

        Comment

        • NOB
          Senior Member
          Zabbix Certified Specialist
          • Mar 2007
          • 469

          #5
          Originally posted by richlv
          additional information :
          sqlite 3.2.8;

          and it looks actually tables were not created :

          Code:
          $ sqlite3 zabbix_proxy.db
          SQLite version 3.2.8
          Enter ".help" for instructions
          sqlite> .databases
          seq  name             file
          ---  ---------------  ----------------------------------------------------------
          0    main             /tmp/zabbix_proxy.db
          sqlite> .tables
          sqlite>
          Hi

          we faced the same problem with "IF NOT EXISTS" and SQLite version 3.2.8 and
          used the same work-around like you did.
          Are you by chance using Solaris und the Blastwave packages like we did ?
          If you read the ZABBIX manual it says: SQLite3 supported starting with version 3.3.5 !

          Did you do tests with later versions ?

          We didn't do it, yet.

          Regards

          Norbert.

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            heh, i guess i should read manual more =)
            but it also fails for me with sqlite 3.6.14.2 :
            Code:
            [Z3001] Connection to database '/tmp/zabbix_proxy.db' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)
            edit : nope, using slackware/sles here, distro provided sqlite packages, self compiled zabbix
            Zabbix 3.0 Network Monitoring book

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              well, duh. that message was quite misleading. turns out, i had proxy compiled with mysql support.
              compiling it with sqlite support - and now it seems to work as advertised.
              sorry for the noise :>
              Zabbix 3.0 Network Monitoring book

              Comment

              Working...