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.

Can't locate object method "new"

Hello,

After install unix agent via a package created by the unix packager I've an error message when i try to lunch ocsinventory-agent :

[error] Cannot establish communication : 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

for information i've the package LWP::Protocol::https::Socket in /opt/ocsinventory/perl/lib/5.26.0/LWP

The using command is :
./ocsinventory-agent --debug --server https://XXX-inventorycommunication.XXX.XXX.com/ocsinventory

And the result is :

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

[debug] Log system initialised (Stderr)

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

[debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__XXX-inventorycommunication-XXX.XXX.com_ocsinventory/ocsinv.adm

[debug] OCS Agent initialised

[debug] No modules will be used.

[debug] Compress::Zlib is not available! The data will be compressed with

             gzip instead but won't be accepted by server prior 1.02

[debug] sending XML

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

<REQUEST>

  <DEVICEID>localhost-2019-02-18-10-48-40</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[error] Cannot establish communication : 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Do you know what is this error ?

Thank's for your help.
in OCS Inventory NG agent for Unix by (440 points)

9 Answers

0 votes
Hi,

All necessary modules are installed ? No errors during the creation of the unix agent with unix packager ?

Regards

Frank
by (90.2k points)
0 votes

Hi Frank,

Yes all necessary modules are installed and no errors during the creation :(. 

In first, OCS say to me LWP::Protocol::https::Socket isn't installed, I've install it and now i've this message :

[error] Cannot establish communication : 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

by (440 points)
0 votes
is Crypt::SSLeay module installed ?
by (90.2k points)
0 votes
Yes he is installed too. I installed it manually
by (440 points)
0 votes
No idea to solve the problem ? I'm trying to solve but don't work :(
by (440 points)
0 votes
I've a new error message :

[root@localhost ocsinventory]# ./ocsinventory-agent --debug

Failed to load Ocsinventory::Agent, Can't locate loadable object for module Net::SSLeay in @INC (@INC contains: /opt/ocsinventory/perl/lib/site_perl/5.26.1/x86_64-linux /opt/ocsinventory/perl/lib/site_perl/5.26.1 /opt/ocsinventory/perl/lib/5.26.1/x86_64-linux /opt/ocsinventory/perl/lib/5.26.1) at /opt/ocsinventory/perl/lib/5.26.1/IO/Socket/SSL.pm line 18.

Compilation failed in require at /opt/ocsinventory/perl/lib/5.26.1/IO/Socket/SSL

BEGIN failed--compilation aborted at /opt/ocsinventory/perl/lib/5.26.1/IO/Socket

Compilation failed in require at /opt/ocsinventory/perl/lib/5.26.1/Ocsinventory/

BEGIN failed--compilation aborted at /opt/ocsinventory/perl/lib/5.26.1/Ocsinvent

Compilation failed in require at /opt/ocsinventory/perl/lib/5.26.1/Ocsinventory/

BEGIN failed--compilation aborted at /opt/ocsinventory/perl/lib/5.26.1/Ocsinvent

Compilation failed in require at (eval 1) line 1.

BEGIN failed--compilation aborted at (eval 1) line 1.

What I have in PerModulesDownloadList.txt :

libwww-perl-6.26.tar.gz

XML-Simple-2.24.tar.gz

HTTP-Message-6.13.tar.gz

URI-1.72.tar.gz

HTTP-Date-6.02.tar.gz

Try-Tiny-0.28.tar.gz

Encode-Locale-1.05.tar.gz

Net-HTTP-6.16.tar.gz

XML-SAX-0.99.tar.gz

XML-NamespaceSupport-1.12.tar.gz

XML-SAX-Base-1.08.tar.gz

Net-IP-1.26.tar.gz

Proc-Daemon-0.23.tar.gz

Compress-Zlib-1.42.tar.gz

Data-UUID-1.221.tar.gz

Net-Netmask-1.9022.tar.gz

XML-SAX-Expat-0.40.tar.gz

Nmap-Parser-1.36.tar.gz

LWP-Protocol-https-6.07.tar.gz

Proc-PID-File-1.28.tar.gz

Net-SNMP-v6.0.1.tar.gz

Net_SSLeay.pm-1.21.tar.gz

IO-Socket-SSL-1.54.tar.gz

Mozilla-CA-20180117.tar.gz

Crypt-SSLeay-0.72.tar.gz

XML-Twig-3.16.tar.gz

Test-RequiresInternet-0.01.tar.gz

Do you have an idea of what is the problem ?
by (440 points)
0 votes
Hi,

Install perl module Net::SSLeay and relaunch an inventory.

Regards

Frank
by (90.2k points)
0 votes

Hello Frankb,

Thank you for you answer but the module Net::SSLeay is in the file PerlModuleDownloadList.txt :

http://cpan.metacpan.org/authors/id/M/MI/MIKEM/Net-SSLeay-1.85.tar.gz

I've try with the 1.21 and 1.85 version

So he's already installed but I've the error and I really don't understand :(

by (440 points)
0 votes

Hello,

To test I've install manually all prerequisites (include Net::SSLeay) and same problem sad... I don't know what can I test crying

by (440 points)
 
Powered by Question2Answer
...