Giter VIP home page Giter VIP logo

Comments (3)

cimnine avatar cimnine commented on May 28, 2024

Please provide some more information:

  • The output of git rev-parse HEAD
  • The command you launched to start the project
  • The output of docker-compose logs netbox

from netbox-docker.

3fhtVrY1VzdKYCrJzGtgY71Nt avatar 3fhtVrY1VzdKYCrJzGtgY71Nt commented on May 28, 2024

Hello

git rev-parse HEAD
3190ff85842e30067229adae09ecc750dc107324

The command I launched to start the project (?)
docker-compose up -d

logs :

/netbox-docker$ docker-compose logs netbox
Attaching to netboxdocker_netbox_1
netbox_1    | Operations to perform:
netbox_1    |   Apply all migrations: admin, auth, circuits, contenttypes, dcim, extras, ipam, secrets, sessions, tenancy, users, virtualization
netbox_1    | Running migrations:
netbox_1    |   Applying contenttypes.0001_initial... OK
netbox_1    |   Applying auth.0001_initial... OK
netbox_1    |   Applying admin.0001_initial... OK
netbox_1    |   Applying admin.0002_logentry_remove_auto_add... OK
netbox_1    |   Applying contenttypes.0002_remove_content_type_name... OK
netbox_1    |   Applying auth.0002_alter_permission_name_max_length... OK
netbox_1    |   Applying auth.0003_alter_user_email_max_length... OK
netbox_1    |   Applying auth.0004_alter_user_username_opts... OK
netbox_1    |   Applying auth.0005_alter_user_last_login_null... OK
netbox_1    |   Applying auth.0006_require_contenttypes_0002... OK
netbox_1    |   Applying auth.0007_alter_validators_add_error_messages... OK
netbox_1    |   Applying auth.0008_alter_user_username_max_length... OK
netbox_1    |   Applying tenancy.0001_initial... OK
netbox_1    |   Applying dcim.0001_initial... OK
netbox_1    |   Applying ipam.0001_initial... OK
netbox_1    |   Applying dcim.0002_auto_20160622_1821... OK
netbox_1    |   Applying dcim.0003_auto_20160628_1721... OK
netbox_1    |   Applying dcim.0004_auto_20160701_2049... OK
netbox_1    |   Applying dcim.0005_auto_20160706_1722... OK
netbox_1    |   Applying dcim.0006_add_device_primary_ip4_ip6... OK
netbox_1    |   Applying dcim.0007_device_copy_primary_ip... OK
netbox_1    |   Applying dcim.0008_device_remove_primary_ip... OK
netbox_1    |   Applying dcim.0009_site_32bit_asn_support... OK
netbox_1    |   Applying dcim.0010_devicebay_installed_device_set_null... OK
netbox_1    |   Applying dcim.0011_devicetype_part_number... OK
netbox_1    |   Applying dcim.0012_site_rack_device_add_tenant... OK
netbox_1    |   Applying dcim.0013_add_interface_form_factors... OK
netbox_1    |   Applying dcim.0014_rack_add_type_width... OK
netbox_1    |   Applying dcim.0015_rack_add_u_height_validator... OK
netbox_1    |   Applying dcim.0016_module_add_manufacturer... OK
netbox_1    |   Applying dcim.0017_rack_add_role... OK
netbox_1    |   Applying dcim.0018_device_add_asset_tag... OK
netbox_1    |   Applying dcim.0019_new_iface_form_factors... OK
netbox_1    |   Applying dcim.0020_rack_desc_units... OK
netbox_1    |   Applying dcim.0021_add_ff_flexstack... OK
netbox_1    |   Applying dcim.0022_color_names_to_rgb... OK
netbox_1    |   Applying circuits.0001_initial... OK
netbox_1    |   Applying circuits.0002_auto_20160622_1821... OK
netbox_1    |   Applying circuits.0003_provider_32bit_asn_support... OK
netbox_1    |   Applying circuits.0004_circuit_add_tenant... OK
netbox_1    |   Applying circuits.0005_circuit_add_upstream_speed... OK
netbox_1    |   Applying circuits.0006_terminations... OK
netbox_1    |   Applying circuits.0007_circuit_add_description... OK
netbox_1    |   Applying circuits.0008_circuittermination_interface_protect_on_delete... OK
netbox_1    |   Applying circuits.0009_unicode_literals... OK
netbox_1    |   Applying tenancy.0002_tenant_group_optional... OK
netbox_1    |   Applying tenancy.0003_unicode_literals... OK
netbox_1    |   Applying ipam.0002_vrf_add_enforce_unique... OK
netbox_1    |   Applying ipam.0003_ipam_add_vlangroups... OK
netbox_1    |   Applying ipam.0004_ipam_vlangroup_uniqueness... OK
netbox_1    |   Applying ipam.0005_auto_20160725_1842... OK
netbox_1    |   Applying ipam.0006_vrf_vlan_add_tenant... OK
netbox_1    |   Applying ipam.0007_prefix_ipaddress_add_tenant... OK
netbox_1    |   Applying ipam.0008_prefix_change_order... OK
netbox_1    |   Applying ipam.0009_ipaddress_add_status... OK
netbox_1    |   Applying ipam.0010_ipaddress_help_texts... OK
netbox_1    |   Applying ipam.0011_rir_add_is_private... OK
netbox_1    |   Applying ipam.0012_services... OK
netbox_1    |   Applying ipam.0013_prefix_add_is_pool... OK
netbox_1    |   Applying ipam.0014_ipaddress_status_add_deprecated... OK
netbox_1    |   Applying ipam.0015_global_vlans... OK
netbox_1    |   Applying ipam.0016_unicode_literals... OK
netbox_1    |   Applying ipam.0017_ipaddress_roles... OK
netbox_1    |   Applying ipam.0018_remove_service_uniqueness_constraint... OK
netbox_1    |   Applying dcim.0023_devicetype_comments... OK
netbox_1    |   Applying dcim.0024_site_add_contact_fields... OK
netbox_1    |   Applying dcim.0025_devicetype_add_interface_ordering... OK
netbox_1    |   Applying dcim.0026_add_rack_reservations... OK
netbox_1    |   Applying dcim.0027_device_add_site... OK
netbox_1    |   Applying dcim.0028_device_copy_rack_to_site... OK
netbox_1    |   Applying dcim.0029_allow_rackless_devices... OK
netbox_1    |   Applying dcim.0030_interface_add_lag... OK
netbox_1    |   Applying dcim.0031_regions... OK
netbox_1    |   Applying dcim.0032_device_increase_name_length... OK
netbox_1    |   Applying dcim.0033_rackreservation_rack_editable... OK
netbox_1    |   Applying dcim.0034_rename_module_to_inventoryitem... OK
netbox_1    |   Applying dcim.0035_device_expand_status_choices... OK
netbox_1    |   Applying dcim.0036_add_ff_juniper_vcp... OK
netbox_1    |   Applying dcim.0037_unicode_literals... OK
netbox_1    |   Applying dcim.0038_wireless_interfaces... OK
netbox_1    |   Applying dcim.0039_interface_add_enabled_mtu... OK
netbox_1    |   Applying dcim.0040_inventoryitem_add_asset_tag_description... OK
netbox_1    |   Applying dcim.0041_napalm_integration... OK
netbox_1    |   Applying dcim.0042_interface_ff_10ge_cx4... OK
netbox_1    |   Applying dcim.0043_device_component_name_lengths... OK
netbox_1    |   Applying virtualization.0001_virtualization... OK
netbox_1    |   Applying dcim.0044_virtualization... OK
netbox_1    |   Applying dcim.0045_devicerole_vm_role... OK
netbox_1    |   Applying dcim.0046_rack_lengthen_facility_id... OK
netbox_1    |   Applying dcim.0047_more_100ge_form_factors... OK
netbox_1    |   Applying dcim.0048_rack_serial... OK
netbox_1    |   Applying dcim.0049_rackreservation_change_user... OK
netbox_1    |   Applying extras.0001_initial... OK
netbox_1    |   Applying extras.0002_custom_fields... OK
netbox_1    |   Applying extras.0003_exporttemplate_add_description... OK
netbox_1    |   Applying extras.0004_topologymap_change_comma_to_semicolon... OK
netbox_1    |   Applying extras.0005_useraction_add_bulk_create... OK
netbox_1    |   Applying extras.0006_add_imageattachments... OK
netbox_1    |   Applying extras.0007_unicode_literals... OK
netbox_1    |   Applying extras.0008_reports... OK
netbox_1    |   Applying ipam.0019_virtualization... OK
netbox_1    |   Applying ipam.0020_ipaddress_add_role_carp... OK
netbox_1    |   Applying secrets.0001_initial... OK
netbox_1    |   Applying secrets.0002_userkey_add_session_key... OK
netbox_1    |   Applying secrets.0003_unicode_literals... OK
netbox_1    |   Applying sessions.0001_initial... OK
netbox_1    |   Applying users.0001_api_tokens... OK
netbox_1    |   Applying users.0002_unicode_literals... OK
netbox_1    |   Applying virtualization.0002_virtualmachine_add_status... OK
netbox_1    |   Applying virtualization.0003_cluster_add_site... OK
netbox_1    |   Applying virtualization.0004_virtualmachine_add_role... OK
netbox_1    | 💡 Username: admin, E-Mail: [email protected], Password: XXXX, Token: XXXXX
netbox_1    |
netbox_1    | 0 static files copied to '/opt/netbox/netbox/static', 264 unmodified.
netbox_1    | ✅ Initialisation is done.
netbox_1    | [2017-12-13 15:20:07 +0000] [1] [DEBUG] Current configuration:
netbox_1    |   config: /opt/netbox/gunicorn_config.py
netbox_1    |   bind: ['0.0.0.0:8001']
netbox_1    |   backlog: 2048
netbox_1    |   workers: 3
netbox_1    |   worker_class: sync
netbox_1    |   threads: 1
netbox_1    |   worker_connections: 1000
netbox_1    |   max_requests: 0
netbox_1    |   max_requests_jitter: 0
netbox_1    |   timeout: 30
netbox_1    |   graceful_timeout: 30
netbox_1    |   keepalive: 2
netbox_1    |   limit_request_line: 4094
netbox_1    |   limit_request_fields: 100
netbox_1    |   limit_request_field_size: 8190
netbox_1    |   reload: False
netbox_1    |   reload_engine: auto
netbox_1    |   spew: False
netbox_1    |   check_config: False
netbox_1    |   preload_app: False
netbox_1    |   sendfile: None
netbox_1    |   chdir: /opt/netbox/netbox
netbox_1    |   daemon: False
netbox_1    |   raw_env: []
netbox_1    |   pidfile: None
netbox_1    |   worker_tmp_dir: None
netbox_1    |   user: 0
netbox_1    |   group: 0
netbox_1    |   umask: 0
netbox_1    |   initgroups: False
netbox_1    |   tmp_upload_dir: None
netbox_1    |   secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
netbox_1    |   forwarded_allow_ips: ['127.0.0.1']
netbox_1    |   accesslog: -
netbox_1    |   access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
netbox_1    |   errorlog: -
netbox_1    |   loglevel: debug
netbox_1    |   capture_output: False
netbox_1    |   logger_class: gunicorn.glogging.Logger
netbox_1    |   logconfig: None
netbox_1    |   syslog_addr: udp://localhost:514
netbox_1    |   syslog: False
netbox_1    |   syslog_prefix: None
netbox_1    |   syslog_facility: user
netbox_1    |   enable_stdio_inheritance: False
netbox_1    |   statsd_host: None
netbox_1    |   statsd_prefix:
netbox_1    |   proc_name: None
netbox_1    |   default_proc_name: netbox.wsgi
netbox_1    |   pythonpath: /opt/netbox/netbox
netbox_1    |   paste: None
netbox_1    |   on_starting: <function OnStarting.on_starting at 0x7f1a06ed0d08>
netbox_1    |   on_reload: <function OnReload.on_reload at 0x7f1a06ed0ea0>
netbox_1    |   when_ready: <function WhenReady.when_ready at 0x7f1a06c3c0d0>
netbox_1    |   pre_fork: <function Prefork.pre_fork at 0x7f1a06c3c268>
netbox_1    |   post_fork: <function Postfork.post_fork at 0x7f1a06c3c400>
netbox_1    |   post_worker_init: <function PostWorkerInit.post_worker_init at 0x7f1a06c3c598>
netbox_1    |   worker_int: <function WorkerInt.worker_int at 0x7f1a06c3c730>
netbox_1    |   worker_abort: <function WorkerAbort.worker_abort at 0x7f1a06c3c8c8>
netbox_1    |   pre_exec: <function PreExec.pre_exec at 0x7f1a06c3ca60>
netbox_1    |   pre_request: <function PreRequest.pre_request at 0x7f1a06c3cbf8>
netbox_1    |   post_request: <function PostRequest.post_request at 0x7f1a06c3cd08>
netbox_1    |   child_exit: <function ChildExit.child_exit at 0x7f1a06c3cea0>
netbox_1    |   worker_exit: <function WorkerExit.worker_exit at 0x7f1a06c400d0>
netbox_1    |   nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7f1a06c40268>
netbox_1    |   on_exit: <function OnExit.on_exit at 0x7f1a06c40400>
netbox_1    |   proxy_protocol: False
netbox_1    |   proxy_allow_ips: ['127.0.0.1']
netbox_1    |   keyfile: None
netbox_1    |   certfile: None
netbox_1    |   ssl_version: 2
netbox_1    |   cert_reqs: 0
netbox_1    |   ca_certs: None
netbox_1    |   suppress_ragged_eofs: True
netbox_1    |   do_handshake_on_connect: False
netbox_1    |   ciphers: TLSv1
netbox_1    |   raw_paste_global_conf: []
netbox_1    | [2017-12-13 15:20:07 +0000] [1] [INFO] Starting gunicorn 19.7.1
netbox_1    | [2017-12-13 15:20:07 +0000] [1] [DEBUG] Arbiter booted
netbox_1    | [2017-12-13 15:20:07 +0000] [1] [INFO] Listening at: http://0.0.0.0:8001 (1)
netbox_1    | [2017-12-13 15:20:07 +0000] [1] [INFO] Using worker: sync
netbox_1    | [2017-12-13 15:20:07 +0000] [95] [INFO] Booting worker with pid: 95
netbox_1    | [2017-12-13 15:20:07 +0000] [96] [INFO] Booting worker with pid: 96
netbox_1    | [2017-12-13 15:20:07 +0000] [97] [INFO] Booting worker with pid: 97
netbox_1    | [2017-12-13 15:20:08 +0000] [1] [DEBUG] 3 workers
netbox_1    | [2017-12-13 15:20:36 +0000] [96] [DEBUG] GET /
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:20:38 +0000] "GET / HTTP/1.0" 200 21020 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:20:52 +0000] [95] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:20:53 +0000] "GET /api/docs/ HTTP/1.0" 200 4001 "http://netbox.example.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:20:54 +0000] [95] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:20:55 +0000] "GET /api/docs/?format=openapi HTTP/1.0" 200 105675 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:18 +0000] [97] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:19 +0000] "GET /api/docs/ HTTP/1.0" 200 4001 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:20 +0000] [95] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:20 +0000] "GET /api/docs/?format=openapi HTTP/1.0" 200 105675 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:34 +0000] [96] [DEBUG] GET /login/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:34 +0000] "GET /login/?next=/api/docs/ HTTP/1.0" 200 14108 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:40 +0000] [96] [DEBUG] POST /login/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:40 +0000] "POST /login/ HTTP/1.0" 302 - "http://netbox.example.com/login/?next=/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:40 +0000] [96] [DEBUG] GET /api/docs/
netbox_1    | [2017-12-13 15:21:41 +0000] [97] [DEBUG] POST /login/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:41 +0000] "POST /login/ HTTP/1.0" 403 1007 "http://netbox.example.com/login/?next=/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:41 +0000] [96] [DEBUG] Ignoring EPIPE
netbox_1    | [2017-12-13 15:21:41 +0000] [97] [DEBUG] GET /favicon.ico
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:41 +0000] "GET /favicon.ico HTTP/1.0" 404 28147 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:41 +0000] [95] [DEBUG] GET /favicon.ico
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:42 +0000] "GET /favicon.ico HTTP/1.0" 404 28147 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:49 +0000] [95] [DEBUG] GET /
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:49 +0000] "GET / HTTP/1.0" 200 36452 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:56 +0000] [97] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:57 +0000] "GET /api/docs/ HTTP/1.0" 200 4119 "http://netbox.example.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:21:58 +0000] [97] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:21:59 +0000] "GET /api/docs/?format=openapi HTTP/1.0" 200 314480 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:22:11 +0000] [96] [DEBUG] GET /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:22:11 +0000] "GET /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 404 23 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 15:22:58 +0000] [96] [DEBUG] GET /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:22:58 +0000] "GET /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 404 30 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 15:24:07 +0000] [95] [DEBUG] GET /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:24:07 +0000] "GET /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 404 30 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 15:25:37 +0000] [96] [DEBUG] GET /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:25:37 +0000] "GET /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 404 30 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 15:28:46 +0000] [97] [DEBUG] GET /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:15:28:46 +0000] "GET /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 404 30 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 16:04:27 +0000] [95] [DEBUG] GET /ipam/prefixes/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:28 +0000] "GET /ipam/prefixes/ HTTP/1.0" 200 40213 "http://netbox.example.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:04:31 +0000] [95] [DEBUG] GET /ipam/prefixes/add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:31 +0000] "GET /ipam/prefixes/add/ HTTP/1.0" 200 33659 "http://netbox.example.com/ipam/prefixes/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:04:50 +0000] [97] [DEBUG] POST /ipam/prefixes/add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:50 +0000] "POST /ipam/prefixes/add/ HTTP/1.0" 302 - "http://netbox.example.com/ipam/prefixes/add/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:04:50 +0000] [97] [DEBUG] GET /ipam/prefixes/1/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:50 +0000] "GET /ipam/prefixes/1/ HTTP/1.0" 200 32902 "http://netbox.example.com/ipam/prefixes/add/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:04:54 +0000] [97] [DEBUG] GET /ipam/ip-addresses/add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:54 +0000] "GET /ipam/ip-addresses/add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant= HTTP/1.0" 200 35645 "http://netbox.example.com/ipam/prefixes/1/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:04:56 +0000] [96] [DEBUG] GET /ipam/ip-addresses/bulk-add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:04:56 +0000] "GET /ipam/ip-addresses/bulk-add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant= HTTP/1.0" 200 32431 "http://netbox.example.com/ipam/ip-addresses/add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant=" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:08 +0000] [95] [DEBUG] POST /ipam/ip-addresses/bulk-add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:09 +0000] "POST /ipam/ip-addresses/bulk-add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant= HTTP/1.0" 302 - "http://netbox.example.com/ipam/ip-addresses/bulk-add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant=" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:09 +0000] [95] [DEBUG] GET /ipam/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:09 +0000] "GET /ipam/ip-addresses/ HTTP/1.0" 200 87232 "http://netbox.example.com/ipam/ip-addresses/bulk-add/?address=10.36.202.0/24&vrf=&tenant_group=&tenant=" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:12 +0000] [95] [DEBUG] GET /ipam/ip-addresses/add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:12 +0000] "GET /ipam/ip-addresses/add/ HTTP/1.0" 200 35498 "http://netbox.example.com/ipam/ip-addresses/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:13 +0000] [96] [DEBUG] GET /ipam/ip-addresses/bulk-add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:13 +0000] "GET /ipam/ip-addresses/bulk-add/ HTTP/1.0" 200 32307 "http://netbox.example.com/ipam/ip-addresses/add/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:31 +0000] [97] [DEBUG] POST /ipam/ip-addresses/bulk-add/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:31 +0000] "POST /ipam/ip-addresses/bulk-add/ HTTP/1.0" 302 - "http://netbox.example.com/ipam/ip-addresses/bulk-add/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:31 +0000] [95] [DEBUG] GET /ipam/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:32 +0000] "GET /ipam/ip-addresses/ HTTP/1.0" 200 87230 "http://netbox.example.com/ipam/ip-addresses/bulk-add/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:37 +0000] [96] [DEBUG] GET /ipam/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:37 +0000] "GET /ipam/ip-addresses/?page=3 HTTP/1.0" 200 47850 "http://netbox.example.com/ipam/ip-addresses/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:52 +0000] [95] [DEBUG] GET /ipam/prefixes/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:52 +0000] "GET /ipam/prefixes/ HTTP/1.0" 200 41323 "http://netbox.example.com/ipam/ip-addresses/?page=3" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:55 +0000] [97] [DEBUG] GET /ipam/prefixes/1/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:55 +0000] "GET /ipam/prefixes/1/ HTTP/1.0" 200 32527 "http://netbox.example.com/ipam/prefixes/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:05:57 +0000] [97] [DEBUG] GET /ipam/prefixes/1/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:05:58 +0000] "GET /ipam/prefixes/1/ip-addresses/ HTTP/1.0" 200 75918 "http://netbox.example.com/ipam/prefixes/1/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:06:01 +0000] [96] [DEBUG] GET /ipam/prefixes/1/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:06:02 +0000] "GET /ipam/prefixes/1/ip-addresses/?page=3 HTTP/1.0" 200 40655 "http://netbox.example.com/ipam/prefixes/1/ip-addresses/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:06:33 +0000] [97] [DEBUG] POST /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:06:34 +0000] "POST /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 201 194 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 16:06:43 +0000] [95] [DEBUG] GET /ipam/prefixes/1/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:06:43 +0000] "GET /ipam/prefixes/1/ip-addresses/?page=3 HTTP/1.0" 200 41503 "http://netbox.example.com/ipam/prefixes/1/ip-addresses/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:07:36 +0000] [97] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:07:36 +0000] "GET /api/docs/ HTTP/1.0" 200 4119 "http://netbox.example.com/ipam/prefixes/1/ip-addresses/?page=3" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:07:37 +0000] [97] [DEBUG] GET /api/docs/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:07:38 +0000] "GET /api/docs/?format=openapi HTTP/1.0" 200 314480 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:08:16 +0000] [97] [DEBUG] POST /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:08:16 +0000] "POST /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 500 1765 "http://netbox.example.com/api/docs/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 16:14:49 +0000] [95] [DEBUG] POST /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:14:49 +0000] "POST /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 201 194 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 16:15:59 +0000] [97] [DEBUG] GET /ipam/prefixes/1/ip-addresses/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:16:15:59 +0000] "GET /ipam/prefixes/1/ip-addresses/?page=3 HTTP/1.0" 200 42352 "http://netbox.example.com/ipam/prefixes/1/ip-addresses/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0"
netbox_1    | [2017-12-13 17:15:50 +0000] [97] [DEBUG] POST /api/ipam/prefixes/1/available-ips/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:17:15:50 +0000] "POST /api/ipam/prefixes/1/available-ips/ HTTP/1.0" 201 194 "-" "curl/7.47.0"
netbox_1    | [2017-12-13 17:16:36 +0000] [96] [DEBUG] POST /api/dcim/sites/
netbox_1    | 172.20.0.4 - - [13/Dec/2017:17:16:36 +0000] "POST /api/dcim/sites/ HTTP/1.0" 400 112 "-" "curl/7.47.0"

from netbox-docker.

cimnine avatar cimnine commented on May 28, 2024

The log shows, that the request indeed arrive at Netbox.

When you run curl -v ..., you will see that it sends the data as application/x-www-form-urlencoded, whereas you would like to send the data as application/json.

This behaviour is also documented in the cURL man page:

-d, --data <data>

(HTTP) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F, --form.

I guess what you have to do is adding -H "Content-Type: application/json" as argument to cURL.

Please ask further questions regarding this on the Netbox mailing list.


On a personal note: I would recommend you to check out httpie. The same request to create a new site would simply be

$ http POST netboxdocker.docker/api/dcim/sites/ Authorization:"Token 0123456789abcdef0123456789abcdef01234567" name=Site1 slug=site1

It creates the json automatically from the arguments and it sends the correct Content-Type and Accept headers.

from netbox-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.