Page 1 of 2

Error while following document for Vmware monitoring

Posted: Fri Nov 20, 2020 12:55 am
by pratikmehta003
Hi Team,

I was following the document to have pre requisites for Vmware monitoring...
Below commands are what is mentioned for CentOS 7.8.. I ran 1st command and after that by mistake i ran this command which was for CentOS 8.x (yum remove perl-Crypt-SSLeay -y).... Not sure if this can cause any issue..


yum install -y libxml2-devel xml2 libuuid-devel perl-XML-LibXML perl-Env
export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions

And then i continued but the CPAN commands dont run and gives error as it cannot connect URLs or FTP to get required info... attached error info
So can i get some assistance to resolve this...

Re: Error while following document for Vmware monitoring

Posted: Fri Nov 20, 2020 4:04 pm
by vtrac
Hi pratikmehta003,
Since you accidentally removed the "perl-Crypt-SSLeay" package,
I would recommend that you re-install the removed package first then try the install steps over again.

yum install perl-Crypt-SSLeay -y

After "perl-Crypt-SSLeay" is installed, you can redo the below steps over. If package already installed, yum and cpan will let you know.

yum install -y libxml2-devel xml2 libuuid-devel perl-XML-LibXML perl-Env
export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions


Regards,

Re: Error while following document for Vmware monitoring

Posted: Sat Nov 21, 2020 12:46 am
by pratikmehta003
i actually understood that the which got removed, has to be re-installed.. so i had done that already..
i followed the steps u gave but still for cpan i get same error... as per what i understand its trying to download from some source...

the server does not have internet connection.. so is there any other way to manually install or if internet access is needed that what URLs should be allowed for this to work?

I have attached the error info again...

Re: Error while following document for Vmware monitoring

Posted: Mon Nov 23, 2020 5:01 am
by pratikmehta003
in addition to above info which i provided..

if internet access is provided by proxy and the configuration of proxy is required to be done on Nagios VM then can that be used? OR it has any impact?

Re: Error while following document for Vmware monitoring

Posted: Mon Nov 23, 2020 2:43 pm
by vtrac
Hi pratikmehta003,
Looking at the log ... yes, it seems like you do not have internet connection or DNS configured.
Can you please ask your system admin or network admin for the proxy settings like IP and port.
Once you have the proxy's info, you can export the http_proxy and try the manual install.

Code: Select all

export http_proxy=http://SERVER:PORT/

export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions
If you are able to manually installed those modules above, you might want to add the "export http_proxy" command to the "/etc/profile" and "/etc/yum.conf".

Please note that Nagios XI requires external access for package installation and updates. Package installation and updates may not work when proxies are configured incorrectly.

Best Regards,
Vinh

Re: Error while following document for Vmware monitoring

Posted: Mon Nov 23, 2020 11:19 pm
by pratikmehta003
Hi,

Manually it won't be possible since internet connection is not available. So on the OS level if proxy is configured then is that fine? OR the http_proxy has to be used mandatory?

Re: Error while following document for Vmware monitoring

Posted: Tue Nov 24, 2020 12:35 pm
by vtrac
Hi pratikmehta003,
Were you able to install CPAN with the "export http_proxy" settings?
This "export" setting is only temporary. Once you log off your terminal, its will be gone or you can "unset" it as well.

So on the OS level if proxy is configured then is that fine? (you asked)
Yes, as long as you are able to connect outside to download packages then you don't need the "http_proxy" setting.
You can do a quick check by using the "ping" command like "ping google.com" on your terminal.

If you don't have the ability to connect outside, then you will need to "export http_proxy" temporary so you are able to install all CPAN modules and RPM packages that are required by Nagios XI. Your network or sys-admin should have those information.

Once the install is completed, you can just un-export it by doing the "unset http_proxy" command.

Please talk to your network admin and see what is the right procedure and standard that are set by your company.

Best Regards,
Vinh

Re: Error while following document for Vmware monitoring

Posted: Wed Nov 25, 2020 1:29 am
by pratikmehta003
I am checking on it with Network team.. give me a days time...

Re: Error while following document for Vmware monitoring

Posted: Wed Nov 25, 2020 2:40 pm
by benjaminsmith
I am checking on it with Network team.. give me a days time...
Sounds good! Just update the thread when you're ready.

Re: Error while following document for Vmware monitoring

Posted: Thu Nov 26, 2020 3:38 am
by pratikmehta003
HI,
I got the proxy configured in yum.conf... i followed the below commands.. first 2 were already executed before... so started with others..
yum install -y libxml2-devel xml2 libuuid-devel perl-XML-LibXML perl-Env
export PERL_MM_USE_DEFAULT=1
cpan -i App::cpanminus
cpanm --notest Module::Build Crypt::SSLeay
cpan -i Nagios::Monitoring::Plugin Nagios::Monitoring::Plugin::Functions

Post that i got this error for cpam:
[root@ucprngapprd01 vmware-vsphere-cli-distrib]# cpanm --notest Module::Build Crypt::SSLeay
! Finding Module::Build on cpanmetadb failed.
! cannot open file '/root/.cpanm/sources/http%www.cpan.org/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Module::Build
! Finding Crypt::SSLeay on cpanmetadb failed.
! cannot open file '/root/.cpanm/sources/http%www.cpan.org/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Crypt::SSLeay

and then i tried deploying vmware sdk also... at the end i got this error:
CPAN not able to install following Perl modules on the system. These must be
installed manually for use by vSphere CLI:
Time::Piece 1.31 or newer
Archive::Zip 1.28 or newer
Path::Class 0.33 or newer
version 0.78 or newer
UUID 0.27 or newer
Text::Template 1.47 or newer
Net::INET6Glue 0.603 or newer

i tried to find these modules on internet but not able to find few.... so please assist as to how we can resolve this...