Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23182

SQL error when trying to save host with non-existing proxy.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 4.0.47
    • API (A), Frontend (F)
    • None

      Steps to reproduce:

      1. create a proxy;
      2. open host form;
      3. select the proxy;
      4. secretly delete the proxy in another tab;
      5. save host

      Result:

      Error in query [UPDATE hosts SET hostid='10582',host='asd',name='asd',status='0',proxy_hostid='10585',tls_connect='1',tls_accept='1',tls_psk_identity='',tls_psk='',tls_issuer='',tls_subject='' WHERE hostid='10582'] [Cannot add or update a child row: a foreign key constraint fails (`zabbix_zn_7410c`.`hosts`, CONSTRAINT `c_hosts_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`))] [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerHostUpdate->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->update() → CHost->massUpdate() → DB::update() → DBexecute() → trigger_error() → CConfigFile->{closure}() in conf/zabbix.conf.php:181]
      
      SQL statement execution has failed "UPDATE hosts SET hostid='10582',host='asd',name='asd',status='0',proxy_hostid='10585',tls_connect='1',tls_accept='1',tls_psk_identity='',tls_psk='',tls_issuer='',tls_subject='' WHERE hostid='10582'".

       

            zabbix.dev Zabbix Development Team
            Miks.Kronkalns Miks Kronkalns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: