robertcsapo / ciscodnacnetbox

Cisco DNA Center Integration with NetBox
Other
34 stars 16 forks source link

Adding DNaCenter to Netbox Fails with the Following Issue #18

Closed mwalton42 closed 10 months ago

mwalton42 commented 1 year ago

After filling out the info on the plugin configuration page I am getting the following error. Netbox itself is running fine but unable to configure our DNAC instance.

Server Error A database programming error was detected while processing this request. Common causes include the following:

Database migrations missing - When upgrading to a new NetBox release, the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing python3 manage.py migrate from the command line.

Unsupported PostgreSQL version - Ensure that PostgreSQL version 10 or later is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query for SELECT VERSION().

The complete exception is provided below:

<class 'django.db.utils.ProgrammingError'>

column "created" of relation "ciscodnacnetbox_settings" does not exist LINE 1: INSERT INTO "ciscodnacnetbox_settings" ("created", "last_upd... ^

Python version: 3.10.12 NetBox version: 3.2.1 If further assistance is required, please post to the NetBox discussion forum on GitHub.

robertcsapo commented 12 months ago

Did you run the database migration?

(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py migrate

https://docs.netbox.dev/en/stable/plugins/

mwalton42 commented 6 months ago

Hello Robert,

I did do that. I also ran python3 manage.py makemigratitions as the manage.py migrate suggested but ended with this error still.

(venv) @.:/opt/netbox/netbox# python3 manage.py migrate Operations to perform: Apply all migrations: account, admin, auth, circuits, ciscodnacnetbox, contenttypes, core, dcim, django_rq, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization, vpn, wireless Running migrations: No migrations to apply. Your models in app(s): 'ciscodnacnetbox' have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. (venv) @.:/opt/netbox/netbox# python3 manage.py makemigrations CommandError: This command is available for development purposes only. It will NOT resolve any issues with missing or unapplied migrations. For assistance, please post to the NetBox discussion forum on GitHub: https://github.com/netbox-community/netbox/discussions [https://opengraph.githubassets.com/90c1e74784ac451ccf7b5ec0e8232b3e18d52f2db313b9282819fd62ccc602da/netbox-community/netbox]https://github.com/netbox-community/netbox/discussions netbox-community netbox · Discussionshttps://github.com/netbox-community/netbox/discussions Explore the GitHub Discussions forum for netbox-community netbox. Discuss code, ask questions & collaborate with the developer community. github.com

Still having this issue. Tried to update to latest ubuntu updates and also latest netbox 3.7.7 and latest dnac plugin. But still get the previous error with DB. its almost like the info never got put in db in first place.

Sincerely,

Michael Walton Senior Network Engineer, Global Evangelism Inc. (210) 490 1600


From: robertcsapo @.> Sent: Thursday, November 9, 2023 8:15 AM To: robertcsapo/ciscodnacnetbox @.> Cc: Michael Walton @.>; Author @.> Subject: Re: [robertcsapo/ciscodnacnetbox] Adding DNaCenter to Netbox Fails with the Following Issue (Issue #18)

Did you run the database migration?

(venv) $ cd /opt/netbox/netbox/ (venv) $ python3 manage.py migrate

https://docs.netbox.dev/en/stable/plugins/

— Reply to this email directly, view it on GitHubhttps://github.com/robertcsapo/ciscodnacnetbox/issues/18#issuecomment-1803914326, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYYPEZ6E6HRCX6UPKGJC3BTYDTQRBAVCNFSM6AAAAAA54RHWJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTHEYTIMZSGY. You are receiving this because you authored the thread.Message ID: @.***>