netbox-qrcode icon indicating copy to clipboard operation
netbox-qrcode copied to clipboard

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

Open HomerJaySimpson13 opened this issue 1 year ago • 28 comments

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.

HomerJaySimpson13 avatar Jun 11 '24 16:06 HomerJaySimpson13

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

cruse1977 avatar Jun 11 '24 16:06 cruse1977

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.

HomerJaySimpson13 avatar Jun 11 '24 16:06 HomerJaySimpson13

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

rcalpha avatar Jun 12 '24 04:06 rcalpha

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)

cruse1977 avatar Jun 12 '24 10:06 cruse1977

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.

HomerJaySimpson13 avatar Jun 12 '24 14:06 HomerJaySimpson13

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)

cruse1977 avatar Jun 12 '24 15:06 cruse1977

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.

HomerJaySimpson13 avatar Jun 12 '24 15:06 HomerJaySimpson13

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 ?

cruse1977 avatar Jun 12 '24 15:06 cruse1977

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)"

HomerJaySimpson13 avatar Jun 12 '24 15:06 HomerJaySimpson13

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

jeffgdotorg avatar Jun 12 '24 20:06 jeffgdotorg

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.

cruse1977 avatar Jun 12 '24 20:06 cruse1977

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.

HomerJaySimpson13 avatar Jun 12 '24 20:06 HomerJaySimpson13

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

cruse1977 avatar Jun 12 '24 20:06 cruse1977

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.

HomerJaySimpson13 avatar Jun 13 '24 19:06 HomerJaySimpson13

@HomerJaySimpson13 are you also the Redditor behind this thread?

jeffgdotorg avatar Jun 14 '24 17:06 jeffgdotorg

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 avatar Jun 17 '24 14:06 HomerJaySimpson13

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.

HomerJaySimpson13 avatar Jun 18 '24 12:06 HomerJaySimpson13

  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

supertasksupertask avatar Jun 18 '24 14:06 supertasksupertask

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 ?

cruse1977 avatar Jun 18 '24 17:06 cruse1977

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 avatar Jun 18 '24 17:06 rcalpha

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

rcalpha avatar Jun 20 '24 23:06 rcalpha

Thanks for doing this and it fits what I think is happening with rocky. Rocky's python version is 3.9 which is unsupported netbox 4. I have a feeling the non os distro python being installed on these rocky instances is causing the problem. It has to be that or a minimal installation or similar.

On Fri, 21 Jun 2024, 00:52 Ruben Cheng, @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/netbox-community/netbox-qrcode/issues/75#issuecomment-2181741166, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKJY366RI75TNUFISGGGOLZINTLXAVCNFSM6AAAAABJEVOTMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBRG42DCMJWGY . You are receiving this because you were assigned.Message ID: @.***>

cruse1977 avatar Jun 21 '24 00:06 cruse1977

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.

brourk avatar Jun 28 '24 19:06 brourk

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

cruse1977 avatar Jun 28 '24 22:06 cruse1977

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

Thanks everyone for helping out!

HomerJaySimpson13 avatar Jul 01 '24 12:07 HomerJaySimpson13

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

harryajc avatar Aug 19 '24 11:08 harryajc

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)

MisterProblems avatar Aug 29 '24 08:08 MisterProblems

may be we just need to include setuptools to install_requires

k01ek avatar Sep 05 '24 06:09 k01ek