Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin installs will not show up on any dcim page. 4.0.2/0.0.12 #75

Open
HomerJaySimpson13 opened this issue Jun 11, 2024 · 28 comments
Open
Assignees

Comments

@HomerJaySimpson13
Copy link

i have netbox 4.0.2 running fine. i installed the qrcode plugin and it shows on the admin>system that the plug is loaded. But when i go to any page that would need a qrcode, there is none. it doesn't show anything, i ran the debug log and it shows it loading, i really have no idea where to look to even see what is wrong. Thanks for any assistance. i'm not even sure this is the place to post this question.

@cruse1977 cruse1977 self-assigned this Jun 11, 2024
@cruse1977
Copy link
Member

Hi, absolutely the right place, I'll see if I can replicate this.

@HomerJaySimpson13
Copy link
Author

out standing. please let me know if i can give you any information. it was a new install as i am just starting. its running on a rocky 9.4 distro and i was using the venv environment.

@rcalpha
Copy link

rcalpha commented Jun 12, 2024

I'm having the same issue. I installed 4.0.5 of Netbox and the latest qecode and It shows nothing. In the admin/system the plugin is loaded

@cruse1977
Copy link
Member

cruse1977 commented Jun 12, 2024

Hi, so I installed a brand new version of netbox-docker and v4.0.5. put some demo data in and enabled qr code (0.0.12) and I see this working as expected on the device page:

image

Can you provide more detail; install method; is there anything in logs, which pages, etc as I'm unable to replicate this at this point in time ?

As an random thought; can you also try running manage.py collectstatic (note environment specific)

@HomerJaySimpson13
Copy link
Author

netbox.log

i am not using the docker version, i am using the downloaded package install method. i am not sure where the qr code shows up, but i have been looking for it on the device page and rack page. not sure if it is anywhere else.

i ran the collectstatic command and got back:
0 static files copied to '/opt/netbox-4.0.5/netbox/static', 487 unmodified.

i also upgraded to 4.0.5 to see if that made a difference, and it did not. i have attached the debug log for me loading the page for a device.

@cruse1977
Copy link
Member

cruse1977 commented Jun 12, 2024

netbox.log

Thanks for doing this ; it was just a random thought.

i also upgraded to 4.0.5 to see if that made a difference, and it did not. i have attached the debug log for me loading the page for a device.

Hm that log shows a few errors but all are NetBox template based rather than QR. Is that log from a simple device (ie: 1ru single device) or a fairly complex (module bays, etc etc) ?

You should see a QR code on devices and racks (you can see the list via QRCode classes)

@HomerJaySimpson13
Copy link
Author

netbox.log
Screenshot 2024-06-12 083859

The Earlier one is from a complex device. This log is a simple cable manager so there is no ports or anything.

so i dont see anything anywhere.

@cruse1977
Copy link
Member

cruse1977 commented Jun 12, 2024

so i dont see anything anywhere.

I'm going to try this on a dedicated VM this eve to see if that makes a difference. In theory it shouldn't; Rocky 9.4 ?

@HomerJaySimpson13
Copy link
Author

The OS is :
NAME="Rocky Linux"
VERSION="9.4 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"

@jeffgdotorg
Copy link

jeffgdotorg commented Jun 12, 2024

Unable to reproduce in NetBox v4.0.5 on an Ubuntu 22.04.4 VM created from their cloud-init image.
image

@cruse1977
Copy link
Member

cruse1977 commented Jun 12, 2024

The OS is : NAME="Rocky Linux" VERSION="9.4 (Blue Onyx)" ID="rocky" ID_LIKE="rhel centos fedora" VERSION_ID="9.4" PLATFORM_ID="platform:el9" PRETTY_NAME="Rocky Linux 9.4 (Blue Onyx)"

Hi Homer, which python version are you running as 9.4 ships with 3.9 which is unsupported by NetBox 4.x; and how was this installed ? also which installation of Rocky (ie: minimal etc)

we think this is missing libraries and is potentially not a plugin issue.

@HomerJaySimpson13
Copy link
Author

HomerJaySimpson13 commented Jun 12, 2024

i am using Python 3.12.1 (main, Feb 19 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)]. i used dnf to install it. i used the Application Streams to install it.

ok. what do you recommend for the type of installation as i dont remember what i used. i can put up another box and try it again.

@cruse1977
Copy link
Member

cruse1977 commented Jun 12, 2024

Hi Homer, still can't replicate. As said we think this might be a missing library somewhere from possibly a minimal installation. My output:

(venv) [root@localhost netbox]# pip freeze | grep pillow
pillow==10.3.0
(venv) [root@localhost netbox]# pip freeze | grep qrcode
netbox-qrcode==0.0.12
qrcode==7.4.2

min libs for pillow:

(venv) [root@localhost netbox]# rpm -qa | grep libjpeg
libjpeg-turbo-2.0.90-7.el9.x86_64
(venv) [root@localhost netbox]# rpm -qa | grep zlib
zlib-1.2.11-40.el9.x86_64

unsure on pip qrcode libs.

(venv) [root@localhost netbox]# uname -a
Linux localhost.localdomain 5.14.0-427.20.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 7 14:51:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
(venv) [root@localhost netbox]# cat /etc/rocky-release
Rocky Linux release 9.4 (Blue Onyx)

image

@HomerJaySimpson13
Copy link
Author

i am currently rebuilding the server. i'll let you know if it works when i get done. on the current server i am getting the same versions of all the software execpt netbox-qrcode, i am getting version 0.0.13.

@jeffgdotorg
Copy link

@HomerJaySimpson13 are you also the Redditor behind this thread?

@HomerJaySimpson13
Copy link
Author

ok. so i twice rebuilt the server using both another rocky 9.4 install and a ubunbtu 24.0.4. it get the same results.

NetBox version | 4.0.5
Python version | 3.12.3
Django version | 5.0.6
PostgreSQL 16.3
qrcode | 0.0.13

so in the end it must be something i am doing. i just cant figure out what it is.

@HomerJaySimpson13
Copy link
Author

if i have debuging logging turned on, should i be seeing anything about qrcode? when i grep the log, i see nothing with qr in it.

@supertasksupertask
Copy link

  1. I have tried that rhel8.8 does not have a menu or picture with a QR code like rocky8.5, although the plug-in has been successfully installed.

2、The only difference is the libjpeg version, which is.
Libjpeg-turbo-1.5.3-12.el8.x86_64 instead of libjpeg-turbo-2.0.90-7.el9.x86_64, because installation of version 8.x conflicts

@cruse1977
Copy link
Member

My only comment so far is that both RHEL and Rocky are running older version of quite a few things. The base python version as an example is below the one NetBox supports.

Can I asked what installation type was used please ? ie: minimal; etc ? and also how python was installed given the OS version isn't compatible ?

@rcalpha
Copy link

rcalpha commented Jun 18, 2024

Hi...

I'm using ubuntu 20.04.6 and I have the same issue. I read above posts and I share the details of version:

NetBox version | 4.0.5
Python version | 3.12.4
Django version | 5.0.6
PostgreSQL 12.18
qrcode | 0.0.13
zlib: 1:1.2.11.dfsg-2ubuntu1.5
pillow: 10.3.0
libjpeg: 8c-2ubuntu8
libjpeg-turbo: 2.0.3-0ubuntu1.20.04.3

I'm not using docker, I'm using the git version

@rcalpha
Copy link

rcalpha commented Jun 20, 2024

I installed on a brand new ubuntu server 22.04.4 netbox, migrated the data and it's working.... There is issue with ubuntu 20.04.6 with python 3 installed by another way. ubuntu 20.04.6 doesn't have supported python3 version required by netbox

@cruse1977
Copy link
Member

cruse1977 commented Jun 21, 2024 via email

@brourk
Copy link

brourk commented Jun 28, 2024

I had this problem on AlmaLinux 8.10 after installing python 3.12 and Netbox 4.06. I think the problem may be that pkg_resources (netbox_qrcode/utilities.py) is deprecated and removed in Python 3.12. What fixed it for me was "pip install setuptools" and restart netbox.

@cruse1977
Copy link
Member

thanks @brourk ; @rcalpha @supertasksupertask @HomerJaySimpson13 - can you try this fix as above please ?

I'll look at replacing pkg_resources with importlib for a future version

@HomerJaySimpson13
Copy link
Author

HomerJaySimpson13 commented Jul 1, 2024

i just ran the pip install setuptools and it fixed it.

Thanks everyone for helping out!

@harryajc
Copy link

Was having this issue on Ubuntu 24.04, with netbox 4.0.9, "pip install setuptools" fixed the issue

@MisterProblems
Copy link

I had this problem on AlmaLinux 8.10 after installing python 3.12 and Netbox 4.06. I think the problem may be that pkg_resources (netbox_qrcode/utilities.py) is deprecated and removed in Python 3.12. What fixed it for me was "pip install setuptools" and restart netbox.

Thanks ! It works for me. (python 3.12 , netbox 4.0.9)

@k01ek
Copy link
Collaborator

k01ek commented Sep 5, 2024

may be we just need to include setuptools to install_requires

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants