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.12.3 available

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

Error 500 after updated Server 2.5 in some PCS

Hi,
I Updated  the server version to 2.5 and after that all the computers started showing in the log:

  ERROR *** AGENT => Failed to send Inventory <HTTP Status Code # 500>

Some computers are not inventaried but other are. I tested my computer with windows agent 2.4. and older version with same result.
In ocsreports nothing is displayed in the software inventory. The list of software is empty in the computers.

But testing reinstall agent 2.4  with Nosoftware=1  to not inventoried software, I have checked that it does not give the error 500 and all the computers will be inventoried.

What's the problem? Any problem with de DB?

Thanks.
in OCS Inventory NG server for Unix by (260 points)

4 Answers

0 votes
Hi,

Have you changed the user and the password declared in z-ocsinventory-server.conf and used to connect to ocs database? After modifications restart apache.

Regards

Frank
by (90.2k points)
0 votes

I have checked the file z-ocsinventory-server.conf and dbconfig.inc.php and the user and password used to connect are correct. 

In fact, there are some computers that are inventoried  and some not. 

But its OCSinventory.log show a error 500 in all. 

That happens since I installed version 2.5 with the same bd as version 2.4

..............................................

..........................................

COM SERVER => Disabling cURL SSL server validation support

COM SERVER => Sending HTTP Post request to URL <https://xxx.xxxxxxxxx.es/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #500>

COM SERVER => Cleaning cURL library

ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>

AGENT =>  Communication Server ask for Package Download

DOWNLOAD => Found OCS Inventory Agent Setup result file <C:\ProgramData\OCS Inventory NG\Agent\download\OCSNG-Windows-Agent-Setup_done>

ERROR *** DOWNLOAD => Found result code <SUCCESS> for OCS Inventory Agent Setup package but no package ID specified, so remove all packages to avoid running Agent setup in loop !

DOWNLOAD => Package history file successfully cleaned for duplicate IDs

DOWNLOAD => Download disabled by server

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:16.

==============================================================================

 All  the  computers show all the information except software list. 

But, if I install client with the  option  "Do not install for scaned software " the inventory is correct. 

==============================================================================

..........................

INVENTORY => XML Update common Device properties

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 <https://oxxx.xxxxxxxxx.es/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #200>

COM SERVER => Cleaning cURL library

AGENT => Inventory successfully sent

INVENTORY => Writing new inventory state

AGENT =>  Communication Server asked for Package Download

DOWNLOAD => Package history file successfully cleaned for duplicate IDs

DOWNLOAD => Download disabled by server

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:51.

Log of apache:

[Tue Oct 02 13:15:45.936406 2018] [:error] [pid 15839] [] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_table_html.php on line 1803, referer: https://xxx.xxxxxxxxx.es/ocsreports/index.php?function=computer&head=1&systemid=489441&cat=other

[Tue Oct 02 13:15:45.936411 2018] [:error] [pid 15839] [] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_table_html.php on line 1803, referer: https://xxx.xxxxxxxxx.es/ocsreports/index.php?function=computer&head=1&systemid=489441&cat=other

[Tue Oct 02 13:15:45.936416 2018] [:error] [pid 15839] [] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/share/ocsinventory-reports/ocsreports/require/function_table_html.php on line 1803, referer: https://xxx.xxxxxxxxx.ess/ocsreports/index.php?function=computer&head=1&systemid=489441&cat=other

by (260 points)
0 votes

I have a new installation OCS Inventory Server 2.5 in Ubuntu Server 18.04 with the same problem with 2.4 and 2.3.1.1 clients in Windows 10 PRO 64Bits , ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>, the only temporary solution that I have found is to comment # line 50 of the file Update.pm

/usr/local/share/perl/5.26.1/Apache/Ocsinventory/Server/Inventory/Update.pm

Line 48:  set_category();

Line 49:  set_asset_category();

Line 50:  #set_saas();

But in doing that, I think the plugins stop working.

Please, it is important to solve it, if someone knows a permanent solution that explains it. Thank you.

by (200 points)
edited by
0 votes

Same here. frown

With OCS Server Version 2.5 and Agent Version. 2.4 or 2.1.1.1 (XP/2003).

by (140 points)
 
Powered by Question2Answer
...