Unable to upload images Error 500 #698
-
Hello all, I’m using NetBox-docker, and I’m having issues with image uploads to sites/racks/etc. After upgrading to v2.11.12 from v2.9.9, I always get “upstream connect error or disconnect/reset before headers. reset reason: connection termination” or the very descriptive “Error 500.“. We are still able to see/delete previously uploaded images. Has anyone encountered this before? I couldn’t find anything online outside of the ones specifying permission issues, and I’ve confirmed that permissions are open for the media directory, and NetBox uses root user so I don’t believe the issue is related to that. On a separate but likely related note, I noticed that our implementation has the media volume mounted to /etc/netbox/media instead of the usual /opt/netbox/netbox/media, and trying to move its mountpoint to /opt/netbox/netbox/media breaks the previously uploaded images, and we are still unable to upload images. Where is the media directory path specified? Is it in the NetBox DB somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The media folder is set her: https://github.com/netbox-community/netbox-docker/blob/release/env/netbox.env#L19 Check the logs of the netbox container, you should be able to find help in the wiki. https://github.com/netbox-community/netbox-docker/wiki/Troubleshooting |
Beta Was this translation helpful? Give feedback.
-
Issue was caused by what was described here #506 and here #509. Tl;dr, issue is caused by nginx request being too big and attempts to dump it into /opt/unit/tmp/ temporary directory, but "unit" user being unable to modify contents of that directory, as kubernetes initializes the container and, consequently, that directory, using root:root, and so this causes a permission issue. This issue was fixed in a more recent version of netbox-docker, but since we are running an earlier version of it for now, I have fixed it by having the pod run a small script modifying the /opt/unit/tmp/ owners to unit:root at pod startup. |
Beta Was this translation helpful? Give feedback.
Issue was caused by what was described here #506 and here #509. Tl;dr, issue is caused by nginx request being too big and attempts to dump it into /opt/unit/tmp/ temporary directory, but "unit" user being unable to modify contents of that directory, as kubernetes initializes the container and, consequently, that directory, using root:root, and so this causes a permission issue. This issue was fixed in a more recent version of netbox-docker, but since we are running an earlier version of it for now, I have fixed it by having the pod run a small script modifying the /opt/unit/tmp/ owners to unit:root at pod startup.