Comments (7)
I do understand you can't support all sorts of configurations and I'm thankful for pointers. I'm ready to follow all your steps to debug but I spotted the problem:
my selector was simply * as stated in the very first sentence of this thread while your step 5 said to use .* and now it works :-)
from netbox-docker.
This is weird, as Graphviz is clearly installed:
https://github.com/ninech/netbox-docker/blob/81f8c7386d430358aa0f140f3d3e6a188cf9a47e/Dockerfile#L8
from netbox-docker.
It might be me messing things up, I'm quite new to Docker. Maybe this could be the cause? I wanted to map data into specific folders for backup purposes instead of using the docker volumes:
docker-compose.yml
version: '3'
services:
netbox: &netbox
build:
context: .
args:
- BRANCH=${VERSION-master}
image: ninech/netbox:${VERSION-latest}
depends_on:
- postgres
- redis
- netbox-worker
env_file: env/netbox.env
volumes:
- ./startup_scripts:/opt/netbox/startup_scripts:ro
- ./initializers:/opt/netbox/initializers:ro
- ./configuration:/etc/netbox/config:ro
- /mnt/netbox/netbox-nginx-config:/etc/netbox-nginx/
- /mnt/netbox/netbox-static-files:/opt/netbox/netbox/static
- /mnt/netbox/netbox-media-files:/opt/netbox/netbox/media
- /mnt/netbox/netbox-report-files:/etc/netbox/reports:ro
netbox-worker:
<<: *netbox
depends_on:
- redis
entrypoint:
- python3
- /opt/netbox/netbox/manage.py
command:
- rqworker
nginx:
command: nginx -c /etc/netbox-nginx/nginx.conf
image: nginx:1.15-alpine
depends_on:
- netbox
ports:
- 8777:8080
volumes:
- /mnt/netbox/netbox-static-files:/opt/netbox/netbox/static:ro
- /mnt/netbox/netbox-nginx-config:/etc/netbox-nginx/:ro
postgres:
image: postgres:10.4-alpine
env_file: env/postgres.env
volumes:
- /mnt/netbox/netbox-postgres-data:/var/lib/postgresql/data
redis:
image: redis:4-alpine
command:
- sh
- -c # this is to evaluate the $REDIS_PASSWORD from the env
- redis-server --appendonly yes --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose
env_file: env/redis.env
volumes:
- /mnt/netbox/netbox-redis-data:/data
Look at the volumes section. This had led to me having to manually copy the nginx.conf file into: /mnt/netbox/netbox-nginx-config
Maybe that is unnecessary? Would it be enough to map the postgres data into a folder for backup and reverse the other changes I made to volumes?
postgres:
image: postgres:10.4-alpine
env_file: env/postgres.env
volumes:
- /mnt/netbox/netbox-postgres-data:/var/lib/postgresql/data
from netbox-docker.
Would it be enough to map the postgres data into a folder for backup and reverse the other changes I made to volumes?
Yes. All persistent data is stored in PostgreSQL.
If you use webhook, you may want to backup the redis data directory, if it's critical that no webhook is lost in a crash. (At least those webhooks that were already sent to Redis by Netbox, for all others there's no guarantee anyway.)
But I would suggest to use a cronjob/systemd timer which periodically performs PostgreSQL backups like this:
docker-compose exec postgres sh -c 'pg_dump -cU $POSTGRES_USER $POSTGRES_DB' | gzip > db_dump.sql.gz
netbox-nginx-config
is specific to the "netbox-docker" version. (That's because we ship the Nginx config with the netbox-docker container in order to ship just one container.)
netbox-static-files
files are specific to each Netbox version and are shared with the Nginx container, because the Nginx container is serving static files.
from netbox-docker.
Can you revert/stash your changes to see if this was the issue? (Or clone the project into a separate directory.)
from netbox-docker.
hm, I tried reversing my changes except for the volume where postgres data is stored. An sdiff between my docker-compose.yml and the original from this site which I renamed docker-compose.yml.sample clearly shows no other changes:
my modified file is on the left. did a docker-compose down followed by docker-compose up -d and still getting this error when visualizing a topology map:
There was an error generating the requested graph. Ensure that the GraphViz executables have been installed correctly.
Any other ideas what could cause this? The only other files I touched are the env/. ones
Thanks for the pointers with the postgres backups. To give more insight into why I am doing this, I generyll try and separate data from servers so basically in my example: /mnt/netbox would be an NFS share which means I have data backed up separately from my docker host server. I can restore or setup a new docker host, mount my shares and start up my containers again without having to worry about the data.
from netbox-docker.
I just tested it with the latest docker image on my mac. It works fine.
Do you run this on a Linux machine and do you have SELinux or AppArmor turned on? Can you please check the security log of the respecting technology?
I hope you can understand that it's not possible to provide support for any setup that is not according to the default setup.
Therefore:
- please revert/stash all changes (or clone the project into a separate directory)
- please cleanup any old docker volumes:
docker-compose down -v --remove-orphans
(this will remove any data stored in the DB. make a backup first if you need this data.) - run
docker-compose up
and wait for the application to be available - create a site 'a', device role 'a', manufacturer 'a', device type 'a' and a device 'a'
- create a topo map with the following selector
.*
- try to render the topo map
If it still fails, disable SELinux/AppArmor and try again.
Please report back if it still fails.
from netbox-docker.
Related Issues (20)
- root password of docker container
- Cannot delete a user account with Bookmarks HOT 2
- Add SSO variables to configuration file, so they can be added to the environment files
- Crash with SOCIAL_AUTH_SAML - signal 11 HOT 3
- using environment block in example file fails HOT 2
- Postgres-Error on first boot HOT 1
- superuser_password secret fails with permission denied
- dependency failed to start: container netbox-docker-netbox-1 exited (127) HOT 1
- Server Error 'NoneType' object has no attribute 'get_absolute_url'
- Social Auth not following proxy settings in config file
- docker compose up fails on "unexpected EOF on client connection" during "./manage.py migrate --no-input"
- Restart Policy in the YAML? HOT 1
- Copying of Admin->Authentication->Permissions HOT 1
- Support for JSON and YAML configuration files HOT 5
- psycopg connection issue HOT 2
- Netbox Restarts in Nomad
- docker compose up fails on "unexpected EOF on client connection" during "./manage.py migrate --no-input" HOT 1
- Upgrading from Release to Release Via Docker
- Add Environment Variable to Mange ALLOW_TOKEN_RETRIEVAL HOT 1
- Nginx Unit user UID has changed to 999, breaks git data source sync HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netbox-docker.