VMware {code} Community
AnoopHPE
Contributor
Contributor

Failing to register the local vsphere Client with vCenter

My development cloud recently moved from public to a private lan , after that I am failing to register my local vSphere Client with a new vCenter. I keep getting the Auth fail error.Pasting the error below

"VMWARE_CFG_DIR is chosen to be: C:/ProgramData/VMware/vCenterServer/cfg/

Has connection problem with vCenter server IP: 192.168.36.202. Please check vCenter server and authentication.

 Auth fail"

Rather than changing the ip address, username and password of the new vCenter in the command "server-registration.bat -vcip <new ip>  -u <new username>  -pw <new password> -p 22 -v, is there anything else I need to change. I am able to connect through ssh and browser.

I am using vCenter 7.0. vSphere Web Client is 6.7.
Reply
0 Kudos
18 Replies
Plam_Dimitrov
VMware Employee
VMware Employee

Hello,


This seems to be a problem with JSch not being able to ssh to the vCenter. "Auth fail" means that connectivity is not a problem - rather the client cannot authenticate to the server. It is very likely that there is a mismatch between the public key of the client and what the server has in its authorized keys records. Can you please check everything is fine with the ssh keys?


Regards,

Plam

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi ,

Thanks for the reply

I am able to login to vCenter Server using putty with our username and password.

The authorized_keys file is blank inside the .ssh directory. Can this be the issue?

How can we establish a ssh connection between vSphere Client and vCenter server? What are the steps for it?

Reply
0 Kudos
Plam_Dimitrov
VMware Employee
VMware Employee

Hello,

 

Just to confirm - you checked the authorized_keys file on the vCenter, not on your machine right? It seems that the vCenter is rejecting your public key so that there is probably a stale entry there. This may not be the case, however, since you are able to connect via Putty but is worth checking.

 

You do not need to establish an ssh connection between the vSphere Client and the vCenter Server. The server-registration script establishes an ssh connection between your machine and the vCenter to transfer over a couple of configuration files. It seems like the problem is that the vCenter rejects the ssh connection.

 

Regards,

Plam

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Yes. I was checking the .ssh/authorized_keys file in the vCenter server. It is completely empty. Should I copy a public key from client to the authorized_keys file in server?

As far I understand SSH, there are two ways of authenticaiton. One using username and password and other using public and private keys. Here I think server-registration.bat is using username and password for autehntication right?

Auth fail error won't be caused by configuration files right as copying of configuration files happens only after successful connection and here connection itself is not established.

This might be irrelevant but is there any requirement that the login details has to be in single quotes or double quotes ? server-registration.bat -vcip ipaddress -u <usrname> -pw <pwd> -p 22 -v

Reply
0 Kudos
Plam_Dimitrov
VMware Employee
VMware Employee

Hello,

 

You are correct, username/password is used for authentication so the problem should be with how the username/password is passed to the script (excuse me for causing some confusion).

 

On Windows you can use double quotes (make sure any special symbols are escaped) and on Mac - single ones (should escape automatically). I've tried locally (on both Windows and Mac VMs) and didn't run into any problems using the 6.7 script on a 7.0 vCenter. My only guess at the moment is that there are some special symbols in the username/pass that are causing problems.

 

Do you maybe have another vCenter for you to try the script against? Or another VM that you can run the script from (against the same vCenter and a different vCenter)?

 

Regards,

Plam

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi Thanks for the reply.

Now we are getting this error :

Traceback (most recent call last):

  File "/usr/lib/applmgmt/base/bin/vherdrunner", line 8, in <module>

    vherdrunner.start(vherdrunner.directories)

  File "/usr/lib/applmgmt/base/bin/vherdrunner.py", line 117, in start

    exec(code, childGlobals)

  File "/usr/lib/applmgmt/linux_cli/bin/main-shell", line 11, in <module>

    sys.exit(cli.main(sys.argv, products=('vherd', 'appliance')))

  File "/usr/lib/applmgmt/linux_cli/py/vmware/vherd/linux_cli/cli.py", line 1436, in main

    args = p.split(parsedArgs.c) + args

TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

Have you seen this error before.

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi Plam_Dimitrov ,

I tried to manually register the vSphere Client.

After running the startup.bat script and logging into localhost://9443/ui , this is the error I am getting

One or more vCenter Server systems are incompatible with the vSphere Web Client:https://dev-vcsa7.private.lan.com:443/sdk

I am able to succesfully register to another vCenter that is version 6.7 and also in public network. When I try to register using server-registration.bat script to a vCenter in same private network as my vNSC, it fails. with following error :

Traceback (most recent call last):

  File "/usr/lib/applmgmt/base/bin/vherdrunner", line 8, in <module>

    vherdrunner.start(vherdrunner.directories)

  File "/usr/lib/applmgmt/base/bin/vherdrunner.py", line 117, in start

    exec(code, childGlobals)

  File "/usr/lib/applmgmt/linux_cli/bin/main-shell", line 11, in <module>

    sys.exit(cli.main(sys.argv, products=('vherd', 'appliance')))

  File "/usr/lib/applmgmt/linux_cli/py/vmware/vherd/linux_cli/cli.py", line 1436, in main

    args = p.split(parsedArgs.c) + args

TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

could this be due to some firewall in the network?

Reply
0 Kudos
Plam_Dimitrov
VMware Employee
VMware Employee

Hello,

 

The "One or more vCenter Server systems are incompatible with the vSphere Web Client" error you are seeing is most likely due to trying to connect your 6.7 vSphere Client to a 7.0 vCenter. We'd suggest you to get the 7.0 vSphere Client SDK and use that to connect to the 7.0 vCenter? This may also help with your second problem - since you are running the scripts against the 7.0 vCenter, try using the scripts inside the 7.0 vSphere Client SDK. Please, if you encounter any problems send us the vsphere_client_virgo logs and the registration tool command line and output. A firewall rule issue is a possibility but seems unlikely (the ssh client seems to successfully connect over TCP on port 22).

 

Regards,

Plam

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi Plam Dimitrov,

Looks like you were right last time.Versions were incompatible. After manual registration of vSphere Client 6.7 with a vCenter server 6.7 in our privatelan, I was able to configure my local Web browser application to interact with vCenter.

But as we are planning to use vCenter server 7.0, we have to use vSphere Client SDK 7.0.

There are some changes in vSphere Client SDK 7.0. There is no Eclipse plugin and Eclipse is not used to start Tomcat server.

According to docs, there is plugin generation scripts folder of vSphere Client 7.0  inside  "SDK_folder\html-client-sdk\tools\Plugin generation scripts" should be used to create a plugin.

But that folder is not available along with the scripts. Where can I get them?

When I try to run http-sample project after manual registration, I am getting this error

Plugin configuration for reverse proxy failed

What causes this error?

Reply
0 Kudos
gradevd
VMware Employee
VMware Employee

Hello,

Regarding yoyr first question: The generation scripts are removed from the SDK delivery for 7.0. It is a mistake from our side not to update the docs accordingly. Apologies.

Regarding your second question: I am not sure which plugin sample you refer to by http-sample.

If we are talking about a local plugin, the html-sample, then you should not see this error, as it is related to a remote plugin. Or it is probably an error from another remote plugin on your local environment.

If we are talking about a remote plugin, then one reason for the "Plugin configuration for reverse proxy failed" failure might be if you are running vSphere Client on localhost. Then your Client tries to register proxy rules at your localhost, where there is no proxy.

If that is not the case, then you need to attach the logs so that we can follow what is happening.

Hope this helps.

Regards,

Dimitar

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi I have attached vsphere_client_virgo.log file along with this reply.

This is the log after running the startup.bat file.

Many of the errors are due to missing files like config.xml, vspherefeatures.cfg ..etc. inside "C:\ProgramData\VMware\vCenterServer\cfg\" directory.

Right now I have only vsphere-client, vsphere-ui and store.jks inside "C:\ProgramData\VMware\vCenterServer\cfg\" directory. What should be done to get the remaining files?

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi,

