netdevopsbr / netbox-proxbox

Netbox Plugin for integration between Proxmox and Netbox
Apache License 2.0
341 stars 50 forks source link

Temporary failure in name resolution #31

Open bym0 opened 2 years ago

bym0 commented 2 years ago

Hi!

i was interested when i found your project, so i thought i'd give it a go.

I use a fresh netbox instance with nothing in it and a fresh install of netbox-proxbox, with the new fix that was supplied 1-2 days ago. I get following error:

<class 'requests.exceptions.ConnectionError'>

HTTPSConnectionPool(host='https', port=8006): Max retries exceeded with url: /api2/json/cluster/status (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fc702b2bdf0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

Python version: 3.8.10
NetBox version: 3.1.8

My Config looks like this:

PLUGINS_CONFIG = {
    'netbox_proxbox': {
        'proxmox': {
            'domain': 'https://proxmox.bit.lan/',    # May also be IP address
            'http_port': 443,
            'user': 'root@pam',
            'password': '####',
            'token': {
                'name': '####',   # Only type the token name and not the 'user@pam:tokenID' format
                'value': '####'
            },
            'ssl': True
        },
        'netbox': {
            'domain': 'netbox.bit.lan',     # May also be IP address
            'http_port': 80,
            'token': '####',
            'ssl': False,       # There is no support to SSL on Netbox yet, so let it always False.
            'settings': {
                'virtualmachine_role_id' : 0,
                'node_role_id' : 0,
                'site_id': 0
            }
        }
    }
}

The configured domain is resolvable from the machine itself, so is proxbox probably ignoring the set configuration of http_port 443?

root@netbox:/opt/netbox# ping proxmox.bit.lan
PING #### (proxmox.bit.lan) 56(84) bytes of data.
64 bytes from #### (proxmox.bit.lan): icmp_seq=1 ttl=58 time=0.780 ms
64 bytes from #### (proxmox.bit.lan): icmp_seq=2 ttl=58 time=0.948 ms
64 bytes from #### (proxmox.bit.lan): icmp_seq=3 ttl=58 time=0.824 ms
emersonfelipesp commented 2 years ago

Hello @bym0 , so you can reach the domain netbox.bit.lan through ping (ICMP) right? I will create a lab running what you are trying to do and inform you the results as soon as possible!

bym0 commented 2 years ago

Hello @bym0 , so you can reach the domain netbox.bit.lan through ping (ICMP) right? I will create a lab running what you are trying to do and inform you the results as soon as possible!

Hey @emersonfelipesp !

So netbox.bit.lan is the domain for my netbox VM. Yes, i can ping it through ping (ICMP). The blurred out ping above "####" is the domain for my proxmox instance. Here e.g. i can call it just proxmox.bit.lan.

Yes, it is pingable also.