Nutanix X-Ray

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to add vCenter as target

Adventurer

Unable to add vCenter as target

Hi all,

 

I'm trying to add a new vCenter target but I get this error 

 

[24/Jul/2017:17:21:54] HTTP Traceback (most recent call last):
File "/home/nutanix/xray/lib/py/CherryPy-3.2.4-py2.6.egg/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/home/nutanix/xray/lib/py/CherryPy-3.2.4-py2.6.egg/cherrypy/lib/encoding.py", line 188, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/home/nutanix/xray/lib/py/CherryPy-3.2.4-py2.6.egg/cherrypy/_cpdispatch.py", line 34, in __call__
return self.callable(*self.args, **self.kwargs)
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/codex-python-tree/bdist.linux-x86_64/egg/codex/server.py", line 738, in wrapper
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/xray-python-tree/bdist.linux-x86_64/egg/xray/server.py", line 2565, in discovery
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/xray-python-tree/bdist.linux-x86_64/egg/xray/server.py", line 1906, in _do_discovery
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/xray-python-tree/bdist.linux-x86_64/egg/xray/plugins/charon.py", line 755, in discover_vsphere_clusters
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/xray-python-tree/bdist.linux-x86_64/egg/xray/plugins/charon.py", line 1121, in ad_hoc_rpc
File "/builds/d8a0d508/0/charon/charon-main/builds/build-master-release/xray-python-tree/bdist.linux-x86_64/egg/xray/plugins/charon.py", line 1093, in do_rpc
CodexError: ERROR: Unable to discover clusters: InternalError: Exception(u'my_vcneter_ip:443 is not a VIM server',)

[24/Jul/2017:17:21:54] Sending the following error response with status 500:
{
"details": "InternalError: Exception(u'my_vcenter_ip:443 is not a VIM server',)",
"message": "ERROR: Unable to discover clusters"

 

I also tried to add vcenter IP and hostname in the "no_proxy" variable as well, given that I'm using a http\https proxy to authenticate against my.nutanix.comimages.jpg

Tags (2)
8 REPLIES
Adventurer

Re: Unable to add vCenter as target

Just wanted to add that x-ray eth0 and vCenter are on the same VLAN and i can ping vCenter from x-ray VM

 

Thanks

 

Sergio

Moderator

Re: Unable to add vCenter as target

Hi Sergio,

 

Is that vCenter already used for another target that is working? In other words, in the past has X-Ray ever successfully connected to that vCenter IP?

In another thread, you configured the proxy. Have you tried with/without the proxy?

 

Regards,

Kevin

Moderator

Re: Unable to add vCenter as target

Perhaps you'll need to exclude your LAN addresses from being proxied. You could try adding the address to a line in /etc/environment:

 

no_proxy="localhost, 127.0.0.1, your.vcenter/lan/addresses.here"

Adventurer

Re: Unable to add vCenter as target

Hi Kevin,

this is the first time I try to connect X-Ray to vCenter, so non successfull connections to vCenter in the past.

If I try a "wget https://my_vcenter_ip_or_domain" i get a "200 - OK" response

 

[root@xray ~]# wget https://my_vcenter_ip_or_domain
--2017-07-25 09:20:51-- https://my_vcenter_ip_or_domain/
Resolving my_vcenter_ip_or_domain... 10.0.X.Y.Z
Connecting to my_vcenter_ip_or_domain|10.0.X.Y.Z|:443... connected.
ERROR: cannot verify my_vcenter_ip_or_domain’s certificate, issued by “/DC=com/DC=domain/CN=MY_CA”:
Unable to locally verify the issuer’s authority.
To connect to my_vcenter_ip_or_domain insecurely, use ‘--no-check-certificate’.
[root@xray ~]# wget https://my_vcenter_ip_or_domain --no-check-certificate
--2017-07-25 09:21:08-- https://my_vcenter_ip_or_domain/
Resolving my_vcenter_ip_or_domain... 10.0.X.Y.Z
Connecting to my_vcenter_ip_or_domain|10.X.Y.Z|:443... connected.
WARNING: cannot verify my_vcenter_ip_or_domain’s certificate, issued by “/DC=com/DC=domain/CN=MY_CA”:
Unable to locally verify the issuer’s authority.
HTTP request sent, awaiting response... 200 OK
Length: 3029 (3.0K) [text/html]
Saving to: “index.html.1”

Adventurer

Re: Unable to add vCenter as target

Hi cwilson,

 

I tried to add vcenter IP to "no_proxy" variable and I'm able to get a "200 - OK" if I do a wget of vCenter IP or hostname on HTTPS

 



[root@xray ~]# wget https://my_vcenter_ip_or_domain
--2017-07-25 09:20:51-- https://my_vcenter_ip_or_domain/
Resolving my_vcenter_ip_or_domain... 10.X.Y.Z
Connecting to my_vcenter_ip_or_domain|10.X.Y.Z|:443... connected.
ERROR: cannot verify my_vcenter_ip_or_domain’s certificate, issued by “/DC=com/DC=crifnet/CN=CRIF-SUB-CA”:
Unable to locally verify the issuer’s authority.
To connect to my_vcenter_ip_or_domain insecurely, use ‘--no-check-certificate’.
[root@xray ~]# wget https://my_vcenter_ip_or_domain --no-check-certificate
--2017-07-25 09:21:08-- https://my_vcenter_ip_or_domain/
Resolving my_vcenter_ip_or_domain... 10.X.Y.Z
Connecting to my_vcenter_ip_or_domain|10.X.Y.Z|:443... connected.
WARNING: cannot verify my_vcenter_ip_or_domain’s certificate, issued by “/DC=com/DC=crifnet/CN=CRIF-SUB-CA”:
Unable to locally verify the issuer’s authority.
HTTP request sent, awaiting response... 200 OK
Length: 3029 (3.0K) [text/html]
Saving to: “index.html.1”

Moderator

Re: Unable to add vCenter as target

Just for clarity, after changing the no_proxy variable you're able to communicate with the vcenter server as illustrated by wget, but attempts to connect to it with X-Ray are still failing. Is that correct?

Highlighted
Adventurer

Re: Unable to add vCenter as target


cwilson wrote:

Just for clarity, after changing the no_proxy variable you're able to communicate with the vcenter server as illustrated by wget, but attempts to connect to it with X-Ray are still failing. Is that correct?


 

Hi cwilson, yes that's correc, target creation is still failing. can you confirm I only need to reach port 443 TCP from X-Ray to vCenter?

 

Thanks for support

 

Sergio

Moderator

Re: Unable to add vCenter as target

Yes should just be port 443. X-Ray uses the standard management API.