Ad Widget

Collapse

Error: Cannot Add Host in 1.8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coop
    Member
    • Aug 2009
    • 46

    #1

    Error: Cannot Add Host in 1.8

    I'm trying to add a new host for the first time since upgraded from 1.6.7 to 1.8. I'm adding only the basic elements for name, group, dns and connect to settings. There are no IPMI settings being added to the host. We're running on an Oracle 10.2 database.

    Details
    Code:
    	ERROR: Cannot add host
    
        * SQL error [ORA-01400: cannot insert NULL into ("ZABBIX"."HOSTS"."IPMI_IP")] in [INSERT INTO hosts (hostid, proxy_hostid, host, port, status, useip, dns, ip, disable_until, available,useipmi,ipmi_port,ipmi_authtype,ipmi_privilege,ipmi_username,ipmi_password,ipmi_ip) VALUES (10118,0,'test',10050,0,1,'test','0.0.0.0',0,0,0,623,-1,2,'','','')]
       
        * SQL error [ORA-01400: cannot insert NULL into ("ZABBIX"."HOSTS"."IPMI_IP")] in [INSERT INTO hosts (hostid, proxy_hostid, host, port, status, useip, dns, ip, disable_until, available,useipmi,ipmi_port,ipmi_authtype,ipmi_privilege,ipmi_username,ipmi_password,ipmi_ip) VALUES (10118,0,'test',10050,0,1,'test','0.0.0.0',0,0,0,623,-1,2,'','','')]
    When we applied the 1.8 patch for Oracle we did receive errors on NULL settings:

    Code:
    alter table hosts add ipmi_error nvarchar2(128) DEFAULT '' NOT NULL
    alter table hosts add snmp_error nvarchar2(128) DEFAULT '' NOT NULL
    alter table items add username nvarchar2(64) DEFAULT '' NOT NULL
    alter table items add password nvarchar2(64) DEFAULT '' NOT NULL
    alter table items add publickey nvarchar2(64) DEFAULT '' NOT NULL
    alter table items add privatekey nvarchar2(64) DEFAULT '' NOT NULL
    When we checked the Oracle tables other items were set to accept NULL so we quick fixed these entries by removing the NOT NULL settings.

    Is this an acceptable quick fix for the errors above as well?
  • coop
    Member
    • Aug 2009
    • 46

    #2
    Just as an add-on.

    We have tried setting the IPMI_IP field to accept NULL values just for testing, however we receive a Unknown ZABBIX internal error

    A Clone of an existing host produces the same error.

    A Full Clone of an existing host does not provide any errors.

    We're not changing anything about the host info except the name and dns address. No templates, profiles, IPMI....
    Last edited by coop; 23-12-2009, 14:07.

    Comment

    • pschulz
      Junior Member
      • Nov 2009
      • 1

      #3
      just for the record:
      i am experiencing the same problem with zabbix 1.8 and Oracle 11gR2

      greetings
      Philipp

      Comment

      • untergeek
        Senior Member
        Zabbix Certified Specialist
        • Jun 2009
        • 512

        #4
        I am experiencing the exact same problem. I couldn't even get a full clone to work, until I did this:

        I used Toad to connect to Oracle. I discovered that the defaults all had a TAB character (or some other invisible character) at the end of the line. EVERY SINGLE LINE.

        I edited the table definitions to remove this character and hey! My host adds started to work (if they were the product of a full clone)!

        I added a bug for this yesterday:

        Comment

        • untergeek
          Senior Member
          Zabbix Certified Specialist
          • Jun 2009
          • 512

          #5
          I have to point the finger at the frontend. Auto-discovery adds hosts and templates to hosts just fine. It's the frontend that has the problem.

          Comment

          • untergeek
            Senior Member
            Zabbix Certified Specialist
            • Jun 2009
            • 512

            #6
            By the way, the table column IPMI_IP is set to NOT NULL by the patch.sql but the OOTB schema sets it to allow NULL entries. The same is visible for all of those columns you changed to allow NULLs.

            Comment

            • mvrk
              Member
              • Oct 2008
              • 71

              #7
              i've installed latest build (8857) and i removed the tabs from oracle.sql, using tr (cat oracle.sql | tr -s '\t' ' ' > new_oracle.sql)
              and also runned dos2unix on the file and created the schema again on my database.

              I still can't create new hosts, but i've been able to full clone 3 times from the original Zabbix server host. But now everytime i try to full clone again i get the error.

              Comment

              Working...