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.

Newbie needs help with agents reporting

Windows Server 2012, R2, Standard
OCS Server 2.1.2
XAMPP 1.7.7
Test client is Windows 7 Professional, 64-bit

Hello all.  Had a friend show me OCS a few years back and am now trying to install it, but I'm running into some user error issues on my part as I'm pretty sure I've installed this incorrectly.  After banging my head against the wall for quite some time, I thought I'd ask here.

The symptoms I'm running into are that the test systems I've deployed the agent to are not reporting in on the server.

Per this link:
http://wiki.ocsinventory-ng.org/index.php/Documentation:Errors#Windows_agent_does_not_send_inventory_to_server.
I ran this shortcut:
"C:\Program Files (x86)\OCS Inventory Agent\OCSInventory.exe" /server:10.4.3.31 /debug
(My server is located at 10.4.3.31)

However, this produced no results.  The c:\OCS-NG folder wasn't created, and when I manually created it, no files were created inside of it.

If needed, I'll include the log files in a follow up post to this, but in a nutshell, these are the error messages I'm seeing (this is the distilled version of the log, with all extraneous detail removed to show unique error messages).

[Wed Jun 03 07:35:09 2015] [error] [client ::1] File does not exist: C:/xampp/htdocs/browserconfig.xml
[Thu Jun 04 13:47:04 2015] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? 
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable   
[Thu Jun 04 14:21:23 2015] [error] [client ::1] user admin not found: /security/index.php
[Thu Jun 11 14:46:11 2015] [warn] RSA server certificate CommonName (CN) `MyServerName.MyDomain.local' does NOT match server name!? 
[Thu Jun 11 14:46:11 2015] [error] Unable to configure RSA server private key 
[Thu Jun 11 14:46:11 2015] [error] SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch 
[Fri Jun 12 10:07:09 2015] [error] [client 10.4.100.154] Can't call method "do" on an undefined value at C:/xampp/perl/site/lib/Apache/Ocsinventory/Server/System.pm line 177.\n
[Fri Jun 12 14:24:45 2015] [error] [client ::1] Can't call method "do" on an undefined value at C:/xampp/perl/site/lib/Apache/Ocsinventory/Server/System.pm line 177.\n
[Mon Jun 15 14:51:57 2015] [error] [client ::1] script 'C:/xampp/htdocs/ocsreports/install.php' not found or unable to stat

 

 

in OCS Inventory NG agent for Windows by (150 points)

2 Answers

0 votes
Hi,

1/ This error means that ocs mysql password is not correct. Correct it in z-ocsinventory-server.conf file. Restart apache after modification.

2/ The command to use is => ocsinventory.exe /server=http://10.4.3.31/ocsinventory /debug=2

Regards

Frank
by (90.2k points)
Thank you sir.  However, I can't find the z-ocsinventory-server.conf file anywhere?  I did find two separate ocsinventory-server.conf files (one in c:\xampp\apache\conf\extra and another in c:\xampp\perl\site\lib\etc\ocsinventory).  I did notice that the value listed for OCS_DB_PWD was the default "OCS," so I changed that in both files.

With regards to the shortcut, I tried running this, but saw no results.  I didn't reboot the client laptop or the server before doing so, but did restart the Apache2.2 service.  After trying it from an elevated command prompt while keeping the process list open, I did notice that the OCSInventory.exe process does run, but it terminates after about a second.  I am assuming this is identical to what you suggested, but am copying it below, just in case I'm missing something or if there's a different way I should be running this.  I also copied a shortcut to that location, edited the shortcut appropriately, and tried that with the same results.

C:\Program Files (x86)\OCS Inventory Agent>OCSInventory.exe /server=http://10.4.3.31/ocsinventory /debug=2

In any event, running this produces an event in the Windows Application Log, "Service encounter error <Failed to load/parse last inventory state>."

Also (and I sincerely apologize for not including this earlier), there are a few other wrinkles to this:

Due to concerns raised by one of the enterprise admins here, I've been trying to use the enterprise certificate that he's created.  As far as I'm aware (I'm new to the company), this should be a known good.  In doing so, I've taken the MyDomain.crt, renamed it to cacert.pem, and used that when running the packager

We have not copied the cert directly to the client, whether via script or manually.  I did rename the OcsPackage.exe executable to 10.4.3.31.exe and ran that manually on the client (my laptop).  This generated the same error message mentioned above, ""Service encounter error <Failed to load/parse last inventory state>.""

0 votes

Hi,

Sorry. On XAMPP, the correct file is ocsinventory-server.conf file.

As I said, the correct command is ocsinventory.exe /server=http://10.4.3.31/ocsinventory, even you use ocspackager.exe.

Post content of error.log file, please

Regards

Frank

by (90.2k points)

10.4.11.96 is an old laptop that was wiped sometime around June 5th.  IIRC, 10.4.100.154 is my current laptop.  Also, guessing this is obvious, but I've replaced the FQDN of the server with "MyServer.MyDomain.local."

Thank you for looking at this, and sorry for the delay in responding.

The log itself is 67k, so a bit too big for the forum here, but I've uploaded it (mostly unedited except for the note above) here:

https://drive.google.com/file/d/0Bw4QqYx7fHDLMmxQcEMyWG5pTHM/view?usp=sharing

 

Any thoughts/ideas yet?
 
Powered by Question2Answer
...