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

Sql error - import new computer from Ocs #75

Closed
pkolan opened this Issue Jan 27, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@pkolan

pkolan commented Jan 27, 2017

Hello,
when I want to import new computer, nothing happens. I have a connection to the Ocs server.
Ocs 2.3 on Ubuntu 16.04
GLPI 9.1.1 on the same server
Ocs Inventory NG 1.3.2

Sql-errors.log

2017-01-27 08:35:54 [2@ocs]
*** MySQL query error:
SQL: SELECT * FROM glpi_plugin_ocsinventoryng_ocsservers WHERE HARDWARE_ID = 21
Error: Unknown column 'HARDWARE_ID' in 'where clause'
Backtrace :
...ns/ocsinventoryng/inc/ocsdbclient.class.php:133
plugins/ocsinventoryng/inc/ocsclient.class.php:279 PluginOcsinventoryngOcsDbClient->getComputerRule()
plugins/ocsinventoryng/hook.php:1641 PluginOcsinventoryngOcsClient->getOcsComputer()
inc/plugin.class.php:1196 plugin_ocsinventoryng_ruleCollectionPrepareInputDataForProcess()
inc/rulecollection.class.php:1622 Plugin::doOneHook()
inc/rulecollection.class.php:1448 RuleCollection->prepareInputDataForProcessWithPlugins()
...ins/ocsinventoryng/inc/ocsserver.class.php:2526 RuleCollection->processAllRules()
...ins/ocsinventoryng/inc/ocsserver.class.php:2047 PluginOcsinventoryngOcsServer::importComputer()
plugins/ocsinventoryng/front/ocsng.import.php:73 PluginOcsinventoryngOcsServer::processComputer()

@tsmr

This comment has been minimized.

Show comment
Hide comment
@tsmr

tsmr Jan 27, 2017

Contributor

Can you give me the criteria used into the two rules engines for OCSNG ?

Contributor

tsmr commented Jan 27, 2017

Can you give me the criteria used into the two rules engines for OCSNG ?

@pkolan pkolan closed this Jan 27, 2017

@pkolan pkolan reopened this Jan 27, 2017

@pkolan

This comment has been minimized.

Show comment
Hide comment
@pkolan

pkolan commented Jan 27, 2017

glpi_test
glpi_rule2
glpi_rule1

@pkolan

This comment has been minimized.

Show comment
Hide comment
@pkolan

pkolan Jan 30, 2017

Any ideas?

pkolan commented Jan 30, 2017

Any ideas?

@tsmr

This comment has been minimized.

Show comment
Hide comment
@tsmr

tsmr Jan 30, 2017

Contributor

I still can not replicate your problem

Contributor

tsmr commented Jan 30, 2017

I still can not replicate your problem

@pkolan

This comment has been minimized.

Show comment
Hide comment
@pkolan

pkolan Jan 30, 2017

Ok, I will be waiting

pkolan commented Jan 30, 2017

Ok, I will be waiting

@tsmr

This comment has been minimized.

Show comment
Hide comment
@tsmr

tsmr Mar 18, 2017

Contributor

Can you try with last version ?

Contributor

tsmr commented Mar 18, 2017

Can you try with last version ?

@tsmr tsmr added the bug label Mar 18, 2017

@ndlpaix56

This comment has been minimized.

Show comment
Hide comment
@ndlpaix56

ndlpaix56 Mar 22, 2017

OCS 2.3.1
GLPI 9.1.2
PLUGIN OCS INVENTORY NG 1.3.2

Hello,
I reproduced the bug when GLPI and OCS are installed on the same database.

The PHP code is searching glpi_plugin_ocsinventoryng_ocsservers table in OCS database.

ocsdbclient.class.php:134 : if (self::OcsTableExists($table))
As is the same database, it returns true of course

If you change by if (self::OcsTableExists($table) && $table != "glpi_plugin_ocsinventoryng_ocsservers") {
the synchronization is success.

The question is why we can't installed this softwares in the same database ?

Sorry for my bad English ... I am French and I never have the opportunity to speak English.

ndlpaix56 commented Mar 22, 2017

OCS 2.3.1
GLPI 9.1.2
PLUGIN OCS INVENTORY NG 1.3.2

Hello,
I reproduced the bug when GLPI and OCS are installed on the same database.

The PHP code is searching glpi_plugin_ocsinventoryng_ocsservers table in OCS database.

ocsdbclient.class.php:134 : if (self::OcsTableExists($table))
As is the same database, it returns true of course

If you change by if (self::OcsTableExists($table) && $table != "glpi_plugin_ocsinventoryng_ocsservers") {
the synchronization is success.

The question is why we can't installed this softwares in the same database ?

Sorry for my bad English ... I am French and I never have the opportunity to speak English.

@pkolan

This comment has been minimized.

Show comment
Hide comment
@pkolan

pkolan Mar 22, 2017

It works, now i can import computers.
Thanks ndlpaix56

pkolan commented Mar 22, 2017

It works, now i can import computers.
Thanks ndlpaix56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment