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 2008-08-06 16:17:20

snowman386
Member
Registered: 2006-07-28
Posts: 88

OCS Cron running but not syncing

I have had a cron job setup for several months for the mailgate and ocsng sync. Everything was working fine until a recent upgrade (probably 0.70 or 0.71). In the cron log, i can see that the cron job is running because there are entries "launch ocsng." However, when i go to the "tools">"ocsng" page, there are new computers that are not imported and computers not synchronized with glpi. It is definitely not a record limit problem because its always the same computers on the list. There are a lot of new options on the "setup">"ocsng mode" page. Do i need to change some of these for the auto sync to continue working? i noticed "activate the automatic link" was turned off. I turned it on but still no sync. Do i have to configure the "existence criteria of a computer" settings?

Offline

#2 2008-08-06 16:24:11

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: OCS Cron running but not syncing

hello
if the same computer is never imported, then it should match none of the rules
you should check your rules to affect computers to an entity

Offline

#3 2008-08-06 16:55:49

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

are you referring to the "existence criteria of a computer" rules? to me, that seems to refer to the "link new ocs computers to existing glpi computers" option in the "tools">"ocsng" page. That is not really the problem i am having. New computers are not being imported (the "import new computers" page contains computers) and the current computers in glpi that are marked as "autoupdate" are not being updated (the "synchronize computers already imported" page contains computers). This all worked perfectly before upgrading glpi versions. Ive not updated the ocsng settings so im confused why it has stopped working. Is there a log for the ocs cron job? The cron.log really does not show any detail.

I did configure the autmatice connection of machines settings to these but still is doing the same thing described above.

Automatic connection of machines
Activate the automatic link   Yes   
Existence criteria of a computer
IP   No  Mac Address   Yes 
Name of computer  No Serial Number  Yes 
Find computers having the status    -----

Last edited by snowman386 (2008-08-06 17:03:37)

Offline

#4 2008-08-06 17:17:35

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: OCS Cron running but not syncing

no, here is the process of importing a new computer into glpi
1/ glpi connects to ocs database and gets a list of all the machines to import/synchronize
2/ glpi dectects that a machine, coming from ocs, doesn't exists in his database
3/ the rule engine is processed, with the datas from ocs as input. this engine tries to detect in which entity the computer should be place
4/ if an entity was found (eg the datas matched a rule), the computer is imported in this entity. If no rules matched, then the computer is not import

the rule engine configuration is accessible in Administration -> rules -> Rules to affect a computer to an entity

Offline

#5 2008-08-06 17:58:09

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

there is one active rule. here are the details:

Criteria
  Criteria Condition Reason
OCS TAG is *

Actions
  Fields Action type Value
Entity Assign Root entity

What do i need to change?

I changed it to match on the ocs server instead of ocs tag and it still is not working. The same new computers and computers needing to be synchronized show up in the "tools">"ocsng" page.

Just a note: I can perform these functions manually but it just is not working when the cron job runs.

Last edited by snowman386 (2008-08-06 23:14:34)

Offline

#6 2008-08-07 19:52:55

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

I turned on debug mode but it did not really add any detail to the cron.log file. Said it checked for updates on the ocs server. There are a lot of errors in the php_errors.log file saying "runtime notice(2048): var: Deprecated. Please use the public/private/protected modifiers"

Offline

#7 2008-08-07 22:55:45

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: OCS Cron running but not syncing

updgrade your version of php
it's a known error (was reported several times on the forum)

Offline

#8 2008-08-07 23:21:07

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

i have the lastes version available for ubuntu 6.06 - 5.1.2

Offline

#9 2008-08-08 07:13:02

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: OCS Cron running but not syncing

5.1.2 is really a poor PHP version...
GLPI can work with it (we use it, but upgrade is near), but you cannot use the debug mode, really too much warning

++


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#10 2008-09-16 16:49:42

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

I upgraded the server to ubuntu 8.04. This included updating to php 5.2.4. This problem is still occurring. All the cron functions run great except for ocs. Computers keep piling up in the "Synchronize computers already imported". There is no php errors file at all so there are no php errors occurring. Can someone please help me figure this out.

Thanks.

Offline

#11 2008-09-16 17:49:36

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: OCS Cron running but not syncing

In debug mode ?


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#12 2008-09-16 17:52:37

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

yes. in debug mode. there were php errors with a few plugins so i removed them and cleared the log. after that, no php error file was created while in debug mode. the cron.log file still shows all the processes running including ocs, mailgate, dbreplicate.

Offline

#13 2008-11-03 18:27:36

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

anybody have any other ideas? Some suggested changing permissions on the files dir. i even tried changing it to 777 on the dir and all files in it. When i run preview mode for manual syncs, it displays the green bubble indicating that it matches a rule. Manual syncing works fine but not from the cron job. Do i have to set the default status? It's the only thing that is blank on the "automatic connection of machines" and "import options".

Offline

#14 2008-12-01 17:03:51

snowman386
Member
Registered: 2006-07-28
Posts: 88

Re: OCS Cron running but not syncing

I upgraded to 0.71.3 and all is well now. Dont know what you did but it works great. Thanks

Offline

Board footer

Powered by FluxBB