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

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

error 500 can't connect to ocsinventory-ng:80

server ocs : Ubuntu 16.04 , ocs version 2.4

the ocs agent is installed int the same machine (ocs server)

int the file /etc/ocsinventory-agent/ocsinventory-agent.cfg, i have configured it as follow :

  • basevardir= /var/lib/ocsinventory-agent 
  • ssl=1
  • server=https://IP@/ocsinventory
  • ca=/etc/ssl/ocs01/cacert.pem
  • tag=OCSserver
  • debug=1

____

after i launch ocsinventory-agent using debug mode , like this:

# ocsinventory-agent --debug 

i have this result with an error line at the end ,;

 (Ãchec temporaire dans la résolution du nom)

adii@ubuntu:~$ ocsinventory-agent --debug

Config: Failed to open /etc/ocsinventory-agent/ocsinventory-agent.cfg

[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[debug] Log system initialised (Stderr)

[info] You should run this program as super-user.

[debug] --scan-homedirs missing. Don't scan user directories

[error] Failed to create /var/lib/ocsinventory-agent/http:__ocsinventory-ng_ocsi                                                                             nventory directory: Permission denied

[debug] No accountinfo file defined

[debug] OCS Agent initialised

[debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf

[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[debug] Log system initialised (Stderr)

[debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[debug] Log system initialised (Stderr)

[debug] Calling handlers : `start_handler'

[debug] [snmp] Calling snmp_start_handler

[debug]  - Net::SNMP loaded

[debug] [download] Calling download_start_handler

[debug]  - LWP loaded

[debug]  - LWP::Protocol::https loaded

[debug] Compress::Zlib is available.

[debug] Calling handlers : `prolog_writer'

[debug] sending XML

[debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>ubuntu-2018-03-22-15-03-33</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[error] Cannot establish communication : 500 Can't connect to ocsinventory-ng:80                                                                              (Ãchec temporaire dans la résolution du nom)

PLEASE HELP ME OUT, i do need this 

asked in OCS Inventory NG agent for Unix by (220 points)

3 Answers

0 votes
 
Best answer

Hello,

error] Failed to create /var/lib/ocsinventory-agent/http:__ocsinventory-ng_ocsi                                                                             nventory directory: Permission denied

states that the user adii has no permissions to write to mentioned directory. You have to run the command as root. 

error] Cannot establish communication : 500 Can't connect to ocsinventory-ng:80                                                                              (Ãchec temporaire dans la résolution du nom)

There is a problem with name resolution (DNS). Either create a DNS entry for ocsinventory-ng or add an entry to /etc/hosts or use the IP of the server as Frank already explained.

Lars

answered by (590 points)
selected by
+1 vote
Hi,

First agent must be launched as root user. Second add --server https://@ip/ocsinventory on the command line and retry.

Regards

Frank
answered by (59.7k points)
0 votes

thank you so much for your help, indeed i no longer have the error message on the file /var/log/ocsinventory-agent/onsinventory-agent.log

root@ubuntu:/var/log/ocsinventory-agent# vim ocsinventory-agent.log

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::OS::MacOS ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::OS::Solaris ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Docker ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Jails ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Libvirt ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Lxc ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Parallels ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Qemu ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::SolarisZones ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::VirtualBox ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareDesktop ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareESX ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareWorkstation ignored

[Fri Mar 23 12:03:43 2018][debug]  - dmidecode found

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Xen::XL ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::Xen::XM ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::Virtualization::XenCitrixServer ignored

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::IpDiscover::Nmap disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::IpDiscover::Nmap'

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB'

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Oracle disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB'

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Debian disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB'

[Fri Mar 23 12:03:43 2018][debug] Running Ocsinventory::Agent::Backend::AccessLog

[Fri Mar 23 12:03:43 2018][debug] Running Ocsinventory::Agent::Backend::DeviceID

[Fri Mar 23 12:03:43 2018][debug] Running Ocsinventory::Agent::Backend::IpDiscover

[Fri Mar 23 12:03:43 2018][debug] Ocsinventory::Agent::Backend::IpDiscover has no run() function -> ignored

[Fri Mar 23 12:03:43 2018][debug] Running Ocsinventory::Agent::Backend::IpDiscover::IpDiscover

[Fri Mar 23 12:03:43 2018][debug] Scanning the 172.X.X.X network

So, now my question is , how do i get the SNMP inventory results to show in the web interface 
HOW CAN I SEE  THE TABLE THAT'S SUPPOSED TO BE CONTAINING ALL THE SNMP DEVICES SCANNED BY OCS AGENTS???
:)
answered by (220 points)
 
Powered by Question2Answer
...