Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging not working #1402

Closed
Kloppi313 opened this issue Feb 17, 2025 · 1 comment
Closed

Logging not working #1402

Kloppi313 opened this issue Feb 17, 2025 · 1 comment

Comments

@Kloppi313
Copy link

Current Behavior

Deployed a new installation (Ubuntu 2404 with docker compose v2), because of not working LDAP Authentication, I activate Logging: configuration/logging.py (deleting comment chars beginning at line LOGLEVEL = environ.get('LOGLEVEL', 'INFO'))
Restarting the containers ->

docker compose down && docker compose up -d
[+] Running 7/7
 ✔ Container netbox-netbox-worker-1        Removed                                                                                                                                       2.4s 
 ✔ Container netbox-netbox-housekeeping-1  Removed                                                                                                                                       0.1s 
 ✔ Container netbox-netbox-1               Removed                                                                                                                                       1.5s 
 ✔ Container netbox-redis-cache-1          Removed                                                                                                                                       0.2s 
 ✔ Container netbox-postgres-1             Removed                                                                                                                                       0.1s 
 ✔ Container netbox-redis-1                Removed                                                                                                                                       0.2s 
 ✔ Network netbox_default                  Removed                                                                                                                                       0.1s 
[+] Running 7/7
 ✔ Network netbox_default                  Created                                                                                                                                       0.1s 
 ✔ Container netbox-redis-cache-1          Started                                                                                                                                       0.4s 
 ✔ Container netbox-postgres-1             Started                                                                                                                                       0.5s 
 ✔ Container netbox-redis-1                Started                                                                                                                                       0.5s 
 ✘ Container netbox-netbox-1               Error                                                                                                                                        34.6s 
 ✔ Container netbox-netbox-housekeeping-1  Created                                                                                                                                       0.0s 
 ✔ Container netbox-netbox-worker-1        Created                                                                                                                                       0.1s

Expected Behavior

Working netbox and debug output

Docker Compose Version

Docker Compose version 2.27.1+ds1-0ubuntu1~24.04.1

Docker Version

Client:
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.22.2
 Git commit:        26.1.3-0ubuntu1~24.04.1+esm1
 Built:             Sun Dec 15 14:08:17 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          26.1.3
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.22.2
  Git commit:       26.1.3-0ubuntu1~24.04.1+esm1
  Built:            Sun Dec 15 14:08:17 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.24
  GitCommit:        
 runc:
  Version:          1.1.12-0ubuntu3.1
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:

The git Revision

0b70f72

The git Status

HEAD detached at 3.2.0
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   configuration/configuration.py

no changes added to commit (use "git add" and/or "git commit -a")

Startup Command

docker compose up -d

NetBox Logs

Attaching to netbox-netbox-worker-1, netbox-netbox-1
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (0s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (3s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (6s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (9s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (12s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (15s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (18s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (21s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (24s / 30s)
netbox-netbox-1        | IndentationError: unexpected indent
netbox-netbox-1        | [ Use DB_WAIT_DEBUG=1 in netbox.env to print full traceback for errors here ]
netbox-netbox-1        | ⏳ Waiting on DB... (27s / 30s)
netbox-netbox-1        | ❌ Waited 30s or more for the DB to become ready.
netbox-netbox-1 exited with code 1
netbox-netbox-worker-1 exited with code 0

Content of docker-compose.override.yml

services:
  netbox:
    ports:
      - "127.0.0.1:8000:8080"
    # If you want the Nginx unit status page visible from the
    # outside of the container add the following port mapping:
    # - "8001:8081"
    # healthcheck:
      # Time for which the health check can fail after the container is started.
      # This depends mostly on the performance of your database. On the first start,
      # when all tables need to be created the start_period should be higher than on
      # subsequent starts. For the first start after major version upgrades of NetBox
      # the start_period might also need to be set higher.
      # Default value in our docker-compose.yml is 60s
      # start_period: 90s
    # environment:
      # SKIP_SUPERUSER: "false"
      # SUPERUSER_API_TOKEN: ""
      # SUPERUSER_EMAIL: ""
      # SUPERUSER_NAME: ""
      # SUPERUSER_PASSWORD: ""
    environment:
      REMOTE_AUTH_ENABLED: "True"
      REMOTE_AUTH_BACKEND: "netbox.authentication.LDAPBackend"
      AUTH_LDAP_SERVER_URI: "REDACTED"
      AUTH_LDAP_BIND_AS_AUTHENTICATING_USER: "True" #has to be a string, lol
      AUTH_LDAP_USER_SEARCH_ATTR: "sAMAccountName"
      AUTH_LDAP_USER_SEARCH_BASEDN: "REDACTED"
      AUTH_LDAP_GROUP_SEARCH_BASEDN: "REDACTED"
      AUTH_LDAP_REQUIRE_GROUP_DN: "REDACTED"
      AUTH_LDAP_GROUP_TYPE: "NestedActiveDirectoryGroupType"
      AUTH_LDAP_IS_ADMIN_DN: "REDACTED"
      AUTH_LDAP_IS_SUPERUSER_DN: "REDACTED"
      LDAP_IGNORE_CERT_ERRORS: "true"
      LOGLEVEL: "DEBUG"
@Kloppi313
Copy link
Author

Kloppi313 commented Feb 17, 2025

running docker compose up -d later again, starts the container: maybe configure a longer standard timeout or add this information to the docs?
running netbox docker on a 2 CPU / 4GB RAM machine. Only netbox, fresh install of OS + netbox

@netbox-community netbox-community locked and limited conversation to collaborators Feb 17, 2025
@tobiasge tobiasge converted this issue into discussion #1403 Feb 17, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant