Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot complete login due to an incorrect user name or password #49

Closed
abhilash07 opened this issue Jan 5, 2018 · 9 comments
Closed

Comments

@abhilash07
Copy link

abhilash07 commented Jan 5, 2018

Hi i am trying to deploy microbosh on vsphere 6.5 but i encountering below error

creating stemcell (bosh-vsphere-esxi-ubuntu-trusty-go_agent 3468.13):
CPI 'create_stemcell' method responded with error: CmdError{"type":"Unknown","message":"Cannot complete login due to an incorrect user name or password.","ok_to_retry":false

My Bosh Deatils are follows

bosh create-env /home/ubuntu/workspace/bosh-deployment/bosh.yml
--state=state.json
--vars-store=creds.yml
-o /home/ubuntu/workspace/bosh-deployment/vsphere/cpi.yml
-v director_name=bosh
-v internal_cidr=192.168.203.0/24
-v internal_gw=192.168.203.1
-v internal_ip=192.168.203.18
-v network_name="SBP Network"
-v vcenter_dc=cloudservice
-v vcenter_ds=datastore1
-v vcenter_ip=192.168.203.20
-v vcenter_user=administrator@vsphere.local
-v vcenter_password=$D$32@bhi07-
-v vcenter_templates=bosh-templates
-v vcenter_vms=bosh-vms
-v vcenter_disks=bosh-disks
-v vcenter_cluster=cluster1

but when i try to login from vSphere Web Client single sign on dashboard i am successfully signing in with above username and password.

So i checked the Events in vSphere Web Client dashboard i see the below error

screen shot 2018-01-05 at 5 36 33 pm 2
screen shot 2018-01-05 at 5 33 13 pm 2

Should i want to configure and enable Active Directory ?

vSphere Web Client Active Directory
screen shot 2018-01-05 at 5 39 29 pm 2

vSphere ESXi Active Directory
screen shot 2018-01-05 at 5 39 43 pm 2

Thanks in Advance!!!

@ktchen14
Copy link
Contributor

ktchen14 commented Jan 5, 2018 via email

@abhilash07
Copy link
Author

abhilash07 commented Jan 6, 2018

hi @ktchen14 thanks for your response

I exucete like below but the same error is coming

bosh create-env /home/ubuntu/workspace/bosh-deployment/bosh.yml
--state=state.json
--vars-store=creds.yml
-o /home/ubuntu/workspace/bosh-deployment/vsphere/cpi.yml
-v director_name=bosh
-v internal_cidr=192.168.203.0/24
-v internal_gw=192.168.203.1
-v internal_ip=192.168.203.18
-v network_name="SBP Network"
-v vcenter_dc=cloudservice
-v vcenter_ds=datastore1
-v vcenter_ip=192.168.203.20
-v vcenter_user=administrator@vsphere.local
-v vcenter_password='$D$32@bhi07-'
-v vcenter_templates=bosh-templates
-v vcenter_vms=bosh-vms
-v vcenter_disks=bosh-disks
-v vcenter_cluster=cluster1

But i have one question, as your comment states this vsphere-cpi tries to connect vcenter shell rather than vsphere web client ui ?
So then i should execute like this ?

bosh create-env /home/ubuntu/workspace/bosh-deployment/bosh.yml
--state=state.json
--vars-store=creds.yml
-o /home/ubuntu/workspace/bosh-deployment/vsphere/cpi.yml
-v director_name=bosh
-v internal_cidr=192.168.203.0/24
-v internal_gw=192.168.203.1
-v internal_ip=192.168.203.18
-v network_name="SBP Network"
-v vcenter_dc=cloudservice
-v vcenter_ds=datastore1
-v vcenter_ip=192.168.203.20
-v vcenter_user=root
-v vcenter_password='$D$32@bhi07-'
-v vcenter_templates=bosh-templates
-v vcenter_vms=bosh-vms
-v vcenter_disks=bosh-disks
-v vcenter_cluster=cluster1

One more question is this error (Cannot complete login due to an incorrect user name or password ) is no way related to vSphere Active directory ?

Thanks in Advance

@yeshwantbabar
Copy link
Contributor

The command looks fine. Can you check if you can ssh to your vSphere environment using the above credentials? I don't think it's an active directory issue. As long as local login is enabled, which in your case, it seems like it is, as you can login through the UI.

@ktchen14
Copy link
Contributor

ktchen14 commented Jan 8, 2018 via email

@abhilash07
Copy link
Author

Hi @ktchen14 and @yeshwantbabar thanks for your information i solve the error

@deadlysyn
Copy link

hmm seeing the same issue, despite already having my password w/ special chars in single quotes. have a resource pool so very slight difference in my inputs. latest vsphere cpi from bosh-deployment repo. same creds work fine manually. bosh.io docs a little light on detail (will PR if i figure it out and some sort of doc addition would help...may be something in my environment).

$ bosh -v
version 2.0.48-e94aeeb-2018-01-09T23:08:08Z

$ bosh create-env bosh.yml -o cpi.yml -o resource-pool.yml -l vars.yml --vars-store creds.yml
Deployment manifest: '/Users/mhoskins/src/vcenter/haas/bosh.yml'
Deployment state: '/Users/mhoskins/src/vcenter/haas/bosh-state.json'

Started validating
Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00)
Validating release 'bosh'... Finished (00:00:00)
Downloading release 'bosh-vsphere-cpi'... Skipped [Found in local cache] (00:00:00)
Validating release 'bosh-vsphere-cpi'... Finished (00:00:00)
Validating cpi release... Finished (00:00:00)
Validating deployment manifest... Finished (00:00:00)
Downloading stemcell... Skipped [Found in local cache] (00:00:00)
Validating stemcell... Finished (00:00:00)
Finished validating (00:00:00)

Started installing CPI
Compiling package 'ruby-2.4-r3/8471dec5da9ecc321686b8990a5ad2cc84529254'... Finished (00:00:00)
Compiling package 'iso9660wrap/82cd03afdce1985db8c9d7dba5e5200bcc6b5aa8'... Finished (00:00:00)
Compiling package 'vsphere_cpi/3049e51ead9d72268c1f6dfb5b471cbc7e2d6816'... Finished (00:00:00)
Installing packages... Finished (00:00:00)
Rendering job templates... Finished (00:00:00)
Installing job 'vsphere_cpi'... Finished (00:00:00)
Finished installing CPI (00:00:01)

Starting registry... Finished (00:00:00)
Uploading stemcell 'bosh-vsphere-esxi-ubuntu-trusty-go_agent/3468.21'... Failed (00:01:01)
Stopping registry... Finished (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)

creating stemcell (bosh-vsphere-esxi-ubuntu-trusty-go_agent 3468.21):
CPI 'create_stemcell' method responded with error: CmdError{"type":"Unknown","message":"Cannot complete login due to an incorrect user name or password.","ok_to_retry":false}

Exit code 1

$ cat vars.yml

director_name: bosh01
internal_cidr: 10.193.59.0/24
internal_gw: 10.193.59.1
internal_ip: 10.193.59.30
network_name: 'VM Network'
vcenter_dc: Datacenter
vcenter_cluster: Cluster
vcenter_rp: RP01
vcenter_ds: LUN01
vcenter_ip: 10.193.59.11
vcenter_user: Administrator
vcenter_password: ((vcenter_password))
vcenter_templates: bosh01-templates
vcenter_vms: bosh01-vms
vcenter_disks: bosh01-disks
dns_server: [10.193.59.2]

all of the vcenter_* names match up to what i see in the UI. guessing there must be something simple i am missing! :-)

@abhilash07
Copy link
Author

@deadlysyn please try this way

network_name: "VM Network"
vcenter_user: administrator@vsphere.local
vcenter_password: 'your_password'

@deadlysyn
Copy link

thanks for the tip. same issue...started with that with Administrator just being my last permutation. was desperate so trying all sorts of:

DOMAIN\Administrator
Administrator@DOMAIN
administrator@domain
...

all seem to fail...with or without quotes (i figured yaml would want a string with @ quoted but 'administrator@vsphere.local' didn't work either).

someone mentioned elsewhere to avoid special chars all together (though above seems to show it working fine, my pass has a "!" in it if that is special). unfortunately there's a policy in effect requiring specials chars so i will have to try working around this tomorrow with more help to confirm/deny as the root cause.

@abhilash07
Copy link
Author

@deadlysyn can you please upload screen short of error message in vSphere Web client events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants