Hello,
I have some issues with REST API and I'm unable to find out what is the problem.
I have Python 3 wrapper over proxmoxer (version 1.1.1) Python library with HTTPS backend. During script execution, after several minutes the script fails on following exceptions like there were some network issues but I cannot se any problem causing this in logs on the Proxmox node. All I could read from the traceback is only that the Proxmox node terminated HTTP session for some reason.
Traceback (vm_management_http.py is my wrapper over proxmoxer):
I found out that the same thing happens when I manually stop or restart daemon pveproxy the script execution. Unfortunately I didn't find any logs that would cause it when pveproxy runs fine.
Any idea what could be wrong?
Thank you for advises.
I have some issues with REST API and I'm unable to find out what is the problem.
I have Python 3 wrapper over proxmoxer (version 1.1.1) Python library with HTTPS backend. During script execution, after several minutes the script fails on following exceptions like there were some network issues but I cannot se any problem causing this in logs on the Proxmox node. All I could read from the traceback is only that the Proxmox node terminated HTTP session for some reason.
Code:
root@devel1:~# pveversion -v
proxmox-ve: 6.2-1 (running kernel: 5.4.44-2-pve)
pve-manager: 6.2-10 (running version: 6.2-10/a20769ed)
pve-kernel-5.4: 6.2-4
pve-kernel-helper: 6.2-4
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.44-2-pve: 5.4.44-2
pve-kernel-5.4.44-1-pve: 5.4.44-1
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.18-2-pve: 5.3.18-2
pve-kernel-5.3.10-1-pve: 5.3.10-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 8.0-2
ifupdown: residual config
ifupdown2: 3.0.0-1+pve2
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.4
libpve-access-control: 6.1-2
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-5
libpve-guest-common-perl: 3.1-1
libpve-http-server-perl: 3.0-6
libpve-storage-perl: 6.2-5
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
openvswitch-switch: 2.12.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-9
pve-cluster: 6.1-8
pve-container: 3.1-12
pve-docs: 6.2-5
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-3
pve-qemu-kvm: 5.0.0-11
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-11
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.4-pve1
Traceback (vm_management_http.py is my wrapper over proxmoxer):
Code:
Traceback (most recent call last):
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.8/http/client.py", line 1332, in getresponse
response.begin()
File "/usr/lib64/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.8/http/client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/svoboda/.local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen
retries = retries.increment(
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/home/svoboda/.local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib64/python3.8/http/client.py", line 1332, in getresponse
response.begin()
File "/usr/lib64/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.8/http/client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./test.py", line 53, in <module>
ip_address = proxmox.get_machine_ip(vm_name)
File "/home/svoboda/src/proxmox-mgmt/vm_management_http.py", line 522, in get_machine_ip
vm_handle = self._get_vm_handle_by_vm_name(vm_name)
File "/home/svoboda/src/proxmox-mgmt/vm_management_http.py", line 1955, in _get_vm_handle_by_vm_name
nodes = self.get_proxmox_nodes()
File "/home/svoboda/src/proxmox-mgmt/vm_management_http.py", line 54, in get_proxmox_nodes
nodes = self._proxmox.nodes.get()
File "/home/svoboda/.local/lib/python3.8/site-packages/proxmoxer/core.py", line 105, in get
return self(args)._request("GET", params=params)
File "/home/svoboda/.local/lib/python3.8/site-packages/proxmoxer/core.py", line 85, in _request
resp = self._store["session"].request(method, url, data=data or None, params=params)
File "/home/svoboda/.local/lib/python3.8/site-packages/proxmoxer/backends/https.py", line 178, in request
return super(ProxmoxHttpSession, self).request(method, url, params, data, headers, cookies, files, auth,
File "/home/svoboda/.local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/svoboda/.local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/svoboda/.local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
I found out that the same thing happens when I manually stop or restart daemon pveproxy the script execution. Unfortunately I didn't find any logs that would cause it when pveproxy runs fine.
Any idea what could be wrong?
Thank you for advises.