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-09-30 16:29:56

jvalla
Member
Registered: 2008-09-30
Posts: 5

OCSNG Auto Synchronization not happening

I am running the the latest stable version of GLPI 0.71.2 along side with the latest stable release of OCSNG

GLPI does not automatically synchronize or import new computers from OCSNG.

- Debug mode is on
- Manual synchronization works fine
- Manual importing works fine

The cron log file indicates that the ocsng job is running, however, nothing is pulled over. There are no errors in any of the logs.

Can someone point me in the right direction?

Thanks.

Offline

#2 2008-10-03 18:00:45

jvalla
Member
Registered: 2008-09-30
Posts: 5

Re: OCSNG Auto Synchronization not happening

Any takers?

Offline

#3 2008-10-09 07:45:44

umasse
Member
Registered: 2008-10-09
Posts: 2

Re: OCSNG Auto Synchronization not happening

Hi,

I figure I can post my message here...

I have installed OCSNG and GLPI together in a single Ubuntu 8.04 host.

Manual import and synchronization between OCSNG and GLPI works very well. But the automatic synchronization never happens.
I manually opened the address http://<server>/glpi/front/cron.php, to force the cron process.

I checked the log files at /var/www/glpi/files/_log, and the content of the cron.log says this:

2008-10-09 12:20:38
Launch mailgate
2008-10-09 12:20:38
mailgate Successfull (0.11s)
2008-10-09 12:24:25
Launch ocsng
2008-10-09 12:24:25
Check updates from server localhost
2008-10-09 12:25:46
Launch dbreplicate

So it seems the ocsng process is being called, but it doesn't synchronize new computers.

Any ideas? Any other log to look at?

Offline

#4 2008-10-09 07:47:05

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

Re: OCSNG Auto Synchronization not happening

Try Debug mode and check php and sql-errors.log.

And post information about your configuration (PHP version, MySQL version, GLPI version, ...)
++


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

#5 2008-10-09 07:57:22

umasse
Member
Registered: 2008-10-09
Posts: 2

Re: OCSNG Auto Synchronization not happening

Where can I find the sql-errors.log?

I am running:
PHP Version 5.2.4-2ubuntu5.3
Apache/2.2.8 (Ubuntu)
MySQL 5.0.51a-3ubuntu5.1
GLPI version 0.71.2
OCS Inventory 1.02 RC2

Last edited by umasse (2008-10-09 08:01:45)

Offline

#6 2008-10-17 17:55:15

spheron
Member
Registered: 2007-08-02
Posts: 32

Re: OCSNG Auto Synchronization not happening

I have the same behavior here. Manual sync with OCS works fine, cron sync doesn't. Having here the same entrys in the log file as above described. And no entry in the sql-errors.log file.

Sync works fine until i updated to 0.71.2.

Are there any new cognitions for this issue?


Greets
Marco

Offline

#7 2008-10-21 08:19:48

spheron
Member
Registered: 2007-08-02
Posts: 32

Re: OCSNG Auto Synchronization not happening

