GithubHelp home page GithubHelp logo

Comments (18)

jine avatar jine commented on July 26, 2024

Same issue I'm having currently, investigating...

from netbox-proxbox.

eliassteiner avatar eliassteiner commented on July 26, 2024

same issue here
has someone a workaround?

from netbox-proxbox.

pfr-l avatar pfr-l commented on July 26, 2024

same problem

from netbox-proxbox.

sugoy-desu avatar sugoy-desu commented on July 26, 2024

same problem, does anyone have a solution?

from netbox-proxbox.

JouanDeag avatar JouanDeag commented on July 26, 2024

Yup, also same problem here.

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

Same problem here :
object has no attribute "slug"

PVE 7.2-7
Python version: 3.9.7
NetBox version: 3.2.6
netbox-proxbox version 0.0.5-beta1

from netbox-proxbox.

vfosterm avatar vfosterm commented on July 26, 2024

would be nice to update the ReadMe of the project to warn people that it is currently not functioning. Would've saved me some hours today at least :)

from netbox-proxbox.

beerygaz avatar beerygaz commented on July 26, 2024

I'm new to netbox too and have been struggling with the same issues. Add my hours to @vfosterm's hours

from netbox-proxbox.

Chankster avatar Chankster commented on July 26, 2024

Can anyone provide a full traceback?

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

If you tell me how to do it, I'll gladly provide it.

from netbox-proxbox.

Chankster avatar Chankster commented on July 26, 2024

It depends on your install. Check your netbox service logs, check your system syslog, if using docker containers check the container log, enable debug and capture.

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

Classic full install Netbox 3.4.3 on almalinux 8 + Netbox proxbox plugin from git. no docker.

Here is the Traceback:

Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 103, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/contrib/auth/mixins.py", line 109, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 142, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/views.py", line 46, in get
    update_all_result = proxbox_api.update.all(remove_unused = True)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/proxbox_api/update.py", line 406, in all
    cluster = create.virtualization.cluster()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/proxbox_api/create/virtualization.py", line 68, in cluster
    type = cluster_type().slug
  File "/opt/netbox/venv/lib64/python3.9/site-packages/pynetbox/core/response.py", line 298, in __getattr__
    raise AttributeError('object has no attribute "{}"'.format(k))
AttributeError: object has no attribute "slug"
2023-01-23 17:43:58,979 django.request WARNING: Not Found: /favicon.ico

from netbox-proxbox.

Chankster avatar Chankster commented on July 26, 2024

It looks like this occurs whenever the netbox configuration within the netbox_proxbox section of PLUGINS_CONFIG is incorrect. The default has port 80 specified which is most likely getting redirected to 443 by nginx/apache.

In the PLUGINS_CONFIG try setting the netbox port to 8001 (the gunicorn default). Then ensure that whatever domain specified is added to ALLOWED_HOSTS

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

Nope.

It generates a connection refused error:

<class 'requests.exceptions.ConnectionError'>

HTTPConnectionPool(host='netbox.irisit.local', port=8001): Max retries exceeded with url: /api/virtualization/cluster-types/?name=Proxmox&slug=proxmox&limit=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f22d19cc490>: Failed to establish a new connection: [Errno 111] Connection refused'))

Python version: 3.9.13
NetBox version: 3.4.3

Traceback (most recent call last):
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 103, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/contrib/auth/mixins.py", line 109, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 142, in dispatch
return handler(request, *args, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/views.py", line 46, in get
update_all_result = proxbox_api.update.all(remove_unused = True)
File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/proxbox_api/update.py", line 406, in all
cluster = create.virtualization.cluster()
File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/proxbox_api/create/virtualization.py", line 67, in cluster
type = cluster_type().slug
File "/opt/netbox/venv/lib64/python3.9/site-packages/netbox_proxbox/proxbox_api/create/virtualization.py", line 24, in cluster_type
cluster_type_proxbox = nb.virtualization.cluster_types.get(
File "/opt/netbox/venv/lib64/python3.9/site-packages/pynetbox/core/endpoint.py", line 148, in get
ret = next(resp, None)
File "/opt/netbox/venv/lib64/python3.9/site-packages/pynetbox/core/response.py", line 117, in next
next(self.response), self.endpoint.api, self.endpoint
File "/opt/netbox/venv/lib64/python3.9/site-packages/pynetbox/core/query.py", line 317, in get
req = self._make_call(add_params=add_params)
File "/opt/netbox/venv/lib64/python3.9/site-packages/pynetbox/core/query.py", line 267, in _make_call
req = getattr(self.http_session, verb)(
File "/opt/netbox/venv/lib64/python3.9/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/opt/netbox/venv/lib64/python3.9/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='netbox.irisit.local', port=8001): Max retries exceeded with url: /api/virtualization/cluster-types/?name=Proxmox&slug=proxmox&limit=0 (Caused by NewConnectionErr('<urllib3.connection.HTTPConnection object at 0x7f22d19cc490>: Failed to establish a new connection: [Errno 111] Connection refused'))

from netbox-proxbox.

Chankster avatar Chankster commented on July 26, 2024

Likely you have your gunicorn.py bound to localhost instead of netbox.irisit.local

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

True. I followed the official guide to set it up.

So for those who would be looking for the answers to this problem:
in
/opt/netbox/netbox/netbox/configuration.py

I had to modify PLUGINS_CONFIG
from the netbox section:

'http_port': 80,
to
'http_port': 8001,

in
/opt/netbox/gunicorn.py
bind = '127.0.0.1:8001'
to
bind = 'your.beautiful.fqdn:8001'

in
from /etc/nginx/nginx.conf
proxy_pass http://127.0.0.1:8001;
to
proxy_pass http://your/beautiful.fqdn:8001;

then restart netbox, netbox-rq and nginx.

Thanks a lot to Chankster for debugging that.

from netbox-proxbox.

Chankster avatar Chankster commented on July 26, 2024

If you change the bind from localhost just be sure you have the appropriate firewall rules or network access restrictions in place as you're exposing gunicorn beyond the local system.

I would recommend changing the netbox host in PLUGINS_CONFIG to localhost and ensuring localhost is in ALLOWED_HOSTS.

from netbox-proxbox.

Kris33 avatar Kris33 commented on July 26, 2024

OK Thanks.

from netbox-proxbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.