Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.9.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Windows Agent data not inventoried - Logs OK [closed]

Hi!

I've installed OCS server on Ubuntu. Web Interface is running fine, no entries in apache error.log. I have one agent installed on windows. When I trigger the agent to send the data to the server, this is what I get in apaches access.log:

10.110.100.177 - - [22/Feb/2017:15:14:21 +0100] "GET /ocsinventory/deploy/label HTTP/1.1" 400 484 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.110.100.177 - - [22/Feb/2017:15:14:22 +0100] "POST /ocsinventory HTTP/1.1" 301 531 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.110.100.177 - - [22/Feb/2017:15:14:22 +0100] "GET /ocsinventory/ HTTP/1.1" 400 484 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

An here is the ocsinventory.log from the windows machine:

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, February 22, 2017 15:20:03.
AGENT => Running OCS Inventory NG Agent Version 2.3.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.3.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.3.0.0>
    AGENT => Sending getLabel request
    COM SERVER => Initializing cURL library for getFile
    COM SERVER => Using cURL with server authentication
    COM SERVER => Disabling cURL proxy support
    COM SERVER => Disabling cURL SSL server validation support
    COM SERVER => Sending fileGet request to URL <http://[IP]/ocsinventory/deploy/label>
    COM SERVER => fileGet response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
    AGENT => Failed to retrieve Label <HTTP Status Code #400>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <COMPUTERNAME-2017-02-16-12-52-22> and MACs <[MAC]> in file <ocsinventory.dat>
    COM SERVER => Initializing cURL library for sendRequest
    COM SERVER => Using cURL with 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://[IP]/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
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.

Both server and agent are Version 2.3. I do not see any data within OCS web interface...

Any help would be appreciated.

Thanks!

closed with the note: Solved
in OCS Inventory NG server for Unix by (530 points)
closed by

14 Answers

+1 vote
 
Best answer

I didn't notice in this post :

IP - - [23/Feb/2017:13:31:17 +0100] "GET /ocsinventory/deploy/label HTTP/1.1" 400 484 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
IP - - [23/Feb/2017:13:31:18 +0100] "POST /ocsinventory HTTP/1.1" 301 531 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
IP - - [23/Feb/2017:13:31:18 +0100] "GET /ocsinventory/ HTTP/1.1" 400 484 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

  • 301: This error means that you already have a directory named "/ocsinventory" in your apache server, and this name conflicts with apache <location> directive of apache_config file. You must change name of "/ocsinventory" directory.
Did you modify apache configuration by adding /ocsinventory somewhere ? Or something similar ?
by (4.9k points)
selected by
0 votes

Hello ! 

HTTP Error 400 means it didn't find your server  :

http://yourip/ocsinventory

Check if your server is in https, if yes, put https instead of http

by (4.9k points)
edited by
0 votes
@vincent_n: No, Server is not running in https. Cannot access the webinterface via https and when I change the agents .ini to https, the entries in apache's access.log disappear.
by (530 points)
0 votes

Can you give me logs of OCS activity please ? /var/log/ocsinventory-server/activity.log (for me, maybe not like you)

+ apache logs of error, should be in the same fold than access ones

+ locate Ocsinventory.pm 

What is written in "$Apache::Ocsinventory::VERSION" ?

by (4.9k points)
0 votes

@vincent_n:

Hi!

I cannit find the activity.log. In fact, the directory /var/log/ocsinventory-server/ is empty.

Here is the apache error.log after I restarted the service:
[Thu Feb 23 09:47:36.384480 2017] [mpm_prefork:notice] [pid 1352] AH00169: 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
[Thu Feb 23 09:47:37.788846 2017] [mpm_prefork:notice] [pid 8198] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Thu Feb 23 09:47:37.788883 2017] [core:notice] [pid 8198] AH00094: Command line: '/usr/sbin/apache2'

Heres the Version from Ocsinventory.pm:

/usr/local/share/perl/5.18.2/Apache/Ocsinventory.pm -->
$Apache::Ocsinventory::VERSION = '2.3';
by (530 points)
0 votes

It should be somewhere else :

locate activity.log

Follow this :

  • Launch an inventory on the computer with the problem
  • Then give me the log of activity.log / apache access log / apache error log
ps: edit your posts and hide your IP address...
by (4.9k points)
0 votes
@vincent_n:

locate activity.log has no result. There is no activity.log on my server.

I did exactly what you said in my first post. There you can see the portion from access.log.

P.S.: masked the IP, thanks. Maybe your remove it in your first answer. Thanks!
by (530 points)
0 votes
I though you had restart the apache service, not OCS one, my bad.

We see nothing interesting in logs, can you give me your agent configuration ini file ?
by (4.9k points)
0 votes
Sure!

Here is the .ini: http://pastebin.com/QPsYdYn6
Here is the .log: http://pastebin.com/CXrf3iiP

Thanks for your support!
by (530 points)
0 votes
Try with this conf : http://pastebin.com/h3sGvZ4y
by (4.9k points)
 
Powered by Question2Answer
...