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

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

How to fix, why this is happening? 400 Error

Hi all,

Let me share my experience with OCS. Few months ago I started dealing with OCS inventory. All the tutorials I've seen in the Internet was related to so called manual installation (git clone.. so on) although this is not recommended way for my environment (1)
I decided to go with it.

I have downloaded, configured OCS Server, all went fine. Then I found that, there is pre-compiled binary for on the official repository for OCS-agent and decided to implement this via my configuration manager (puppet). So I deployed the OCS repository on all of my systems, installed the client and configured it to talk to my server. All good.

Few weeks ago I noticed that, there is new version of the agent. I have updated it (automatically via Ansible) as I using this approach for all the updates (except security) on my systems. Day or two later I wanted to check something on the reports page and noticed that - the clients don't report to the server anymore. When I logged into one of the clients and run ocsinventory-agent it returned exit status 1, and error 400....

I checked google and found an article which says, the client and the server should be on the same version. Ok, let's compare the versions then - Ooops, it seems that the client is using 2.9 but the server is still on 2.8.1, ok no worries, will just upgrade the server to 2.9, but wait, there is no such version? On the official repo? Wow, no words to say.

In modern world, most of the apps are backward compatible, Am I right?

Then I decided to downgrade the client. But wait on the official repo, there is no older version????? You joke.. Ah, will try to find version 2.8.1 of the agent, somewhere in the Internet and install it manually.
Luckily, on official Debian/Ubuntu repo, there is such version, so I downgraded.

The next day I got an e-mail from unattended-upgrades (2) that, the version of OCS-agent is upgraded from 2.8.1 to 2.9 - because of security issues. Buy why instead of releasing next minor version, you jump over next major?

Now I have unresolvable case, to use security vulnerable package or to disable assessment for period of time until server is upgraded to 2.9... What a case.

So guys, I will be glad to hear your opinion on that case.
Please share with me how you will proceed, and why this is happening at all.

Thanks.

------------------------

1. Bear with me, I'm doing all of this in my home lab, but I want to have rules and think like big enterprise companies. Having manually/statically downloaded software/binaries is bad because they cannot be assessed easily (via the package manager), cannot easily understand that there is new version of it, cannot be upgraded easily etcetera.

2. I'm installing security upgrades automatically, security has to be installed no matter what.
in OCS Inventory NG agent for Unix by (240 points)

4 Answers

+1 vote
 
Best answer
For the agent, you have one rule : the agent MUST be EQUAL or LOWER than server version. (NEVER upper else you will get error 400).

On Windows computers, upgrade of agent is never automatic. You could choose the server version.

On Linux computers (or servers), if you use a packaged agent, you don't have the choice of agent version ! And it could be upgraded automaticly if you upgrade version of OS : example Debian 10 / package 2.4.2-3 to Debian 11 / package 2.8-1.

With a rolling distribution (Arch, Manjaro, or Debian Testing !), you could also received a new version of agent.

The OCS team don't supply a packaged version of any agent for any distribution/version.

When you want really choose the agent version, you could install it manually : you'll need requirements Perl and librairies (packaged version) and perl Makefile.pl / make / make install. (Maybe replace with 'tar x' due OCS agent is Perl scripts)

(as I read the forum, I can see all questions about upgrade to 2.9 server version ... it's better to keep an old agent version ...)
by (8.3k points)
edited by
0 votes

Ok, that's a good answer. But I still see some misunderstanding in here, you said the the agent always have to be equal or lower the server version, then why there is a version 2.9 of the agent on the official ocs repository? This is a bit confusing...

*Emails are not allowed*:~# more /var/lib/apt/lists/deb.ocsinventory-ng.org_debian_dists_buster_main_binary-amd64_Packages
Package: ocsinventory-agent
Version: 2:2.9.0
Architecture: all
Maintainer: Gilles Dubois <*Emails are not allowed*>
Installed-Size: 912
Depends: debconf (>= 0.5) | debconf-2.0, perl, po-debconf, ucf, libxml-simple-perl, libnet-ip-perl, perl (>= 5.14) | libcompress-zlib-perl, libwww-perl, libnet-ssleay-perl, libproc-daemon-pe
rl
Recommends: dmidecode, hdparm, pciutils
Suggests: nmap, smartmontools, read-edid
Homepage: https://www.ocsinventory-ng.org/
Priority: main
 

by (240 points)
0 votes
If you search in Debian Packages, you can see, for Debian Buster, the agent is 2:2.8-1 :

https://packages.debian.org/search?keywords=ocsinventory-agent&searchon=names&suite=all&section=all
by (8.3k points)
0 votes

Never mind, thanks for the support.

Have nice rest of the day :-)

by (240 points)
 
Powered by Question2Answer
...