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

Couldn't connect to vSphere host #2003

Open
6 tasks done
HerishiSamael opened this issue Mar 11, 2024 · 2 comments
Open
6 tasks done

Couldn't connect to vSphere host #2003

HerishiSamael opened this issue Mar 11, 2024 · 2 comments

Comments

@HerishiSamael
Copy link

About accounts on capesandbox.com

  • Issues isn't the way to ask for account activation. Ping capesandbox in Twitter with your username

This is open source and you are getting free support so be friendly!

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I did read the README!
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)
  • I have read and checked all configs (with all optional parts)

Expected Behavior

Use Cape V2 with Vsphere, the host and analysis VM on Vsphere

Current Behavior

Hello,

I'm writing about an issue I encountered while setting up Cape for usage with vSphere to manage analysis VMs and the host VM. Initially, I successfully tested Cape with VirtualBox, but later modified my configuration file to use vSphere without SSL certification (using a homemade certificate).

I've verified that my configuration is correct by separately testing the vSphere API with curl to ensure the parameters I provided were accurate. However, currently Cape is unable to connect to vSphere. The error message I received was:

[root] CRITICAL: CuckooCriticalError: Couldn't connect to vSphere host: [Errno 110] Connection timed out

To further diagnose the issue, I added a traceback to identify the source of the error, and encountered the following:

[modules.machinery.vsphere] WARNING: Turning off SSL certificate verification!
Traceback (most recent call last):
  File "/opt/CAPEv2/modules/machinery/vsphere.py", line 95, in _initialize_check
    with SmartConnection(**self.connect_opts) as conn:
  File "/home/cape/.cache/pypoetry/virtualenvs/capev2-t2x27zRb-py3.10/lib/python3.10/site-packages/pyVim/connect.py", line 572, in __enter__
    self.si = SmartConnect(*self.args, **self.kwargs)
  File "/home/cape/.cache/pypoetry/virtualenvs/capev2-t2x27zRb-py3.10/lib/python3.10/site-packages/pyVim/connect.py", line 843, in SmartConnect
    supportedVersion = __FindSupportedVersion(protocol,
  File "/home/cape/.cache/pypoetry/virtualenvs/capev2-t2x27zRb-py3.10/lib/python3.10/site-packages/pyVim/connect.py", line 721, in __FindSupportedVersion
    serviceVersionDescription = __GetServiceVersionDescription(protocol,
  File "/home/cape/.cache/pypoetry/virtualenvs/capev2-t2x27zRb-py3.10/lib/python3.10/site-packages/pyVim/connect.py", line 642, in __GetServiceVersionDescription
    tree = __GetElementTree(protocol, server, port,
  File "/home/cape/.cache/pypoetry/virtualenvs/capev2-t2x27zRb-py3.10/lib/python3.10/site-packages/pyVim/connect.py", line 609, in __GetElementTree
    conn.request("GET", path)
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 1448, in connect
    super().connect()
  File "/usr/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.10/socket.py", line 845, in create_connection
    raise err
  File "/usr/lib/python3.10/socket.py", line 833, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
[root] CRITICAL: CuckooCriticalError: Couldn't connect to vSphere host: [Errno 110] Connection timed out

I'm confident that the parameters I've provided to connect to the vSphere host are correct. Additionally, my VM hosting CAPEv2 is capable of pinging vSphere and using the API with Curl.

@doomedraven
Copy link
Collaborator

hello, sorry we only officially support KVM, you will need to search the solution or wait till someone fix that for you. if you find solution and you want to help to others, you are more than welcome to make PR fix for this

@bartblaze
Copy link
Contributor

Set the logging to debug and try to add HTTP logging?

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

3 participants