[GH-ISSUE #170] "No 'get' handler defined for 'host/path'" error after upgrading to 2.1.0 when using openssh backend #93

Closed
opened 2026-02-27 15:46:22 +03:00 by kerem · 8 comments
Owner

Originally created by @matikij on GitHub (Aug 21, 2024).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/170

Originally assigned to: @jhollowe on GitHub.

given script

from proxmoxer import ProxmoxAPI
p=ProxmoxAPI('10.10.10.10', user=None, sudo=True, backend='openssh', timeout=30)
print(p.nodes.get())

I get an exception under 2.1.0:

Traceback (most recent call last):
File ".../repro.py", line 4, in
print(p.nodes.get())
^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/proxmoxer/core.py", line 167, in get
return self(args)._request("GET", params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/proxmoxer/core.py", line 156, in _request
raise ResourceException(
proxmoxer.core.ResourceException: 500 Internal Server Error: b"No 'get' handler defined for '10.10.10.10/nodes'"

The same script works when using 2.0.1

Originally created by @matikij on GitHub (Aug 21, 2024). Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/170 Originally assigned to: @jhollowe on GitHub. given script from proxmoxer import ProxmoxAPI p=ProxmoxAPI('10.10.10.10', user=None, sudo=True, backend='openssh', timeout=30) print(p.nodes.get()) I get an exception under 2.1.0: Traceback (most recent call last): File ".../repro.py", line 4, in <module> print(p.nodes.get()) ^^^^^^^^^^^^^ File ".../lib/python3.11/site-packages/proxmoxer/core.py", line 167, in get return self(args)._request("GET", params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../lib/python3.11/site-packages/proxmoxer/core.py", line 156, in _request raise ResourceException( proxmoxer.core.ResourceException: 500 Internal Server Error: b"No 'get' handler defined for '10.10.10.10/nodes'" The same script works when using 2.0.1
Author
Owner

@jhollowe commented on GitHub (Aug 22, 2024):

If you run pvesh get nodes, do you get an error?

What version of PVE are you trying to connect to?

<!-- gh-comment-id:2304609848 --> @jhollowe commented on GitHub (Aug 22, 2024): If you run `pvesh get nodes`, do you get an error? What version of PVE are you trying to connect to?
Author
Owner

@matikij commented on GitHub (Aug 22, 2024):

czw., 22 sie 2024 o 14:59 John Hollowell @.***>
napisał(a):

If you run pvesh get nodes, do you get an error?

No, but also exactly the same code works on 2.0.1

What version of PVE are you trying to connect to?

7.4
Message ID: @.***>

<!-- gh-comment-id:2304662885 --> @matikij commented on GitHub (Aug 22, 2024): czw., 22 sie 2024 o 14:59 John Hollowell ***@***.***> napisał(a): > If you run pvesh get nodes, do you get an error? > No, but also exactly the same code works on 2.0.1 > What version of PVE are you trying to connect to? > 7.4 Message ID: ***@***.***> > >
Author
Owner

@laugrean commented on GitHub (Oct 7, 2024):

Is there any update on this?
We also face this issue with proxmoxer 2.1.0?

<!-- gh-comment-id:2396071138 --> @laugrean commented on GitHub (Oct 7, 2024): Is there any update on this? We also face this issue with proxmoxer 2.1.0?
Author
Owner

@tobytes commented on GitHub (Oct 22, 2024):

Same issue on 2.1.0, 2.0.1 it works fine.
PVE: 8.2.7

<!-- gh-comment-id:2430022243 --> @tobytes commented on GitHub (Oct 22, 2024): Same issue on 2.1.0, 2.0.1 it works fine. PVE: 8.2.7
Author
Owner

@cloudcodger commented on GitHub (Nov 3, 2024):

I have encountered this same issue and can reproduce it 100% of the time.

Steps.

  1. Install Proxmox 8.2.7 (after install, also ran apt update and apt upgrade as well) on three systems
  2. Use Ansible playbook to create a cluster and set misc. Proxmox VE Datacenter configuration items.

This works under proxmoxer 2.0.1 but get these 500 errors with the latest version 2.1.0 as mentioned here.

The Ansible modules are in https://github.com/cloudcodger/proxmox_openssh that this has broken. A good starting point would be the module cloudcodger.proxmox_openssh.proxmox_group. Also, downloadable in Ansible Galaxy.

<!-- gh-comment-id:2453496123 --> @cloudcodger commented on GitHub (Nov 3, 2024): I have encountered this same issue and can reproduce it 100% of the time. Steps. 1. Install Proxmox 8.2.7 (after install, also ran `apt update` and `apt upgrade` as well) on three systems 2. Use Ansible playbook to create a cluster and set misc. Proxmox VE Datacenter configuration items. This works under `proxmoxer` 2.0.1 but get these 500 errors with the latest version 2.1.0 as mentioned here. The Ansible modules are in https://github.com/cloudcodger/proxmox_openssh that this has broken. A good starting point would be the module `cloudcodger.proxmox_openssh.proxmox_group`. Also, downloadable in Ansible Galaxy.
Author
Owner

@asdorsey commented on GitHub (Nov 21, 2024):

I'm also seeing this error with the ssh_paramiko backend.

ERROR:    Traceback (most recent call last):
  File "/app/config.py", line 101, in check_config
    nodes = client.nodes.get()
  File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 167, in get
    return self(args)._request("GET", params=params)
  File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 156, in _request
    raise ResourceException(
proxmoxer.core.ResourceException: 500 Internal Server Error: No 'get' handler defined for 'proxmox.mydomain.net/nodes'
<!-- gh-comment-id:2491863555 --> @asdorsey commented on GitHub (Nov 21, 2024): I'm also seeing this error with the `ssh_paramiko` backend. ``` ERROR: Traceback (most recent call last): File "/app/config.py", line 101, in check_config nodes = client.nodes.get() File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 167, in get return self(args)._request("GET", params=params) File "/usr/local/lib/python3.9/dist-packages/proxmoxer/core.py", line 156, in _request raise ResourceException( proxmoxer.core.ResourceException: 500 Internal Server Error: No 'get' handler defined for 'proxmox.mydomain.net/nodes' ```
Author
Owner

@asdorsey commented on GitHub (Nov 21, 2024):

From what I can tell, this is caused by the host component in the API path. I've replicated the issue on our Proxmox host using pvesh.

$ sudo pvesh get proxmox.mydomain.net/nodes --output-format json-pretty
No 'get' handler defined for 'proxmox.mydomain.net/nodes'
$ sudo pvesh get proxmox/nodes --output-format json-pretty
No 'get' handler defined for 'proxmox/nodes'
$ sudo pvesh get /nodes --output-format json-pretty
[
   {
      "cpu" : 0.113791521755543,
      "disk" : 15575646208,
      "id" : "node/proxmox",
      "level" : "",
      "maxcpu" : 96,
      "maxdisk" : 24425349120,
      "maxmem" : 1621890441216,
      "mem" : 1137960079360,
      "node" : "proxmox",
      "ssl_fingerprint" : "8B:5D:8B:B1:5C:4C:B4:5D:B0:D1:4D:BE:58:20:E7:3C:E9:59:50:23:C5:EB:DF:43:A9:74:74:66:DC:3D:9A:BC",
      "status" : "online",
      "type" : "node",
      "uptime" : 6058575
   }
]
<!-- gh-comment-id:2491986231 --> @asdorsey commented on GitHub (Nov 21, 2024): From what I can tell, this is caused by the host component in the API path. I've replicated the issue on our Proxmox host using `pvesh`. ``` $ sudo pvesh get proxmox.mydomain.net/nodes --output-format json-pretty No 'get' handler defined for 'proxmox.mydomain.net/nodes' $ sudo pvesh get proxmox/nodes --output-format json-pretty No 'get' handler defined for 'proxmox/nodes' $ sudo pvesh get /nodes --output-format json-pretty [ { "cpu" : 0.113791521755543, "disk" : 15575646208, "id" : "node/proxmox", "level" : "", "maxcpu" : 96, "maxdisk" : 24425349120, "maxmem" : 1621890441216, "mem" : 1137960079360, "node" : "proxmox", "ssl_fingerprint" : "8B:5D:8B:B1:5C:4C:B4:5D:B0:D1:4D:BE:58:20:E7:3C:E9:59:50:23:C5:EB:DF:43:A9:74:74:66:DC:3D:9A:BC", "status" : "online", "type" : "node", "uptime" : 6058575 } ] ```
Author
Owner

@asdorsey commented on GitHub (Nov 21, 2024):

I've created a PR at #186 to fix this issue by overriding get_base_url for both SSH backends. This works for me locally, but I would always appreciate more testing if anyone is willing.

<!-- gh-comment-id:2492125253 --> @asdorsey commented on GitHub (Nov 21, 2024): I've created a PR at #186 to fix this issue by overriding `get_base_url` for both SSH backends. This works for me locally, but I would always appreciate more testing if anyone is willing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#93
No description provided.