For me, the OCS sync works again. I gave the 'file' directory insufficient rights... :-(

Sorry, for the circumstances.

Greets
Marco

Offline

#8 2008-10-21 15:28:25

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

Re: OCSNG Auto Synchronization not happening

sure there is nothing else you did to fix it? tongue Ive had the same problem for a few months. I just double checked the permissions on the folder and www-data has full control on the files and config dir just like the directions state.

Offline

#9 2008-10-29 09:03:48

spheron
Member
Registered: 2007-08-02
Posts: 32

Re: OCSNG Auto Synchronization not happening

For testing try a chmod 777 or 755 at the 'file' directory. Perhaps you have insufficient right inside the 'file' dir ?!

Greets
Marco

Offline

#10 2008-10-30 12:45:51

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

I'm having the same problem here. Manual sync and impor works great, but auto sync never happens.
- I have no "file" directory. Are you referring to the "files" directory under "/var/www/glpi"?

Thanks for your help.

By the way, I'm using glpi 0.71.2, on debian etch, Apache2 2.2.3-4, php 5.2.0.8, mysql 5.0.32-7, OCS-NG 1.01.

Offline

#11 2008-10-30 12:53:03

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

Re: OCSNG Auto Synchronization not happening

Yes
All the tree under glpi/files must be writable for apache user.

++


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-10-30 13:13:11

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

Re: OCSNG Auto Synchronization not happening

I ran chmod -R 775 on the files directory and still not working.

Offline

#13 2008-10-30 13:47:34

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

Re: OCSNG Auto Synchronization not happening

775 does not give "write" acces to apache user if he is not the owner of the folder.

++


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

#14 2008-10-30 13:53:54

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

Excuse my ignorance, but which is the apache user? I suppose i have to "chown ""apache user"" files"?

Offline

#15 2008-10-30 14:44:45

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

Re: OCSNG Auto Synchronization not happening

I'm well aware of that. I already did a chown -R root:www-data on the files directory.

remi wrote:

775 does not give "write" acces to apache user if he is not the owner of the folder.

++

Offline

#16 2008-10-30 14:47:21

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

Re: OCSNG Auto Synchronization not happening

In my Ubuntu install, the user and group are stored in the /etc/apache2/envvars file. They might be stored there or in the httpd.conf file on your distro.

xabib wrote:

Excuse my ignorance, but which is the apache user? I suppose i have to "chown ""apache user"" files"?

Offline

#17 2008-10-31 18:13:38

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

Thanks for the help. It seems to work now.

Offline

#18 2008-11-05 17:35:54

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

Well, it seems it doesnt work so well as I thought. Here is my cron.log

30-10-2008 11:40
Launch optimize
30-10-2008 11:40
Start optimize tables
30-10-2008 11:40
Optimize tables done
30-10-2008 13:34
Launch session
30-10-2008 13:34
Clean session files created since more than 180 seconds
30-10-2008 13:34
session Successfull (0.00s)
30-10-2008 14:40
Launch contract
30-10-2008 15:29
Launch infocom
31-10-2008 13:56
Launch mailgate
31-10-2008 13:56
mailgate Successfull (0.00s)
31-10-2008 15:06
Launch logs
31-10-2008 15:06
Cleaning log events passed from more than 30 days
31-10-2008 16:46
Launch ocsng
31-10-2008 16:46
Check updates from server localhost
31-10-2008 16:46
Update computer 39
31-10-2008 16:46
Update computer 52
31-10-2008 16:46
Update computer 41
31-10-2008 17:02
Launch dbreplicate
31-10-2008 17:09
Launch cache
31-10-2008 17:09
cache Successfull (0.01s)
03-11-2008 11:19
Launch optimize
03-11-2008 11:19
Start optimize tables
03-11-2008 11:19
Optimize tables done
03-11-2008 11:20
Launch session
03-11-2008 11:20
Clean session files created since more than 180 seconds
03-11-2008 11:20
session Successfull (0.00s)

As you can see it added 3 computers 5 days ago, and it has't executed anymore. I'll notice that it i manually see if there are updateable machines, glpi says there are many.
How does the cron really work? Has this anything to do with the regular *nix cron? how can i see the frecuency it starts to look for updateable computers?

Offline

#19 2008-11-05 17:42:39

homebunny
Member
From: Geel, Belgium
Registered: 2008-10-30
Posts: 18

Re: OCSNG Auto Synchronization not happening

This did the trick with my OCS auto sync:
http://glpi-project.org/forum/viewtopic … 778#p67778

Offline

#20 2008-11-07 12:32:22

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

Ok, using the mass_ocs_plugin, and a call every minute to my crontab, i can have the 2 databases in sync. i only have some doubts about the plugin.

- Is it possible to turn off auto import of computers? I only want to sync EXISTING computers.

Thanks for your patience, and keep up the good work!

Offline

#21 2008-11-07 12:34:09

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

Re: OCSNG Auto Synchronization not happening

yes it's possible :
* remove all your rules
* let mass_ocs_import do his job
* import manually computers in order to set them in the right entity

Offline

#22 2008-11-07 12:43:12

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

But if I've checked that if i dont run the script in my cron file, it doesnt run anytime. Ive waited for more than 24 hours, and the only update was when i had ran the script!

Offline

#23 2008-11-07 12:50:35

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

Re: OCSNG Auto Synchronization not happening

if you don't run the script, how do you want datas to be updated ?
synchronisation can be done in 3 ways :
* internal cron
* manually throught Tools->OCSNG
* by putting the ocs_fullsync.sh script into the crontab

If none of the 3 method is used, there's no sync, and it's normal

Offline

#24 2008-11-07 13:11:29

xabib
Member
Registered: 2008-04-18
Posts: 11

Re: OCSNG Auto Synchronization not happening

Ok, I thought you mean removing the script from the crontab when you said "remove the rules". But then I don't get it.
What rules do you mean?
And if I run the script, new computers get added automatically. That's my only problem now.

Offline

#25 2008-11-07 13:18:03

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

Re: OCSNG Auto Synchronization not happening

xabib wrote:

Ok, I thought you mean removing the script from the crontab when you said "remove the rules". But then I don't get it.
What rules do you mean?

I mean disable all the rules in Rules -> Rules to affect a computer to an entity

When a new computer from ocs matches no rules, it is not imported
so if you disable all the rules, then no computers could be imported..

Offline

Board footer

Powered by FluxBB