I have OCS deployment with mostly WIndows machines, but recently I needed to add some Linux stations to the OCS database. Windows agents work without any issues. I have a problem with Linux machines. It was tested on Debian Jessie and Mint 17.3, the results are exactly the same. I have user and password set in config file. I also tried add --user and --password options on the command line. Log is as follows:
root@admin-lap:~# ocsinventory-agent --debug --user=XXX --password=XXX
[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[debug] Log system initialised (Stderr)
[debug] --scan-homedirs missing. Don't scan user directories
[debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__ocs.XXX.XXX.XXX:445_ocsinventory/ocsinv.adm
[debug] OCS Agent initialised
[debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf
[debug] Calling handlers : `start_handler'
[debug] Compress::Zlib is available.
[debug] Calling handlers : `prolog_writer'
[debug] sending XML
[debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
<DEVICEID>admin-lap-2016-04-29-13-13-17</DEVICEID>
<QUERY>PROLOG</QUERY>
</REQUEST>
[error] Cannot establish communication : 401 Authorization Required
On the Apache side it looks like that:
lin-vserv apache2 # tail -f ssl_access_log
xxx.xxx.5.111 - - [29/Apr/2016:13:08:00 +0200] "POST /ocsinventory HTTP/1.1" 401 467
xxx.xxx.5.111 - ocs [29/Apr/2016:13:08:00 +0200] "POST /ocsinventory HTTP/1.1" 200 215
xxx.xxx.148.73 - - [29/Apr/2016:13:08:26 +0200] "POST /ocsinventory HTTP/1.1" 401 467
xxx.xxx.148.73 - ocs [29/Apr/2016:13:08:26 +0200] "POST /ocsinventory HTTP/1.1" 200 215
xxx.xxx.188.90 - - [29/Apr/2016:13:08:31 +0200] "POST /ocsinventory HTTP/1.1" 401 467
xxx.xxx.188.90 - ocs [29/Apr/2016:13:08:32 +0200] "POST /ocsinventory HTTP/1.1" 200 247
xxx.xxx.5.188 - - [29/Apr/2016:13:10:55 +0200] "POST /ocsinventory HTTP/1.1" 401 467
xxx.xxx.188.186 - - [29/Apr/2016:13:10:59 +0200] "POST /ocsinventory HTTP/1.1" 401 467
xxx.xxx.188.186 - ocs [29/Apr/2016:13:10:59 +0200] "POST /ocsinventory HTTP/1.1" 200 249
5.188 is Linux machine, as You can see it logs somewhat differently than Windows machines.
On the agent side Perl and its libraries are from distribution repos.
Am I doing something wrong or is this a bug somwhere?