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

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

many agent installs work some give 500 error on server

fresh download and install of server 2.3 on linux (CentOS 7) and agent 2.3. I'm installing the agent on several linux boxes all running CentOS 7 with all updates, some work fine and report, some give a 500 server error, all have the same perl modules and all have the same ocsinventory-agent.cfg file

agent log on the client
Wed Jan 25 13:41:45 2017][error] Cannot establish communication : 500 Internal Server Error

apache error log on the server corresponding line
[Wed Jan 25 13:44:32.579981 2017] [perl:error] [pid 5489] [client xxx.xxx.xxx.xxx:45672] Not a HASH reference at /usr/local/share/perl5/Apache/Ocsinventory/Server/Inventory/Data.pm line 126.\n

and activity.log
Wed Jan 25 11:54:36 2017;5322;114;hostname-2017-01-25-13-10-39;xxx.xxx.xxx.xxx;OCS-NG_unified_unix_agent_v2.3;inventory;no_session
asked Jan 25 in OCS Inventory NG agent for Unix by trotsky (330 points)

9 Answers

0 votes

On machines that report error 500 have you some usb external devices?


answered Jan 26 by frankb (48,490 points)
0 votes

no, these are rack mount workstations, some HP some Dell, all headless with nothing attached apart from a network cable, all with the same OS with the same updates and installs, some HPs report fine some give 500 server error some Dells report fine and some give 500 server errors and the web server reports

Not a HASH reference at /usr/local/share/perl/5/Apache/Ocsinventory/Server/Inventory/Data.pm line 126

for those machines

answered Jan 26 by trotsky (330 points)
edited Jan 27 by trotsky
0 votes
Hi, fresh install, same problem. Any way to debug this?

answered Jan 27 by lpc (180 points)
0 votes
Facing the same problem, keyboard, mouse and speaker are all usb. Any way to debug this further ?
answered Jan 27 by Dragnell87 (140 points)
0 votes
I have the same problem. Mostly agent on pure Debian Jessie servers not working. I don't understand why this is happening so very difficult to troubleshoot. If it was a missing dependency I don't see any errors about that.
answered Feb 2 by daniedj (1,000 points)
0 votes
so i tried using the --local flag on the ocs-agent (and --nosoftware to keep it shorter), on one of the machines that give the 500 server error, and can't see anything obviously wrong with the xml file, but when I try to do a manual upload of the file to the server, via the OCS admin page I also get the 500 error and logging about

Not a HASH reference at /usr/local/share/perl5/Apache/Ocsinventory/Server/Inventory/Data.pm line 126.

kind of assuming there IS something in the XML that the server does not like, but not a perl expert
answered Feb 2 by trotsky (330 points)
edited Feb 2 by trotsky
0 votes
Same problem here

 Not a HASH reference at /usr/local/share/perl/5.18.2/Apache/Ocsinventory/Server/Inventory/Data.pm line 126.
answered Feb 13 by anwarlain (140 points)
0 votes

See this post => http://ask.ocsinventory-ng.org/5785/lots-of-host-duplicates-since-server-agent-update-2-3

The solution is to create the missing table.


answered Feb 13 by frankb (48,490 points)
0 votes
the missing table (it's not missing) is not the issue.
I have updated the serer to 2.3.1 and the issue persists for some machines
answered May 25 by trotsky (330 points)
Powered by Question2Answer