mirror of
https://github.com/proxmoxer/proxmoxer.git
synced 2026-04-25 07:06:00 +03:00
[GH-ISSUE #136] requests.exceptions.ConnectionError: HTTPSConnectionPool NewConnectionError #68
Labels
No labels
backend:https
backend:local
backend:openssh
backend:ssh_paramiko
pull-request
status:ansible-issue
status:help-wanted
status:info-needed
status:proxmox-issue
status:review-needed
type:bug 🐞
type:dependency ⛓️
type:docs 📝
type:enhancement ⏫
type:maintenance 🛠️
type:meta
type:question ❓
type:request ✋
type:testing 🧪
version:1.x
version:latest
version:py2
version:py3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/proxmoxer#68
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Denyreal on GitHub (Feb 21, 2023).
Original GitHub issue: https://github.com/proxmoxer/proxmoxer/issues/136
Originally assigned to: @jhollowe on GitHub.
Hi thank you for this great tool.
I cannot make it work because i'm dumb :
i installed got on ansible controller
ansible [core 2.14.2]
pip install proxmoxer requests
on proxmox :
pip install proxmoxer requests
i checked if the api works :
curl -k -d 'username=root@pam' --data-urlencode 'password=MYPASSWORD https://192.168.10.30:8006/api2/json/access/ticketit works :
pvedaemon[425432]: <root@pam> successful auth for user 'root@pamwhen i'm trying to deploy playbook :
error_proxmoxer.txt
gather_facts: no
vars:
inventory_hostname: "perseverance"
pve_api_user: "root@pam"
pve_api_password: "{{ vault_root_passwd }}"
lxc_container_name: "nextcloud"
lxc_os_template: "fedora-37"
lxc_network_bridge: "vmbr0"
lxc_network_ip_address: "192.168.10.140/24"
lxc_root_password: "{{ vault_root_passwd }}"
ansible_ssh_common_args: '-o StrictHostKeyChecking=no -o IdentitiesOnly=yes'
ansible_user: root
ansible_ssh_private_key_file: keys/mars.lab
python_interpreter: python3.9
tasks:
name: Create LXC container on Proxmox
proxmox:
node: "{{ inventory_hostname }}"
api_user: "{{ pve_api_user }}"
api_host: 'perseverance'
api_password: "{{ pve_api_password }}"
vmid: " 140 "
ostemplate: "{{ lxc_os_template }}"
hostname: "{{ lxc_container_name }}"
password: "{{ lxc_root_password }}"
netif: "name=eth0,bridge={{ lxc_network_bridge }},ip={{ lxc_network_ip_address }}"
cores: 2
features:
name: Install Nextcloud package in LXC container
shell: >
pvesh create /nodes/{{ inventory_hostname }}/lxc/{{ lxc_container_name }}/exec --tty -- /bin/bash -c "dnf -y install nextcloud"
name: Start Nextcloud service in LXC container
shell: >
pvesh create /nodes/{{ inventory_hostname }}/lxc/{{ lxc_container_name }}/exec --tty -- /bin/bash -c "systemctl start nextcloud"
i got this error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='%20perseverance%20', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b86ec8df0>: Failed to establish a new connection: [Errno -2] Name or service not known')) fatal: [192.168.10.30]: FAILED! => {"changed": false, "msg": "HTTPSConnectionPool(host='%20perseverance%20', port=8006): Max retries exceeded with url: /api2/json/access/ticket (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1b86ec8df0>: Failed to establish a new connection: [Errno -2] Name or service not known'))"}Do i need to change the https method to ssh ? if yes how ?
Thank you very much for any help.
Regards
@jhollowe commented on GitHub (Feb 22, 2023):
As you can see in the error log it is trying to connect to
'%20perseverance%20'instead of'perseverance'. I don't know exactly where the extra spaces are getting added to your hostname, but that seems to be the reason the connection is not working.If you are not able to figure it out, please ask on the ansible forums as this is not a proxmoxer issue.
@Denyreal commented on GitHub (Feb 22, 2023):
As i told you i 'm dumb. Thank you very much.
@jhollowe commented on GitHub (Feb 22, 2023):
You aren't dumb, you are just learning something new. It takes time and experimentation to get complex things like Ansible working correctly.
We were all where you were at once upon a time. Some people are ahead of the learning curve in some topics, and you are ahead of them in other topics.
@Denyreal commented on GitHub (Feb 22, 2023):
Thank you for your support it give me motivation.
@Denyreal commented on GitHub (Feb 22, 2023):
i'll try to get some help here
thank you very much.