Proxmox integration wont work

Proxmox integration wont work for me:

configuration.yaml

proxmoxve:
  - host: pve.XXXX.tk
    port: 8006
    verify_ssl: true
    realm: pam
    username: !secret proxmoxuser
    password: !secret proxmoxpassword
    nodes:
      - node: pve
        vms:
          - 100
          - 103
          - 106
          - 108
          - 111
        containers:
          - 101
          - 102
          - 105
          - 107

Logs:

2019-12-14 12:28:26 ERROR (MainThread) [homeassistant.setup] Error during setup of component proxmoxve
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 334, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f59940522d0>: Failed to establish a new connection: [Errno 101] Network unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pve.XXXX.tk', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f59940522d0>: Failed to establish a new connection: [Errno 101] Network unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/proxmoxve/__init__.py", line 91, in setup
    proxmox_client.build_client()
  File "/usr/src/homeassistant/homeassistant/components/proxmoxve/__init__.py", line 140, in build_client
    verify_ssl=self._verify_ssl,
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/core.py", line 106, in __init__
    self._backend = importlib.import_module('.backends.%s' % backend, 'proxmoxer').Backend(host, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/backends/https.py", line 125, in __init__
    self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/backends/https.py", line 44, in __init__
    data={"username": username, "password": password}).json()["data"]
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pve.XXXX.tk', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f59940522d0>: Failed to establish a new connection: [Errno 101] Network unreachable'))
2019-12-14 12:28:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1210, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

Thank you for your help!
~Marlon

Did you mean true for ssl?

Ive tryed both.

Looking at your error message again - you have ‘network unreachable’ appearing a lot - are you sure you’re using the correct address for the server, and that the server is accessible from your HA instance?

That server address is available to me from my lan. (All I get is a login page).

Routing or dns issues from your ha I guess.

Nope homeassistant is able to access this website. Other services like octoprint work also. I have tryed also to set up the component via local ip address of proxmox

Now that I access your site on a PC rather than a decrepit android tablet, ti get this in the address bar when I access pve.ghostip.tk

https://pve.ghostip.tk/#v1:0:18:4::::::

Perhaps an ipv6 vs ipv4 issue??

There was a typo in the password. Only the local IP of Proxmox worked with verify ssl turned off

Hi

I’ve tried also they way you said it’s working for you, but it isn’t for me.

proxmoxve:
  - host: !secret pve_host
    username: !secret pve_user
    password: !secret pve_password
    port: 8006
    verify_ssl: false
    realm: pam
    nodes:
      - node: pve
        vms:
          - 100

If I use verify_ssl: false I don’t get any message in the log and no proxmoxve in the States
If I use verify_ssl: true I get a lot of error messages in the log and no proxmoxve in the States

2019-12-20 09:46:41 ERROR (MainThread) [homeassistant.setup] Error during setup of component proxmoxve
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
    cnx.do_handshake()
  File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
    _raise_current_error()
  File "/usr/local/lib/python3.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
    ssl_context=context,
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 383, in ssl_wrap_socket
    return context.wrap_socket(sock)
  File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
    raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.161', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/proxmoxve/__init__.py", line 91, in setup
    proxmox_client.build_client()
  File "/usr/src/homeassistant/homeassistant/components/proxmoxve/__init__.py", line 140, in build_client
    verify_ssl=self._verify_ssl,
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/core.py", line 106, in __init__
    self._backend = importlib.import_module('.backends.%s' % backend, 'proxmoxer').Backend(host, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/backends/https.py", line 125, in __init__
    self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
  File "/usr/local/lib/python3.7/site-packages/proxmoxer/backends/https.py", line 44, in __init__
    data={"username": username, "password": password}).json()["data"]
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.161', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

what can I check more?

Thanks

You don’t get ‘proxmoxve’ in the states, you get binary_sensor.THE_NAME_OF_YOUR_VM

Thanks @anon43302295

I haven’t read the last rows of the integrations where was explained… :no_mouth:

1 Like

Is there a way to show disc usage? Or is there something else people use for that?