I've reinstalled ocs server to solve it. I was needing to put the service online in my network, so, I did the installation again.
Thanks
image from previous article:
- tag with value
Bonjour,
Sur OCS Inventory, je rencontre un problème de doublons malgré après avoir configuré "AUTO_DUPLICATE_LVL". Les valeurs cochées par défaut à l'installation d'OCS étaient "hostname", "serial" et "macaddress" mais même en cochant toutes les valeurs c'est à dire "model", "uuid" et "assetTag", des ordinateurs me sont remontés en doublon.
Auriez-vous une solution ?
J'utilise la version OCSNG_UNIX_SERVER_2.4.1 - sur debian 9.4 x64, et pour l'agent la version 2.3.1.1.
Je vous remercie par avance pour votre aide et pour le logiciel que vous mettez à disposition.
this is the windows agent, it also doesn't actually perform an inventory giving a 400 error (the agent it just updated worked perfectly, settings are the same)
COM SERVER => HTTP Post response received <HTTP Status Code #400>
and look like the agent only get partially updated.
whereas the previous version everything matched
In ocsreports, All computers page, only "Ubuntu" is shown, without OS Version. The ocs agent was Installed from sources.
Lines registered in ocsinventory-agent.log:
<HARDWARE>
....
<OSNAME>Ubuntu</OSNAME>
<OSVERSION>18.04</OSVERSION>
....
</HARDWARE>
Bonjour,
J'ai un problème que je n'arrive pas à résoudre. J'ai un vieil agent 2.0.0 sous windows que je souhaite mettre à jour.
Pour cela, j'ai fait une mise à jour du serveur selon la procédure du WIKI (de 2.3.1 de mèmoire à la dernière 2.5), j'ai récupéré mes fichiers de conf et cela semble ok.
La ou cela se gate c'est quand j'essaye d'utiliser le dernier agent 2.4.0.0, impossible de le faire communiquer avec le serveur. J'ai a peu près changer tout les paramétres , mais impossible.
J'ai désinstallé et réinstallé le client.
J'ai réduis le fichier ocsinventory.ini à a sa plus simple expression :
[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=1
IpDisc=
[HTTP]
Server=http://172.16.255.206/ocsinventory
SSL=0
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=60
INVENTORY_ON_STARTUP=1
Voici le résultat de mon fichier de log :
coté client :
tarting OCS Inventory NG Agent on Friday, August 17, 2018 14:12:44.
AGENT => Running OCS Inventory NG Agent Version 2.4.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.4.0.0
AGENT => Loading plug-in(s)
DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
DLL PLUGIN => 0 DLL Plug-in(s) successfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.4.0.0>
AGENT => Sending Prolog
DID_CHECK => Read DeviceID <V17-7201-2018-08-17-13-54-42> and MACs <00:15:5D:F7:3C:1A> in file <ocsinventory.dat>
COM SERVER => Initializing cURL library for sendRequest
COM SERVER => Using cURL without server authentication
COM SERVER => Disabling cURL proxy support
COM SERVER => Disabling cURL SSL server validation support
COM SERVER => Sending HTTP Post request to URL <http://172.16.255.206/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #400>
COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #400>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.
Coté serveur :
fichier activity.log
Fri Aug 17 14:06:49 2018;315;100;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;prolog;accepted
Fri Aug 17 14:06:49 2018;315;311;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;session;started
Fri Aug 17 14:06:53 2018;65506;322;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;notify;IP
Fri Aug 17 14:07:12 2018;65394;400;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;useragent;Bad agent or agent version too recent for server !!
Fri Aug 17 14:07:12 2018;65394;106;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;prolog;stopped by module
Fri Aug 17 14:07:12 2018;65394;515;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;end;bad_request
On notera que les clients 2.0 continue à fonctionner
coté error.log
j'ai cela au démarrage du demaon apache
[Fri Aug 17 13:04:59.219527 2018] [mpm_prefork:notice] [pid 64946] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Aug 17 13:05:00.510928 2018] [core:notice] [pid 65104] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Aug 17 13:05:00.512086 2018] [suexec:notice] [pid 65104] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 13:05:00.513624 2018] [ssl:warn] [pid 65104] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Fri Aug 17 13:05:00.700253 2018] [auth_digest:notice] [pid 65104] AH01757: generating secret for digest authentication ...
[Fri Aug 17 13:05:00.701168 2018] [lbmethod_heartbeat:notice] [pid 65104] AH02282: No slotmem from mod_heartmonitor
[Fri Aug 17 13:05:00.702748 2018] [ssl:warn] [pid 65104] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Aug 17 13:05:00.774496 2018] [mpm_prefork:notice] [pid 65104] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.28 mod_perl/2.0.10 Perl/v5.16.3 configured -- resuming normal operations
[Fri Aug 17 13:05:00.774526 2018] [core:notice] [pid 65104] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
au niveau access.log
172.16.255.201 - - [17/Aug/2018:14:04:07 +0200] "POST /ocsinventory HTTP/1.1" 400 226 "-""OCS-NG_WINDOWS_AGENT_v2.4.0.0"
Bref je suis un peu à court d'idée
Peut être est-ce lié à mes fichiers de conf qui sont vieux que j'ai depuis une vieille version 2 ?
I have seen the Windows Agent can be deployed and insert an encrypted password into the agent config file. See here https://github.com/OCSInventory-NG/WindowsAgent/blob/master/OPTIONS.TXT
In the Unix agent, how can we do this? I tried to build the agent with the latest build and use the scripted installation:
env PERL_AUTOINSTALL=1 perl Makefile.PL && make && make install && perl postinst.pl --nowizard --server=https://server/ocsinventory --user=user --password=pasword --realm=realm --logfile=/var/log/ocsinventory-client/ocsinventory-agent.log --now --crontab
Doing this inserts the password as cleartext in the agent config file.
[Server]
OCSInventory-Server 2.4.1
CentOS Linux 7 (Core)
Linux x86_64 3.10.0-693.2.2.el7.x86_64
[Agent]
Mac OS : High Sierra 10.13.3
Agent : OCS-NG_unified_unix_agent_v2.3.1
[Issue]
Hi,
My Agent for OS X doesn't download the package.
The "Active Status" of the package remains "Notified" for several days.
Agent for Windows can download the same package with same cacert.pem.
Both Agents for OS X and Windows can upload the inventory information to the server.
Any idea ?
Best Regards,
>>>>>>>>Log for Agent>>>>>>>>>>>>>>>>>>>
[Wed Jun 6 10:43:47 2018][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3.1
[Wed Jun 6 10:43:47 2018][debug] Log system initialised (File)
[Wed Jun 6 10:43:47 2018][debug] --scan-homedirs missing. Don't scan user directories
[Wed Jun 6 10:43:48 2018][debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__<our inventory server>_ocsinventory/ocsinv.adm
[Wed Jun 6 10:43:48 2018][debug] OCS Agent initialised
[Wed Jun 6 10:43:48 2018][debug] Failed to load `/etc/ocsinventory-agent/modules.conf': 0
[Wed Jun 6 10:43:48 2018][debug] No modules will be used.
[Wed Jun 6 10:43:48 2018][debug] Compress::Zlib is not available! The data will be compressed with
gzip instead but won't be accepted by server prior 1.02
[Wed Jun 6 10:43:48 2018][debug] sending XML
[Wed Jun 6 10:43:48 2018][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<DEVICEID>hamaguchi-mac-6-2018-06-01-19-16-31</DEVICEID>
<QUERY>PROLOG</QUERY>
</REQUEST>
[Wed Jun 6 10:44:02 2018][debug] =BEGIN=SERVER RET======
[Wed Jun 6 10:44:02 2018][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<REPLY>
<OPTION>
<NAME>DOWNLOAD</NAME>
<PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" ON="1" TYPE="CONF" CYCLE_LATENCY="60" TIMEOUT="30" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" />
<PARAM ID="1528249165" SCHEDULE="" CERT_FILE="INSTALL_PATH/cacert.pem" TYPE="PACK" INFO_LOC="<our inventory server>/download" CERT_PATH="INSTALL_PATH" PACK_LOC="<our inventory server>/download" FORCE="0" POSTCMD="" />
</OPTION>
<RESPONSE>SEND</RESPONSE>
<INVENTORY_ON_STARTUP>1</INVENTORY_ON_STARTUP>
<PROLOG_FREQ>24</PROLOG_FREQ>
</REPLY>
';
[Wed Jun 6 10:44:02 2018][debug] =END=SERVER RET======