Hello, Dear All
I have a question regarding OCS agent can't communicate with OCS server.
While I am typing the command "ocsinventory-agent" it returned with value "1", and log of is as below ( I omitted content of generating XML parts
-------------------------------------------------------------------------------------
[Mon Aug 28 04:25:46 2017][debug] sending XML
[Mon Aug 28 04:25:46 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<DATELASTLOGGEDUSER>Mon Aug 28 04:23</DATELASTLOGGEDUSER>
[Mon Aug 28 04:25:46 2017][error] Cannot establish communication : 500 Internal Server Error
-------------------------------------------------------------------------------------------------
The OCS server's Apache log is as below
root@lxhv1idoitt01:/var/log/httpd (0)# cat lxhv1idoitt01.leoni.local:8088_error.log
[Sun Aug 27 10:01:47.717833 2017] [autoindex:error] [pid 455] [client 10.1.13.249:33626] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.html.var,index.cgi,index.pl,index.php,index.xhtml) found, and server-generated directory index forbidden by Options directive
[Sun Aug 27 10:01:59.270778 2017] [autoindex:error] [pid 461] [client 10.1.14.203:57517] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.html.var,index.cgi,index.pl,index.php,index.xhtml) found, and server-generated directory index forbidden by Options directive
[Sun Aug 27 18:59:01.829814 2017] [perl:error] [pid 455] [client 10.1.14.158:36726] Can't call method "do" on an undefined value at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 189.\n
[Mon Aug 28 04:25:46.787872 2017] [perl:error] [pid 1638] [client 10.1.14.158:36948] Can't call method "do" on an undefined value at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 189.\n
root@lxhv1idoitt01:/var/log/httpd (0)# cat lxhv1idoitt01.leoni.local:8088.log
root@lxhv1idoitt01:/var/log/httpd (0)#
root@lxhv1idoitt01:/var/log/httpd (0)# cat lxhv1idoitt01.leoni.local:8088_access.log
10.1.13.249 - - [27/Aug/2017:10:01:47 +0200] "\x16\x03" 400 226 "-" "-"
10.1.13.249 - - [27/Aug/2017:10:01:47 +0200] "GET / HTTP/1.0" 403 202 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:01:59 +0200] "\x16\x03" 400 226 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:01:59 +0200] "GET / HTTP/1.0" 403 202 "-" "-"
10.1.13.249 - - [27/Aug/2017:10:02:08 +0200] "\x16\x03\x01\x03\x81\x01" 400 226 "-" "-"
10.1.13.249 - - [27/Aug/2017:10:02:08 +0200] "\x16\x03\x02\x03\x81\x01" 400 226 "-" "-"
10.1.13.249 - - [27/Aug/2017:10:02:08 +0200] "\x16\x03\x03\x03\xa7\x01" 400 226 "-" "-"
10.1.13.249 - - [27/Aug/2017:10:02:11 +0200] "\x16\x03" 400 226 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:02:19 +0200] "\x16\x03\x01\x03\x81\x01" 400 226 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:02:19 +0200] "\x16\x03\x02\x03\x81\x01" 400 226 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:02:19 +0200] "\x16\x03\x03\x03\xa7\x01" 400 226 "-" "-"
10.1.14.203 - - [27/Aug/2017:10:02:22 +0200] "\x16\x03" 400 226 "-" "-"
10.1.14.158 - - [27/Aug/2017:18:59:01 +0200] "POST /ocsinventory HTTP/1.1" 500 531 "-" "OCS-NG_unified_unix_agent_v2.3.1"
10.1.14.158 - - [28/Aug/2017:04:25:46 +0200] "POST /ocsinventory HTTP/1.1" 500 531 "-" "OCS-NG_unified_unix_agent_v2.3.1"
---------------------------
For the error of "Can't call method "do" on an undefined value at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 189.\n", I copy code of line189 from that file
189 $dbh->do("SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'");
Can anyone help me with that.