Ad Widget

Collapse

SQL Query error when adding a template containing an already existing application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #1

    SQL Query error when adding a template containing an already existing application

    If I understood correctly, I should be able to add multiple templates to a host, which contain overlapping Applications.
    However, when I try this in my Zabbix 2.2.1 installation, I get this SQL error:
    Code:
        Error in query [INSERT INTO applications (name,hostid,applicationid) VALUES ('Active Directory','10572','8815'),('LDAP service','10572','8816'),('Windows Services','10572','8817') ] [Duplicate entry '10572-Windows Services' for key 'applications_2']
        SQL statement execution has failed "INSERT INTO applications (name,hostid,applicationid) VALUES ('Active Directory','10572','8815'),('LDAP service','10572','8816'),('Windows Services','10572','8817') ".
    Anybody any idea why this is not working ? Or should I file a bugreport ?
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #2
    I'm having the same issue, did you open a bug report?

    Thx,

    G.

    Comment

    • chojin
      Member
      Zabbix Certified Specialist
      • Jul 2011
      • 64

      #3
      I did not as I did not receive any reaction here, concluding that I was the only one having this problem.. And nobody confirming this was indeed a problem that normally should work..

      I did not yet upgrade to the latest version to see if this problem still exists.. Did you?

      Comment

      • gleepwurp
        Senior Member
        • Mar 2014
        • 119

        #4
        I'm still running at 2.2.1...

        I'll set up a quick 2.2.2 environment and see if the problem exists there as well...

        G.

        Comment

        • gleepwurp
          Senior Member
          • Mar 2014
          • 119

          #5
          Hi Chojin,

          did some additional tests in 2.2.1 and I think I found out what the issue is, maybe its the same thing with you.

          If the overlapping Application names have exactly the same Case, ie: all upper case or all lowercase, or case-match, then we don't have any issues...

          If however the Application names don't have the same case, ie: OS vs os, then we get our error message, as since the case is not the same, it tries to add a new "item" entry, but that entry doesn't seem to be case sensitive, and so we get our Error message.

          So I'm thinking some part of the code is case-sensitive, while some other validation part of it is not, and gives us the error that the "item" already exists.

          I'll open up a Bug Report and let you know the number.

          G.

          Comment

          • gleepwurp
            Senior Member
            • Mar 2014
            • 119

            #6
            I had the Same issue with 2.2.2.

            Created Zabbix Bug Report: ZBX-7958



            In the meantime, if you keep your Application names standard (respecting the case of the existing Applications), you should be ok.

            G.

            Comment

            • chojin
              Member
              Zabbix Certified Specialist
              • Jul 2011
              • 64

              #7
              Indeed case-sensitivity seems to be the problem in my case too.. That I didn't see this disappoints me a little :-)

              Anyway thanks for the analysis and the bug creation.. hopefully it will soon be addressed by Zabbix devs..

              Comment

              • gleepwurp
                Senior Member
                • Mar 2014
                • 119

                #8
                Hi,

                Aleksandrs Saveljevs just put in a comment in the bug report and altering the MySQL database to be case-Sensitive does solve our issue, although you will end up with a new, "duplicate" Application in your list, since case-sensitivity in the Application field sees both Application as distinctive.

                I've tried this on my Zabbix VM and it works, but this doesn't seem to be "fully" tested. The people who initially made the change have not noticed any errors, but I'd rather give you full disclosure before you attempt to make the change.

                G.

                Comment

                Working...