ESX - Cannot complete login due to an incorrect user name or

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

ESX - Cannot complete login due to an incorrect user name or

Post by sureshkraj2012 »

Hello,

We have recently updated existing ESX hosts and added few new hosts.
After that, ESX related service checks shows "Cannot complete login due to an incorrect us" though the credentials are correct / working.
It is a domain account (which we use for monitoring) and it propagated to all the ESX hosts.

sudo /usr/local/nagios/libexec/check_esx3.pl -H esx05.domain.com -u nagios_acct -p 'xxxxxxxxxxxx.' -l MEM --timeout=70
ESX3 CRITICAL - Cannot complete login due to an incorrect user name or password.


sudo /usr/local/nagios/libexec/check_esx3.pl -H esx05.domain.com -u 'domain.com\nagios_acct' -p 'xxxxxxxxxxxx.' -l MEM --timeout=70
ESX3 CRITICAL - Cannot complete login due to an incorrect user name or password.

I even stored the credentials in the file and tried with -f option but no luck.
Please let me know if I missing something here.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by lmiltchev »

Did the credentials change? Can you log in the ESXi server using these credentials? Do you see any failed login attempts on the ESX servier?

Code: Select all

faillog -u <username>
Be sure to check out our Knowledgebase for helpful articles and solutions!
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by sureshkraj2012 »

We haven't changed the credential.
We do see Cannot login error in the ESX events. But, the same domain credentials are being used for other ESX hosts and monitoring works well.

Cannot login [email protected]
error
5/14/2015 8:47:21 AM
esx05.domain.com
nagios_acct
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by jdalrymple »

sureshkraj2012 wrote:Hello,

We have recently updated existing ESX hosts and added few new hosts.
Is this 6.0? I haven't spun up a 6.0 lab yet so I cannot confirm nor deny anything has changed that would break our plugin.
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by sureshkraj2012 »

No. It is upgraded to 5.5
sureshkraj2012
Posts: 65
Joined: Tue Aug 06, 2013 11:06 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by sureshkraj2012 »

In addition, do we need allow anything in ESX side to make this plugin work? or we have verbose to troubleshoot this problem?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: ESX - Cannot complete login due to an incorrect user nam

Post by jdalrymple »

Can you try your credentials using a simple VMware SDK app such as hostinfo?

Code: Select all

[root@localhost ~]# perl /usr/lib/vmware-vcli/apps/host/hostinfo.pl --server <esx IP>
Enter username: root
Enter password:

Host Information

Host Name:                       localhost.localdomain
Port Number:                     902
BootTime:                        2015-05-06T13:19:39.79837Z
Cpu Model:                       Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Cpu Speed:                       7183498000
Cpu Usage:                       83
File System:                     vmfs nfs vfat vffs vvol
Host Status:                     The status is unknown
Maintenance mode:                0
Physical Memory:                 4294430720 bytes
Memory Usage:                    1182MB
Network Adapters:                2
Reboot Required:                 0
Software on host:                VMware ESXi 5.5.0 build-2068190
VMotion:                         0
ThomasP1010
Posts: 3
Joined: Wed Aug 30, 2017 10:51 am

Re: ESX - Cannot complete login due to an incorrect user nam

Post by ThomasP1010 »

Check 'Authentication Services' settings on the ESXi Host your can't connect to.
If that Host is using 'Local Authentication' it won't recognize Domain Accounts, which will cause this 'cannot complete login due to an incorrect username' error.
In our virtual environment I noticed that only two of our ESXi Hosts (out of 11) were setup with AD Authentication, the rest were all using Local Authentication.
Which explains why one worked but the rest did NOT.
To FIX the problem, You've got two options.
Create a Read Only Account on each ESXi Host you plan to monitor & use that account in NagiosXi.
Or
Add the Active Directory config to 'Directory Services Configuration' in the 'Authentication Services' area in 'Configuration' of the ESXi Host in question. Then try that domain service account again.

Thanks jdalrymple for posting this perl script cmd, it helped out a lot in troubleshooting this problem :)
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: ESX - Cannot complete login due to an incorrect user nam

Post by tmcdonald »

Thanks for the feedback, but as this thread is years old I will be closing it now.
Former Nagios employee
Locked