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 2015-03-25 09:44:28

antheck
Member
Registered: 2015-03-05
Posts: 116

problème remonté inventaire [resolu]

Bonjour,

J'ai installé OCS inventory sur une machine virtuel debian 7 et son agent sur une machine windows. Cependant je n'arrive pas a faire remonté l'inventaire.

Dans l'installation de mon agent j'ai mis comme lien : http://172.22.xx.x:1555/ocs/ocsreports. Pareil dans config > interface > local-uri-server de l'interface web.
Je me connecte a l'interface d'ocs avec l'adresse suivante : http://192.168.xxx.xx:1555/ocs/ocsreports.
(Le port d'écoute à été changé de 80 a 1555 et on a fait une regle pour que 172.22.xx.x:1555 aille vers 192.168.xxx.xx:1555.)

Pouvez-vous m'aider.
Merci d'avance.

Last edited by antheck (2015-03-26 16:39:59)

Offline

#2 2015-03-25 10:24:57

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

regarde déjà les logs de l'agent dans C:\ProgramData\OCS Inventory NG\Agent\OCSInventory.log

Offline

#3 2015-03-25 10:59:21

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, March 25, 2015 09:51:06.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
AGENT => Writing configuration to file <C:\ProgramData\OCS Inventory NG\Agent\ocsinventory.ini>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, March 25, 2015 09:51:07.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #500>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:02.

Last edited by antheck (2015-03-25 11:28:12)

Offline

#4 2015-03-25 11:36:07

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

a priori un problème plutôt du coté serveur, regarde du coté d'error.log d'apache

Offline

#5 2015-03-25 11:44:00

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Mar 24 11:01:03 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 configured -- resuming normal operations
[Tue Mar 24 11:01:43 2015] [notice] Graceful restart requested, doing restart
[Tue Mar 24 11:01:43 2015] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
apache2: apr_sockaddr_info_get() failed for debian-ocs
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Mar 24 11:01:43 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 configured -- resuming normal operations
[Tue Mar 24 11:02:00 2015] [notice] Graceful restart requested, doing restart
[Tue Mar 24 11:02:00 2015] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
[Tue Mar 24 11:00:47 2015] [notice] Apache/2.2.22 (Debian) configured -- resuming normal operations
[Tue Mar 24 11:00:48 2015] [notice] caught SIGTERM, shutting down
[Tue Mar 24 11:00:50 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 configured -- resuming normal operations
[Tue Mar 24 11:00:59 2015] [notice] Graceful restart requested, doing restart
apache2: apr_sockaddr_info_get() failed for debian-ocs
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Mar 24 11:00:59 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 configured -- resuming normal operations
[Tue Mar 24 11:01:03 2015] [notice] Graceful restart requested, doing restart
[Tue Mar 24 11:01:03 2015] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
apache2: apr_sockaddr_info_get() failed for debian-ocs
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Mar 24 11:02:00 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 configured -- resuming normal operations
[Tue Mar 24 11:10:13 2015] [error] [client 127.0.0.1] script not found or unable to stat: /usr/lib/cgi-bin/soap.cgi
[Tue Mar 24 11:10:14 2015] [error] [client 127.0.0.1] File does not exist: /var/www/soap
[Tue Mar 24 11:10:14 2015] [error] [client 127.0.0.1] File does not exist: /var/www/mod_perl
[Tue Mar 24 11:10:14 2015] [error] [client 127.0.0.1] File does not exist: /var/www/mod_soap
[Tue Mar 24 11:11:53 2015] [notice] caught SIGTERM, shutting down
[Tue Mar 24 11:11:55 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal o$
[Tue Mar 24 11:28:08 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/ocsinventory
[Tue Mar 24 11:40:53 2015] [notice] caught SIGTERM, shutting down
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Tue Mar 24 11:40:55 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u1 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal o$
[Tue Mar 24 11:48:33 2015] [error] [client 192.168.101.11] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Ap$
[Tue Mar 24 11:56:56 2015] [error] [client 192.168.101.xx] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Ap$
[Tue Mar 24 13:46:38 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/ocs/ocsinventory
[Tue Mar 24 13:47:40 2015] [error] [client 192.168.101.xx] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Ap$
[Tue Mar 24 13:47:48 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/ocs/ocsinventory
[Tue Mar 24 13:47:54 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/ocs/ocsREPORTS
SV = PV(0x7ff22ce9f640) at 0x7ff22d85c2d0
  REFCNT = 2
  FLAGS = ()
  PV = 0
SV = PV(0x7ff22ce9f640) at 0x7ff22d85d850
  REFCNT = 2
  FLAGS = ()
  PV = 0
[Wed Mar 25 09:05:06 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/favicon.ico
[Wed Mar 25 09:05:06 2015] [error] [client 192.168.101.xx] File does not exist: /var/www/favicon.ico
[Wed Mar 25 09:23:08 2015] [error] [client 172.22.27.x] File does not exist: /var/www/ocs/ocsinventory
[Wed Mar 25 09:51:45 2015] [error] [client 172.22.27.x] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apach$
[Wed Mar 25 10:39:40 2015] [error] [client 172.22.27.x] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apach$
[Wed Mar 25 10:41:31 2015] [error] [client 172.22.27.x] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apach$
[Wed Mar 25 10:45:12 2015] [error] [client 172.22.27.x] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apach$
[Wed Mar 25 10:46:04 2015] [error] [client 172.22.27.x] Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apach$

Last edited by antheck (2015-03-25 11:50:27)

Offline

#6 2015-03-25 11:51:40

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

j'avais changé le lien  http://172.22.xx.x:1555/ocs/ocsreports. en  http://172.22.xx.x:1555/ocsinventory

Last edited by antheck (2015-03-25 11:51:59)

Offline

#7 2015-03-25 11:58:59

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

pour l'agent c'est bien OCSinventory qu'ilfaut utiliser !

Offline

#8 2015-03-25 12:03:50

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

ben c'est bien ocs inventory que j'utilise

Offline

#9 2015-03-25 12:04:57

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

en fait je test fusion et ocsinventory. pour fusion pas de soucis avec glpi mais pour ocs inventory agent avec ocs inventory ng pas de remontée.

precision : ocs agent et fusion agent ne sont pas sur le même pc.

Last edited by antheck (2015-03-25 12:05:37)

Offline

#10 2015-03-25 12:18:28

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

j'ai trouvé ceci :

l'erreur 500 indique un problème de connexion à la base de données OCS.
Le user ocs est bien créé dans MySQL? Si ce n'est pas le cas, le créer et lui affecter tous les droits sur la base OCSWEB, sinon utiliser le compte root mysql et modifier les fichiers ocsinventory-server.conf et dbconfig.inc.php en conséquence.

Offline

#11 2015-03-25 12:27:09

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

modifie aussi  le fichier z-ocsinventory-server.conf pour avoir le bon login/pass d'accès à la base

Offline

#12 2015-03-25 12:27:13

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

ah merci deja ça me rapproche du probleme smile

j'ai ceci :


mysql> select user,host from mysql.user;
+------------------+------------+
| user             | host       |
+------------------+------------+
| ocs              | *          |
| root             | 127.0.0.1  |
| root             | ::1        |
| root             | debian-ocs |
| debian-sys-maint | localhost  |
| ocs              | localhost  |
| root             | localhost  |
+------------------+------------+
7 rows in set (0.00 sec)

mysql> show grants for "ocs"@"*";
+-------------------------------------------------------------------------------------------------------------------------------+
| Grants for ocs@*                                                                                                              |
+-------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'ocs'@'*' IDENTIFIED BY PASSWORD '*127C25B17007D201007E887369797A3000F77838' WITH GRANT OPTION |
+-------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show grants for "ocs"@"localhost";
+------------------------------------------------------------------------------------------------------------+
| Grants for ocs@localhost                                                                                   |
+------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'ocs'@'localhost' IDENTIFIED BY PASSWORD '*127C25B17007D201007E887369797A3000F77838' |
| GRANT ALL PRIVILEGES ON `ocs`.* TO 'ocs'@'localhost'                                                       |
+------------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)

Offline

#13 2015-03-25 12:29:25

eric.le-corre
Member
Registered: 2013-01-07
Posts: 1,005

Re: problème remonté inventaire [resolu]

donc il faut que tu ajoutes dans le fichier ocsinventory-server.conf et z-ocsinventory-server.conf l'utilisateur ocs et le mot de passe

Offline

#14 2015-03-25 12:36:48

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

dans  ocsinventory-server.conf je remplace

PerlSetEnv OCS_DB_PORT 3306
  # Name of database
  PerlSetEnv OCS_DB_NAME ocsweb
  PerlSetEnv OCS_DB_LOCAL ocsweb
  # User allowed to connect to database
  PerlSetEnv OCS_DB_USER ocs
  # Password for user
  PerlSetVar OCS_DB_PWD ocs

par

  PerlSetEnv OCS_DB_PORT 3306
  # Name of database
  PerlSetEnv OCS_DB_NAME ocs
  PerlSetEnv OCS_DB_LOCAL ocs
  # User allowed to connect to database
  PerlSetEnv OCS_DB_USER ocs
  # Password for user
  PerlSetVar OCS_DB_PWD ocs

le 2eme fichier je le trouve pas

Offline

#15 2015-03-25 12:39:05

antheck
Member
Registered: 2015-03-05
Posts: 116

Re: problème remonté inventaire [resolu]

visiblement ça suffit puisque ça marche.

Je te remercie énormément smile

Je l'avais pourtant modifier mais j'avais pas du enregistrer la modif

Last edited by antheck (2015-03-25 12:39:36)

Offline

Board footer

Powered by FluxBB