Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Import with various errors #354

Open
silvanetgmcs opened this issue Apr 24, 2023 · 11 comments
Open

Partial Import with various errors #354

silvanetgmcs opened this issue Apr 24, 2023 · 11 comments

Comments

@silvanetgmcs
Copy link

silvanetgmcs commented Apr 24, 2023

Plugin Version 2.04
GLPI Version 10.0.7
OCSReports Version 2.11.1

I have over 10,000 devices in OCSInventory. The import into GLPI brings over 7,000 but however not all of the devices get imported into GLPI. I have no filters on imports.

In ocsng_fullsync.log, I see lots of these messages


PHP Deprecated:  Creation of dynamic property PluginOcsinventoryngOcsDbClient::$dbname is deprecated in /var/www/glpi/marketplace/ocsinventoryng/inc/ocsdbclient.class.php on line 55

PHP Deprecated function (8192): Creation of dynamic property PluginOcsinventoryngOcsDbClient::$dbname is deprecated in /var/www/glpi/marketplace/ocsinventoryng/inc/ocsdbclient.class.php at line 55

PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/glpi/src/DbUtils.php at line 2091


Anything thoughts or what I should look at next?

@silvanetgmcs
Copy link
Author

I do not know if this will help in the php-errors.log I get this

[2023-04-24 01:20:22] glpiphplog.WARNING:   *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/glpi/src/DbUtils.php at line 2091
  Backtrace :
  src/DbUtils.php:2091                               trigger_error()
  inc/db.function.php:585                            DbUtils->getDbRelations()
  src/CommonDBTM.php:866                             getDbRelations()
  src/CommonDBTM.php:788                             CommonDBTM->cleanRelationData()
  src/CommonDBTM.php:2064                            CommonDBTM->deleteFromDB()
  ...ce/ocsinventoryng/inc/networkport.class.php:502 CommonDBTM->delete()
  ...etplace/ocsinventoryng/inc/device.class.php:545 PluginOcsinventoryngNetworkPort::importNetwork()
  ...ce/ocsinventoryng/inc/ocsprocess.class.php:1330 PluginOcsinventoryngDevice::updateDevices()
  ...ace/ocsinventoryng/inc/ocsprocess.class.php:480 PluginOcsinventoryngOcsProcess::synchronizeComputer()
  ...e/ocsinventoryng/scripts/ocsng_fullsync.php:461 PluginOcsinventoryngOcsProcess::processComputer()
  ...e/ocsinventoryng/scripts/ocsng_fullsync.php:298 plugin_ocsinventoryng_importFromOcsServer()
  ...e/ocsinventoryng/scripts/ocsng_fullsync.php:179 SecondPass()

@TylerVD
Copy link

TylerVD commented May 5, 2023

Hello,

Same here since update to 10.0.7 and logs size is increasing.
image

@Stufo76
Copy link

Stufo76 commented May 11, 2023

Same here, anyone found a solution?

@kabassanov
Copy link

Similar issue: #355

@enryfantasy
Copy link

I solved editing file /var/www/glpi/marketplace/ocsinventoryng/inc/ocsdbclient.class.php adding ad line 42 the following code:

private $dname;

@TylerVD
Copy link

TylerVD commented Jun 30, 2023

Hi @enryfantasy,

I will try this for me.
Do you mean $dbname or $dname ?

Thx !

@enryfantasy
Copy link

enryfantasy commented Jun 30, 2023 via email

@JastrzebskiKrzysztof
Copy link

I mean $dbname. Sorry for the mistake. Il ven 30 giu 2023, 13:35 TylerVD @.***> ha scritto:
Tried, but it does not solve in my environment...

@JastrzebskiKrzysztof
Copy link

OS: debian 12
PHP: 8.2.7-1~deb12u1
GLPI: 10.0.10 (git)
OCSNG: 2.11.1 rev. 7069 (git)
ocsinventory-agent: 2.10.0-3 (deb)
ocsinventoryng plugin: 2.0.4 rev. 15930 (git)

Same problem here.
All work with assigning NIC's to swiches ports lost :-(
Force full resync is not an option - overwritten with next ocsng sync cronjob...

@ozit
Copy link

ozit commented Nov 12, 2023

Thanks @enryfantasy !
Adding
private $dbname;
line 42 resume the issue.
:-)

@Mirkk
Copy link

Mirkk commented Nov 22, 2023

Hi, unfortunately for me this does not solve the 3rd error in the original post, which is probably the origin for getting networks only on every second synchronisation:
PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/glpi/src/DbUtils.php at line 2091

Note: this is also NOT solved by 8433a48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants