./manage.py createsuperuser hangs in docker exec #8289

Closed
opened 2025-12-29 20:34:48 +01:00 by adam · 1 comment
Owner

Originally created by @aep on GitHub (Jul 3, 2023).

NetBox version

v3.5.4

Python version

3.10

Steps to Reproduce

fresh install

docker exec -ti netbox /bin/sh
source /opt/netbox/venv/bin/activate
/opt/netbox/netbox/manage.py createsuperuser

(venv) root@netbox:/opt/netbox/scripts# /opt/netbox/netbox/manage.py createsuperuser
Username (leave blank to use 'root'): aep
Email address: invalid@invalid.com

Expected Behavior

password prompt should appear

Observed Behavior

nothing happens after that
strace reveals it is opening /dev/tty, which isnt correct here

openat(AT_FDCWD, "/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC) = 5
newfstatat(5, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0), ...}, AT_EMPTY_PATH) = 0
ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
lseek(5, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
write(5, "Password: ", 10)              = 10

Originally created by @aep on GitHub (Jul 3, 2023). ### NetBox version v3.5.4 ### Python version 3.10 ### Steps to Reproduce fresh install ``` docker exec -ti netbox /bin/sh source /opt/netbox/venv/bin/activate /opt/netbox/netbox/manage.py createsuperuser (venv) root@netbox:/opt/netbox/scripts# /opt/netbox/netbox/manage.py createsuperuser Username (leave blank to use 'root'): aep Email address: invalid@invalid.com ``` ### Expected Behavior password prompt should appear ### Observed Behavior nothing happens after that strace reveals it is opening /dev/tty, which isnt correct here ``` openat(AT_FDCWD, "/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC) = 5 newfstatat(5, "", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0), ...}, AT_EMPTY_PATH) = 0 ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(5, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 write(5, "Password: ", 10) = 10 ```
adam closed this issue 2025-12-29 20:34:48 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Jul 3, 2023):

The netbox-docker repo is over here: https://github.com/netbox-community/netbox-docker

Also, the createsuperuser command is a built-in django command, which I would assume we have no control over.

@kkthxbye-code commented on GitHub (Jul 3, 2023): The netbox-docker repo is over here: https://github.com/netbox-community/netbox-docker Also, the createsuperuser command is a built-in django command, which I would assume we have no control over.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8289