Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Search

    Fatal error bei update der categorie CATG__IP

    Entwicklung
    3
    5
    940
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      frisbee23 last edited by

      hi,
      ich verwende https://github.com/bheisig/i-doit-api-client-php um die categorie CATG__IP eines virtuellen server upzudaten.
      anlegen des categorie-eintrags funktioniert, updaten dann nichtmehr 😞
      anlegen und updaten ANDERER kategorien (zb. CPU,RAM) funktioniert.

      relevanter codeteil:
      $entryID = $category->update( $oid, $cate, $data);
      //data ist zu dem zeitpunkt:
                              'id'=> 652,
                              'net' => $fa->mynet,
                              'net_type' => 1,
                              'ipv4_assignment' => 2,
                              'hostname' => myservername,
                              'domain' => my.domain,
                              'active' => true,
                              "ipv4_address" =>  $fa->ansible_default_ipv4->address

      auch wenn ich weniger versuche upzudaten zb. nur net_type=1 geht es schief.

      und zwar der webserver hat fehler 500 mit:
      PHP Fatal error:  Uncaught TypeError: Argument 2 passed to isys_cmdb_dao_category_g_ip::set_hostname_pairs() must be of the type array, string given, called in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php on line 721 and defined in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php:4840\nStack trace:\n#0 /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php(721): isys_cmdb_dao_category_g_ip->set_hostname_pairs('652', '652')\n#1 /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php(4628): isys_cmdb_dao_category_g_ip->save('652', 'myservername', 2, '192.168.49.15', '0', '652', '652', NULL, '1', '1', '4877', NULL, 2, NULL, NULL, '1', '1', NULL, 'my.domain', '652')\n#2 /var/www/i-doit/src/classes/modules/api/model/cmdb/isys_api_model_cmdb_category.class.php(810): isys_cmdb_dao_category_g_ip->sync(Array, 21841, 2)\n#3 /var/www/i-doit/src/classes/modules/api in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php on line 4840

      ====> ich hab myservername und my.domain sowohl oben als auch in der fehlermeldung editiert, um unseren kunden zu schuetzen!
      die waren identisch.

      vielleicht hatte jemand schon mal aehnlicheprobleme beim updaten der wohl haeufig genutzten hostaddress categorie ?
      vielleicht ahnt ein entwickler nach kurzem blick was da schief geht ?
      vielleicht kann jemand ein codeschnipsel posten von einem funktionierendem update dieser categorie ?

      bin fuer jede hilfe dankbar.

      gruesse,
      fil

      ps: habt ihr schonmal ueberlegt, idoit, wenn es open-source ist, auf github oder selbstegehostetes gitlab zu stellen? is ein so schoener de-facto standard… ich hab vorhin versucht die source von i-doit online zu browsen. geht wohl nicht 😞

      1 Reply Last reply Reply Quote 0
      • F
        frisbee23 last edited by

        is ein known bug, wird in version 10.1 gefixed. die kommt am26.2 raus

        1 Reply Last reply Reply Quote 0
        • bheisig
          bheisig i-doIT Team last edited by

          Hallo.

          @frisbee23:

          ps: habt ihr schonmal ueberlegt, idoit, wenn es open-source ist, auf github oder selbstegehostetes gitlab zu stellen? is ein so schoener de-facto standard… ich hab vorhin versucht die source von i-doit online zu browsen. geht wohl nicht 😞

          Ja, die Überlegungen laufen 🙂

          @frisbee23:

          is ein known bug, wird in version 10.1 gefixed. die kommt am26.2 raus

          Genau richtig.

          1 Reply Last reply Reply Quote 0
          • F
            frisbee23 last edited by

            leider in der neuen version 1.10.1 anscheinend NICHT behoben:

            hallo, ich habs gerade wieder mit version 1.10.1 probiert, aber es kommt noch der selbe fehler:

            [Thu Mar 01 18:50:05.809998 2018] [:error] [pid 24363] [client 91.233.191.26:30802] PHP Fatal error: Uncaught TypeError: Argument 2 passed to isys_cmdb_dao_category_g_ip::set_hostname_pairs() must be of the type array, string given, called in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php on line 682 and defined in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php:2607\nStack trace:\n#0 /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php(682): isys_cmdb_dao_category_g_ip->set_hostname_pairs('426', '426')\n#1 /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php(3930): isys_cmdb_dao_category_g_ip->save('426', 'XXXXX', 2, '192.168.47.78', '0', '426', '426', NULL, true, 1, 4879, '', 2, NULL, NULL, '1', '1', NULL, 'XXXXX', '426')\n#2 /var/www/i-doit/src/classes/modules/api/model/cmdb/isys_api_model_cmdb_category.class.php(810): isys_cmdb_dao_category_g_ip->sync(Array, 4903, 2)\n#3 /var/www/i-doit/src/classes/modules/api in /var/www/i-doit/src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php on line 2607

            (kunden daten ausgeblendet mit XXXXX)

            1 Reply Last reply Reply Quote 0
            • dkirsten
              dkirsten last edited by

              Hi,

              in 1.10.1 ist nur das erstellen, nicht das Updaten gefixed. Ich habe eben einen Hotfix angehangen, der muss nach /src/classes/modules/cmdb/dao/category/global/isys_cmdb_dao_category_g_ip.class.php

              isys_cmdb_dao_category_g_ip.class.php

              Viele Grüße,

              Daniel

              1 Reply Last reply Reply Quote 0
              • First post
                Last post