You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2017-03-23 11:26:38

fricketo
Member
From: Germany
Registered: 2014-07-16
Posts: 71

Plugin: IP Adressing

Hi everyone,

i am using GLPI 0.84.7 and trying to configure the Plugin IP Adressing (Version: 2.1.0), but it won't work.

Things I ve allready done:

1. Download and install the plugin = check! wink
2. Adding one of our Networks with following attributes:
    Name: "Name of Network"
    Choose Network: "choosing the Network in the Dropdown"
    Subnets: "choosing the Name of the Subnet in the Dropdown"
    First IP Adress: "192.168.186.1"
    Last IP Adress= "192.168.186.255"
    Saying YES to the 4 Dropdowns
    Safe
3. After adding i click on the IP Adressing Network, but all i get is a empty list of ip Address.
4. I opened one PC in the Inventory register and gave him manualy the Name of the Network, but nothing changed.
5. Tried also a lot of other things, which i cant all explain (cause i dont remember wink)
6. Looked into the SQL Log and see this:

"2017-03-22 21:39:39
*** MySQL query error:
***
SQL: SELECT `port`.`id`,
                     \'NetworkEquipment\' AS itemtype,
                     `dev`.`id` AS on_device,
                     `dev`.`name` AS dname,
                     \'\' AS pname,
                     `glpi_ipaddresses`.`name` as ip,
                     `port`.`mac`,
                     `dev`.`users_id`,
                     INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
               FROM `glpi_networkports` port
               LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id`
                     AND `port`.`itemtype` = \'NetworkEquipment\')
               LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
               LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
               WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                     AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                     AND `dev`.`is_deleted` = 0
                     AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  AND `glpi_networkequipments`.`networks_id` = 7 UNION SELECT `port`.`id`,
                                 \'Computer\' AS `itemtype`,
                                 `port`.`items_id`,
                                `dev`.`name` AS dname,
                                `port`.`name` AS pname,
                                `glpi_ipaddresses`.`name` as ip,
                                `port`.`mac`,
                                 `dev`.`users_id`,
                                INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
                        FROM `glpi_networkports` port
                        LEFT JOIN `glpi_computers` dev ON (`port`.`items_id` = `dev`.`id`
                              AND `port`.`itemtype` = \'Computer\')
                        LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
                        LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
                        WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                              AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                              AND `dev`.`is_deleted` = 0
                              AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  AND `glpi_computers`.`networks_id`= 7 UNION SELECT `port`.`id`,
                                 \'NetworkEquipment\' AS `itemtype`,
                                 `port`.`items_id`,
                                `dev`.`name` AS dname,
                                `port`.`name` AS pname,
                                `glpi_ipaddresses`.`name` as ip,
                                `port`.`mac`,
                                 `dev`.`users_id`,
                                INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
                        FROM `glpi_networkports` port
                        LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id`
                              AND `port`.`itemtype` = \'NetworkEquipment\')
                        LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
                        LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
                        WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                              AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                              AND `dev`.`is_deleted` = 0
                              AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  AND `glpi_networkequipments`.`networks_id`= 7 UNION SELECT `port`.`id`,
                                 \'Peripheral\' AS `itemtype`,
                                 `port`.`items_id`,
                                `dev`.`name` AS dname,
                                `port`.`name` AS pname,
                                `glpi_ipaddresses`.`name` as ip,
                                `port`.`mac`,
                                 `dev`.`users_id`,
                                INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
                        FROM `glpi_networkports` port
                        LEFT JOIN `glpi_peripherals` dev ON (`port`.`items_id` = `dev`.`id`
                              AND `port`.`itemtype` = \'Peripheral\')
                        LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
                        LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
                        WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                              AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                              AND `dev`.`is_deleted` = 0
                              AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  UNION SELECT `port`.`id`,
                                 \'Phone\' AS `itemtype`,
                                 `port`.`items_id`,
                                `dev`.`name` AS dname,
                                `port`.`name` AS pname,
                                `glpi_ipaddresses`.`name` as ip,
                                `port`.`mac`,
                                 `dev`.`users_id`,
                                INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
                        FROM `glpi_networkports` port
                        LEFT JOIN `glpi_phones` dev ON (`port`.`items_id` = `dev`.`id`
                              AND `port`.`itemtype` = \'Phone\')
                        LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
                        LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
                        WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                              AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                              AND `dev`.`is_deleted` = 0
                              AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  UNION SELECT `port`.`id`,
                                 \'Printer\' AS `itemtype`,
                                 `port`.`items_id`,
                                `dev`.`name` AS dname,
                                `port`.`name` AS pname,
                                `glpi_ipaddresses`.`name` as ip,
                                `port`.`mac`,
                                 `dev`.`users_id`,
                                INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
                        FROM `glpi_networkports` port
                        LEFT JOIN `glpi_printers` dev ON (`port`.`items_id` = `dev`.`id`
                              AND `port`.`itemtype` = \'Printer\')
                        LEFT JOIN `glpi_networknames` ON (`port`.`id` =  `glpi_networknames`.`items_id`)
                        LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
                        WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= \'3232283137\'
                              AND INET_ATON(`glpi_ipaddresses`.`name`) <= \'3232283176\'
                              AND `dev`.`is_deleted` = 0
                              AND `dev`.`is_template` = 0  AND  ( `dev`.`entities_id` IN (\'3\')  )  AND `glpi_printers`.`networks_id`= 7
Error: Unknown column 'glpi_networkequipments.networks_id' in 'where clause'
Backtrace :
C:\xampp\htdocs\helpdesk\plugins\addressing\inc\addressing.class.php&nbsp;:357        DBmysql->query()
C:\xampp\htdocs\helpdesk\plugins\addressing\inc\addressing.class.php&nbsp;:385        PluginAddressingAddressing->compute()
C:\xampp\htdocs\helpdesk\plugins\addressing\inc\addressing.class.php&nbsp;:472        PluginAddressingAddressing->showReport()
C:\xampp\htdocs\helpdesk\inc\commonglpi.class.php&nbsp;:284        PluginAddressingAddressing::displayTabContentForItem()
C:\xampp\htdocs\helpdesk\ajax\common.tabs.php&nbsp;:71        CommonGLPI::displayStandardTab()
C:/xampp/htdocs/helpdesk/ajax/common.tabs.php
"

Does anyone know what to do??? Or what i am doing wrong???

Last edited by fricketo (2017-03-23 11:29:06)


---------------------------------------------------
GLPI 9.1 on Windows Server 2008R2 with XAMPP
---------------------------------------------------

Offline

#2 2017-03-23 15:48:58

aliounegdiop
Member
Registered: 2016-08-03
Posts: 77

Re: Plugin: IP Adressing

did you choose what result to displaye, Assigned IP, Free IP etc

Offline

#3 2017-03-24 09:24:29

fricketo
Member
From: Germany
Registered: 2014-07-16
Posts: 71

Re: Plugin: IP Adressing

Hi aliounegdiop,

thx for your reply!
yes i choosed: assigned IP = YES; Free IP = YES; Same IP = YES; Reserved IP = YES

But it doesnt matter what to choose, because i'm getting a blank list all the time, except if i choose Free IP = NO, then i'm getting no list. So the Plugin thinks, every IP is free. But in my Inventory --> PC there a lot of entries for IP Adress....

Got an idea?


---------------------------------------------------
GLPI 9.1 on Windows Server 2008R2 with XAMPP
---------------------------------------------------

Offline

#4 2017-03-24 20:34:22

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Plugin: IP Adressing

'

Unknown column 'glpi_networkequipments.networks_id

In your database, to you have the field "networks_id" in glpi_networkequipments?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2017-03-24 23:42:39

fricketo
Member
From: Germany
Registered: 2014-07-16
Posts: 71

Re: Plugin: IP Adressing

Hi yllen,

yes there is the field "network_id" in glpi_networkequipments.
why? isn't it right?


---------------------------------------------------
GLPI 9.1 on Windows Server 2008R2 with XAMPP
---------------------------------------------------

Offline

#6 2017-03-26 16:58:16

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Plugin: IP Adressing

Because it's the error in your log.
Have you define a network in your item?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2017-03-27 09:01:55

fricketo
Member
From: Germany
Registered: 2014-07-16
Posts: 71

Re: Plugin: IP Adressing

Ok, so i have to define a Network for all items a network? Allready done it for all PC, and for all Network Equipment (like Switch, Firewalls, etc.).

Do I have also to do it, for all Printers, Periphals, Telefons, etc ???

Cause i got a lot Periphals because of the import from OCS Plugin...


---------------------------------------------------
GLPI 9.1 on Windows Server 2008R2 with XAMPP
---------------------------------------------------

Offline

Board footer

Powered by FluxBB