I always get the error ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #500> in the ocsinventory.log:
==============================================================================
Starting OCS Inventory NG Agent on Thursday, September 15, 2016 10:51:10.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.3
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.3
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.3>
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:00.
The username and password in ocsinventory-server.conf is also correct. I can't find the problem. Can you help me?
Here are the config files:
ocsinventory-server.conf (important part):
#
# OCS Inventory NG Communication Server Perl Module Setup
#
# Copyleft 2006 Pascal DANEK
# Web: http://www.ocsinventory-ng.org
<IfModule mod_perl.c>
# Which version of mod_perl we are using
# For mod_perl <= 1.999_21, replace VERSION_MP by 1
# For mod_perl > 1.999_21, replace VERSION_MP by 2
PerlSetEnv OCS_MODPERL_VERSION VERSION_MP# Master Database settings
# Replace DATABASE_SERVER by hostname or ip of MySQL server for WRITE
PerlSetEnv OCS_DB_HOST DATABASE_SERVER
# Replace DATABASE_PORT by port where running MySQL server, generally 3306
PerlSetEnv OCS_DB_PORT DATABASE_PORT
# 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 ocs1
# Path to log directory (must be writeable)
PerlSetEnv OCS_OPT_LOGPATH "PATH_TO_LOG_DIRECTORY"
# If you need to specify a mysql socket that the client's built-in
#PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET "path/to/mysql/unix/socket"
# DBI verbosity
PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0
# Unicode support
PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1# If you are using a multi server architecture,
# Put the ip addresses of the slaves on the master
# (This is read as perl regular expressions)
PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1
#PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX
# ===== WEB SERVICE (SOAP) SETTINGS =====PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0
PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100
# PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF "WEBSERV_PRIV_MOD_CONF_FILE"# Be careful: you must restart apache to make settings taking effects
# Configure engine to use the settings from this file
PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0# Try to use other compress algorythm than raw zlib
# GUNZIP and clear XML are supported
PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1
##############################################################
# ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====#
############################################################### NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to '1'
# ===== MAIN SETTINGS =====
# Enable engine logs (see LOGPATH setting)
PerlSetEnv OCS_OPT_LOGLEVEL 0
# Specify agent's prolog frequency
PerlSetEnv OCS_OPT_PROLOG_FREQ 12
# Configure the duplicates detection system
PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15
# Futur security improvements
PerlSetEnv OCS_OPT_SECURITY_LEVEL 0
# Validity of a computer's lock
PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600
# Enable the history tracking system (useful for external data synchronisation
PerlSetEnv OCS_OPT_TRACE_DELETED 0
# ===== INVENTORY SETTINGS =====
# Specify the validity of inventory data
PerlSetEnv OCS_OPT_FREQUENCY 0
# Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)
PerlSetEnv OCS_OPT_INVENTORY_DIFF 1
# Make engine consider an inventory as a transaction (lower concurency, better disk usage)
PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1
# Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load
PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1
# Enable some stuff to improve DB queries, especially for GUI multicriteria searching system
PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1
# Specify when the engine will clean the inventory cache structures
PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7
# Enable you to keep trace of every elements encountered in db life
PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1
dbconfig.inc.php:
<?php
define("DB_NAME", "ocsweb");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","root");
define("PSWD_BASE","myrootpassword");
?>
ocsinventory.ini: (Server= tried also with ip and localhost --> nothing worked)
[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=0
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://DNSofmyServer/ocsinventory
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=10
OLD_PROLOG_FREQ=10
TTO_WAIT=720
When i go to http://DNSofServer/ocsinventory/ I just get the Error 500
Can't call method "do" on an undefined value at C:/xampp/perl/site/lib/Apache/Ocsinventory/Server/System.pm line 177.
I installed OCS Server with the Setup-File of OCS Inventory NG 2.2.1 so I've installed the components:
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
Do you have any suggestions how I can fix this problem? The agent can't send an inventory.
Thanks in advance!
Regards Mike