Whenever I try to register vSphere Client 7.0 with vCenter server 6.7 , I am getting this error.

"An error occurred while sending an authentication request to the vCenter Single Sign-On server - An error occurred when processing the metadata during vCenter Single Sign-On setup - Couldn't find SSO servers for the local domain."

But if I try to register vSphere Client 7.0 with vCenter server 7.0, there is sso error , but the sample plugin "html-sample" fails to get deployed due to the error "Plugin configuration for reverse proxy failed"

How are the files in the directory "C:\ProgramData\VMware\vCenterServer\cfg\" created?

I am guessing the errors are due to missing files. I am attaching the log file again for reference. This log is after running startup.bat file in my dev environment.

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Just to confirm , we are running local plugin not remote plugin

Reply
0 Kudos
stoevm
VMware Employee
VMware Employee

Hi AnoopHPE, 

Why do you want to register 7.0 vSphere Client SDK to a 6.7 vCenter ? 

Also about the errors, you can try to resolve it by creating the missing files: 

C:\ProgramData\VMware\vCenterServer\cfg\vsphereFeatures\vsphereFeatures.cfg
C:/ProgramData/VMware/vCenterServer/cfg/\vsphereFeatures\techPreview.cfg

If there are additiona errors after this, please share them with us.

Martin

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

I tried registering 7.0 Client with 6.7 vCenter server to check whether they are compatible, as it is said in the document.

Right now I am trying 7.0 Client with 7.0 vCenter server.

Now I am able to register sample plugin "html-sample" successfully. But I am getting this error for my plugin

Error deploying plug-in. org.osgi.service.resolver.ResolutionException: Unable to resolve /C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-ui.war: missing requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: namespace=osgi.wiring.package, attributes={}, directives={filter=(&(osgi.wiring.package=com.hpe.vnsui.nskVolume)(version>=0.0.0)), resolution=mandatory}, resource=/C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-ui.war [caused by: Unable to resolve /C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-service.jar: missing requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: namespace=osgi.wiring.package, attributes={}, directives={filter=(&(osgi.wiring.package=com.vmware.o11n.sdk.rest.client.impl)(version>=0.0.0)), resolution=mandatory}, resource=/C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-service.jar] org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)

When I unzipped "com.hpe.vnsui-1.1.15.esa" , the war file is present though.

Regards,

Anoop

Reply
0 Kudos
stoevm
VMware Employee
VMware Employee

Hi,

As the error says:

com.hpe.vnsui.nskVolume is missing from the manifest of the war service.

Please take a look and fix the missing packages from the manifest of the war and jar services as well.

Reply
0 Kudos
stoevm
VMware Employee
VMware Employee

On second thought as the error has caused by:

Unable to resolve /C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-service.jar: missing requirement org.apache.aries.subsystem.core.archive.ImportPackageRequirement: namespace=osgi.wiring.package, attributes={}, directives={filter=(&(osgi.wiring.package=com.vmware.o11n.sdk.rest.client.impl)(version>=0.0.0)), resolution=mandatory}, resource=/C:/vsphere-client-sdk-7.0.0.10100-15863815/html-client-sdk/vsphere-ui/plugin-packages/vnsui/com.hpe.vnsui-1.1.15.esa/vns-service.jar

I think that the com.vmware.o11n.sdk.rest.client.impl   might be missing from the jar manifest file.

Martin.

Reply
0 Kudos
AnoopHPE
Contributor
Contributor

Hi,

When I place my plugin in "html-client-sdk-6.7.0-8170180\vsphere-ui\plugin-packages"  and run startup.bat in the "html-client-sdk-6.7.0-8170180\vsphere-ui\server\bin", it is working fine.

But when I placed the same plugin in "vsphere-client-sdk-7.0.0.10100-15863815\html-client-sdk\vsphere-ui\plugin-packages" and run startup.bat  in "vsphere-client-sdk-7.0.0.10100-15863815\html-client-sdk\vsphere-ui\server\bin" it fails to deploy.

Only sdk version has changed.

What could be the reason?

Is there a way to start the server using Eclipse?

Reply
0 Kudos