1 (edited by KB7777 2017-03-08 11:15:34)

Topic: ocsinventory-agent-2.1.1-1.el7.remi.x86_64 problem

Hello.

I've installed  ocsinventory-agent-2.1.1-1.el7.remi.x86_64 and edited the /etc/ocsinventory/ocsinventory-agent.cfg with "server = correct.server.uri" and the agent couldn't connect :( It runs at local mode:

[Wed Mar  8 11:12:23 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Wed Mar  8 11:12:23 2017][debug] Log system initialised (File)
[Wed Mar  8 11:12:23 2017][debug] --scan-homedirs missing. Don't scan user directories
[Wed Mar  8 11:12:23 2017][debug] --server ignored since you also use --local
[Wed Mar  8 11:12:23 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__my.bloody.ocsinventory.srv_ocsinventory/ocsinv.adm
[Wed Mar  8 11:12:23 2017][debug] OCS Agent initialised
[Wed Mar  8 11:12:23 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Wed Mar  8 11:12:23 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Wed Mar  8 11:12:23 2017][debug] Log system initialised (File)
[Wed Mar  8 11:12:23 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Wed Mar  8 11:12:23 2017][debug] Log system initialised (File)
[Wed Mar  8 11:12:23 2017][debug] Calling handlers : `start_handler'
[Wed Mar  8 11:12:23 2017][debug] [download] Calling download_start_handler
[Wed Mar  8 11:12:23 2017][info] [download] Agent is running in local mode...disabling module
[...]
[Wed Mar  8 11:12:27 2017][info] Inventory saved in /var/lib/ocsinventory-agent/nextcloud-test-2017-03-08-09-06-46.ocs
[Wed Mar  8 11:12:27 2017][debug] Calling handlers : `end_handler'

Even if I run ocsinventory-agent --server=correct.server.uri it runs as local mode.

Where is the catch? :)

Regards ;)

EDIT: There is no hit at the ocsinventory server logs. But connection is, I'm 100% sure.

Re: ocsinventory-agent-2.1.1-1.el7.remi.x86_64 problem

> /etc/ocsinventory/ocsinventory-agent.cfg

No, see /etc/sysconfig/ocsinventory

BTW => https://forum.remirepo.net/viewtopic.php?id=3413

So the package are still there for historical reason, but are outdated and unmaintained.

AFAIK, upstream is working on a new repository with latest version.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: ocsinventory-agent-2.1.1-1.el7.remi.x86_64 problem

==>   http://rpm.ocsinventory-ng.org/enterprise/7/x86_64/

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

4 (edited by KB7777 2017-03-08 11:28:35)

Re: ocsinventory-agent-2.1.1-1.el7.remi.x86_64 problem

Edit /etc/sysconfig/ocsinventory-agent with OCSSERVER[0]=http://correct.server.uri/ocsinventory didin't work, so I have to compile it :(

Thnx :)

Re: ocsinventory-agent-2.1.1-1.el7.remi.x86_64 problem

You have to change both

   OCSMODE[0]=cron
   OCSSERVER[0]=<server name>

And then wait for cron to run or manually launch /etc/cron.hourly/ocsinventory-agent

And of course it will work, at least it have for years for me on thousands of linux servers.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi