Skip to content
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

Error when creating superuser in fresh install #1794

Closed
2 tasks done
MuadDev opened this issue Jun 23, 2020 · 20 comments · Fixed by #2293
Closed
2 tasks done

Error when creating superuser in fresh install #1794

MuadDev opened this issue Jun 23, 2020 · 20 comments · Fixed by #2293
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MuadDev
Copy link

MuadDev commented Jun 23, 2020

My actions before raising this issue

Expected Behaviour

After building the docker I expect to be able to create a super user with the following command from the installation guide:

 docker exec -it cvat bash -ic 'python3 ~/manage.py createsuperuser'

Current Behaviour

Instead I get the following error message:

You have 54 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): account, admin, auth, authtoken, contenttypes, engine, git, sessions, sites, socialaccount.
Run 'python manage.py migrate' to apply them.

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...
                                                             ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/django/manage.py", line 21, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.5/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 61, in execute
    return super().execute(*args, **options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.5/dist-packages/django/contrib/auth/management/commands/createsuperuser.py", line 82, in handle
    default_username = get_default_username()
  File "/usr/local/lib/python3.5/dist-packages/django/contrib/auth/management/__init__.py", line 140, in get_default_username
    auth_app.User._default_manager.get(username=default_username)
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/cacheops/query.py", line 359, in get
    return qs._no_monkey.get(qs, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 402, in get
    num = len(clone)
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 256, in __len__
    self._fetch_all()
  File "/usr/local/lib/python3.5/dist-packages/cacheops/query.py", line 279, in _fetch_all
    return self._no_monkey._fetch_all(self)
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/local/lib/python3.5/dist-packages/django/db/models/sql/compiler.py", line 1140, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.5/dist-packages/cacheops/transaction.py", line 93, in execute
    result = self._no_monkey.execute(self, sql, params)
  File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.5/dist-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "auth_user" does not exist
LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user...

Perhaps something with a database?

Possible Solution

?

Steps to Reproduce (for bugs)

  1. git clone https://github.com/opencv/cvat.git
  2. docker-compose build
  3. docker-compose up -d
  4. docker exec -it cvat bash -ic 'python3 ~/manage.py createsuperuser'

Context

I tried this on a pc which had an older version of CVAT running without problems. I also tried it on another pc which did not have a previous install of CVAT to be sure.

Your Environment

  • Git hash commit (git log -1):
    image
  • Docker version docker version (e.g. Docker 17.0.05):
    image
  • Are you using Docker Swarm or Kubernetes?
    I don't know, for sure not kubernetes.
  • Operating System and version (e.g. Linux, Windows, MacOS):
    image
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

I also raised this issue on gitter.

@azhavoro
Copy link
Contributor

azhavoro commented Jun 23, 2020

@MuadDev Hi, please attach full container log: docker logs cvat.

@MuadDev
Copy link
Author

MuadDev commented Jun 23, 2020

Here are the logs:
image

@azhavoro
Copy link
Contributor

azhavoro commented Jun 23, 2020

How long is the cvat container up? I see only ~7 sec time difference between the first and last event and cannot obtain any messages about applied migrations and so on. Please note that cvat cannot start instantly and this process takes some time. It's depend on the machine (disk performance, cpu, etc), especially it's relevant for fresh installation.

Please start container with docker-compose up -d command
Wait about 1min and make sure that you see message like this in the docker logs cvat

2020-06-23 16:35:04,590 DEBG 'runserver' stdout output:
Successfully ran command.
Server URL         : http://localhost:8080/
Server Root        : /tmp/cvat-server
Server Conf        : /tmp/cvat-server/httpd.conf
Error Log File     : /dev/stderr (INFO)
Request Capacity   : 5 (1 process * 5 threads)
Request Timeout    : 60 (seconds)
Startup Timeout    : 15 (seconds)
Queue Backlog      : 100 (connections)
Queue Timeout      : 45 (seconds)
Server Capacity    : 20 (event/worker), 20 (prefork)
Server Backlog     : 500 (connections)
Locale Setting     : C.UTF-8

After that should be possible to create a new superuser.

@MuadDev
Copy link
Author

MuadDev commented Jun 24, 2020

Ah thank you, that might be the issue since I do not wait when starting up. I will test this and report back.

@MuadDev
Copy link
Author

MuadDev commented Jun 24, 2020

Ok, so these are the steps I tried:

  1. Started the docker and waited for 15 min
    docker-compose up -d
  2. Looked at the logs
    docker logs cvat
    This resulted in similar output as was shown above. Therefore I tried starting from scratch.

Starting from scratch

  1. Shutdown and remove containers
    docker-compose down -v
  2. Rebuild without cache
    docker-compose build --no-cache
  3. Start
    docker-compose up -d
  4. Waited several hours, but the result is the same...

For some context. This happens on a quite powerful machine. The storage is a SSD drive, the CPU is a Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz, and it also has 2 GPUs but that is probably not relevant. What I am trying to say, I would expect that this machine would not take so long for starting up as it is quite powerful.

@azhavoro
Copy link
Contributor

@MuadDev ok, startup process usually takes no more than 1 min. Could you save your log as file and attach it here? docker logs cvat > cvat.log

@MuadDev
Copy link
Author

MuadDev commented Jun 25, 2020

Of course:
cvat.log

@MuadDev
Copy link
Author

MuadDev commented Jun 25, 2020

In the original error message i posted it gave a hint about a migration that needed to be done, see my first post in this thread. I just carried that out:

docker exec -it cvat bash -ic '/usr/bin/python3 ~/manage.py migrate'

This gave the following output
image
image

After that I was at least able to create the superuser and get to the webpage using chrome. However, I cannot use this user to login. This is the error shown:
image

So for me it is unclear if my original error is now solved or that it this is just the next step in the same error?

@azhavoro
Copy link
Contributor

You original issue doesn't related with unapplied migrations, for some reason the backend server is not started properly. Unfortunately I cannot reproduce this issue. Could you do the following steps:

  • docker-compose up -d
  • wait 1-3 min
  • docker exec -it cvat bash
  • open top utility and make a screenshot.

@MuadDev
Copy link
Author

MuadDev commented Jun 25, 2020

image

@azhavoro
Copy link
Contributor

azhavoro commented Jun 26, 2020

Could you please attach output of docker exec -it cvat bash -ic 'ps -aux' command and database logs docker logs cvat_db > db.log?

@andyDoucette
Copy link

Hello. I just wanted to say that I'm getting this same issue. I've tried both the release-1.1.0 branch, and develop, and I get django.db.utils.ProgrammingError: relation "auth_user" does not exist as well when I try to run docker exec -it cvat bash -ic 'python3 ~/manage.py createsuperuser'.

My environment:

[andromodon@yogie cvat]$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01
[andromodon@yogie cvat]$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
[andromodon@yogie cvat]$ docker --version
Docker version 19.03.12, build 48a66213fe

[andromodon@yogie cvat]$ dpkg --list | grep docker
rc  docker                                                           1.5-1                                               amd64        System tray for KDE3/GNOME2 docklet applications
ii  docker-ce                                                        5:19.03.12~3-0~ubuntu-bionic                        amd64        Docker: the open-source application container engine
ii  docker-ce-cli                                                    5:19.03.12~3-0~ubuntu-bionic                        amd64        Docker CLI: the open-source application container engine
ii  docker-compose                                                   1.17.1-2                                            all          Punctual, lightweight development environments using Docker
rc  docker.io                                                        17.12.1-0ubuntu1                                    amd64        Linux container runtime
ii  golang-docker-credential-helpers                                 0.5.0-2                                             amd64        Use native stores to safeguard Docker credentials
rc  nvidia-docker2                                                   2.0.3+docker18.09.3-1                               all          nvidia-docker CLI wrapper
ii  python-docker                                                    2.5.1-1                                             all          Python wrapper to access docker.io's control socket
ii  python-dockerpty                                                 0.4.1-1                                             all          Pseudo-tty handler for docker Python client (Python 2.x)
ii  python-dockerpycreds                                             0.2.1-1                                             all          Python bindings for the docker credentials store API

I just start the server with 'docker-compose up'. I don't bother with the -d, but I doubt that has anything to do with anything. I haven't edited the code-base at all, but I didn't copy-paste the install steps either because I didn't want to use all of these 3rd party repos that I don't necessarily trust. I'm using docker-ce from a previous project. Just wondering if this helps at all. I know it's super hard to troubleshoot issues you can't reproduce yet.

@andyDoucette
Copy link

MuadDev and my docker logs cvat look very similar to each other. Niether of them have the "Successfully ran command... Server URL... etc" text in them, which seems different than what @azhavoro suggests should happen.

Here is mine:

[andromodon@yogie cvat]$ docker logs -f cvat
2020-07-30 06:30:35,230 INFO RPC interface 'supervisor' initialized
2020-07-30 06:30:35,231 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-30 06:30:35,231 INFO supervisord started with pid 1
2020-07-30 06:30:36,233 INFO spawned: 'ssh-agent' with pid 9
2020-07-30 06:30:36,235 INFO spawned: 'rqscheduler' with pid 10
2020-07-30 06:30:36,238 INFO spawned: 'runserver' with pid 11
2020-07-30 06:30:36,240 INFO spawned: 'rqworker_low' with pid 12
2020-07-30 06:30:36,243 INFO spawned: 'rqworker_default_0' with pid 13
2020-07-30 06:30:36,245 INFO spawned: 'rqworker_default_1' with pid 14
2020-07-30 06:30:36,249 INFO spawned: 'git_status_updater' with pid 15
2020-07-30 06:30:36,251 INFO spawned: 'clamav_update' with pid 17
2020-07-30 06:30:36,269 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139725109311032 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:30:36,269 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139725109311176 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:30:36,270 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:30:36,270 DEBG received SIGCLD indicating a child quit
2020-07-30 06:30:36,271 DEBG 'ssh-agent' stdout output:
SSH_AUTH_SOCK=/tmp/ssh-agent.sock; export SSH_AUTH_SOCK;
echo Agent pid 20;

2020-07-30 06:30:36,271 DEBG 'ssh-agent' stderr output:
debug2: fd 3 setting O_NONBLOCK

2020-07-30 06:30:36,277 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:30:36,278 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:30:36,278 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:30:36,279 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:30:36,279 DEBG 'runserver' stderr output:
wait-for-it.sh: waiting for cvat_db:5432 without a timeout

2020-07-30 06:30:36,281 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:30:36,315 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:30:36,316 DEBG 'runserver' stderr output:
wait-for-it.sh: cvat_db:5432 is available after 0 seconds

2020-07-30 06:30:36,318 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:30:36,319 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:30:36,325 DEBG 'rqworker_low' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,325 DEBG 'rqworker_default_0' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,325 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:30:36,325 DEBG 'runserver' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,327 DEBG 'rqscheduler' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,329 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:30:36,331 DEBG 'git_status_updater' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,332 DEBG 'rqworker_default_1' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:30:36,771 DEBG 'ssh-agent' stderr output:
debug2: fd 4 setting O_NONBLOCK

2020-07-30 06:30:36,813 DEBG 'rqscheduler' stderr output:
06:30:36 Registering birth

2020-07-30 06:30:37,814 INFO success: ssh-agent entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,814 INFO success: rqscheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,814 INFO success: runserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,814 INFO success: rqworker_low entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,815 INFO success: rqworker_default_0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,815 INFO success: rqworker_default_1 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,815 INFO success: git_status_updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:30:37,819 INFO spawned: 'clamav_update' with pid 78
2020-07-30 06:30:37,827 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139725109311320 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:30:37,827 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139725109310888 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:30:37,827 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:30:37,827 DEBG received SIGCLD indicating a child quit
2020-07-30 06:30:39,833 INFO spawned: 'clamav_update' with pid 79
2020-07-30 06:30:39,843 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139725109311392 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:30:39,843 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139725109311176 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:30:39,843 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:30:39,843 DEBG received SIGCLD indicating a child quit
2020-07-30 06:30:42,851 INFO spawned: 'clamav_update' with pid 80
2020-07-30 06:30:42,860 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139725109311464 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:30:42,861 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139725109310888 for <Subprocess at 139725109462584 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:30:42,861 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:30:42,861 DEBG received SIGCLD indicating a child quit
2020-07-30 06:30:43,863 INFO gave up: clamav_update entered FATAL state, too many start retries too quickly
2020-07-30 06:34:14,274 WARN received SIGTERM indicating exit request
2020-07-30 06:34:14,274 INFO waiting for ssh-agent, rqscheduler, runserver, rqworker_low, rqworker_default_0, rqworker_default_1, git_status_updater to die
2020-07-30 06:34:15,275 DEBG killing git_status_updater (pid 15) with signal SIGTERM
2020-07-30 06:34:15,277 DEBG fd 36 closed, stopped monitoring <POutputDispatcher at 139725109310312 for <Subprocess at 139725109462728 with name git_status_updater in state STOPPING> (stdout)>
2020-07-30 06:34:15,277 DEBG fd 40 closed, stopped monitoring <POutputDispatcher at 139725109310600 for <Subprocess at 139725109462728 with name git_status_updater in state STOPPING> (stderr)>
2020-07-30 06:34:15,277 INFO stopped: git_status_updater (terminated by SIGTERM)
2020-07-30 06:34:15,277 DEBG received SIGCLD indicating a child quit
2020-07-30 06:34:15,277 DEBG killing rqworker_default_1 (pid 14) with signal SIGTERM
2020-07-30 06:34:15,277 DEBG killing rqworker_default_0 (pid 13) with signal SIGTERM
2020-07-30 06:34:15,278 DEBG fd 26 closed, stopped monitoring <POutputDispatcher at 139725109247656 for <Subprocess at 139725109463016 with name rqworker_default_0 in state STOPPING> (stdout)>
2020-07-30 06:34:15,278 DEBG fd 30 closed, stopped monitoring <POutputDispatcher at 139725109247944 for <Subprocess at 139725109463016 with name rqworker_default_0 in state STOPPING> (stderr)>
2020-07-30 06:34:15,278 DEBG fd 31 closed, stopped monitoring <POutputDispatcher at 139725109309736 for <Subprocess at 139725109463088 with name rqworker_default_1 in state STOPPING> (stdout)>
2020-07-30 06:34:15,278 DEBG fd 35 closed, stopped monitoring <POutputDispatcher at 139725109310024 for <Subprocess at 139725109463088 with name rqworker_default_1 in state STOPPING> (stderr)>
2020-07-30 06:34:15,279 INFO stopped: rqworker_default_0 (terminated by SIGTERM)
2020-07-30 06:34:15,279 INFO stopped: rqworker_default_1 (terminated by SIGTERM)
2020-07-30 06:34:15,279 DEBG received SIGCLD indicating a child quit
2020-07-30 06:34:15,279 DEBG killing rqworker_low (pid 12) with signal SIGTERM
2020-07-30 06:34:15,280 DEBG fd 21 closed, stopped monitoring <POutputDispatcher at 139725109247080 for <Subprocess at 139725109463232 with name rqworker_low in state STOPPING> (stdout)>
2020-07-30 06:34:15,280 DEBG fd 25 closed, stopped monitoring <POutputDispatcher at 139725109247368 for <Subprocess at 139725109463232 with name rqworker_low in state STOPPING> (stderr)>
2020-07-30 06:34:15,280 INFO stopped: rqworker_low (terminated by SIGTERM)
2020-07-30 06:34:15,280 DEBG received SIGCLD indicating a child quit
2020-07-30 06:34:15,280 DEBG killing runserver (pid 11) with signal SIGTERM
2020-07-30 06:34:17,283 INFO waiting for ssh-agent, rqscheduler, runserver to die
2020-07-30 06:34:20,288 INFO waiting for ssh-agent, rqscheduler, runserver to die
2020-07-30 06:34:23,293 INFO waiting for ssh-agent, rqscheduler, runserver to die
Unlinking stale socket /tmp/supervisord/supervisor.sock
2020-07-30 06:35:59,637 INFO RPC interface 'supervisor' initialized
2020-07-30 06:35:59,637 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-30 06:35:59,637 INFO supervisord started with pid 1
2020-07-30 06:36:00,641 INFO spawned: 'ssh-agent' with pid 8
2020-07-30 06:36:00,644 INFO spawned: 'rqscheduler' with pid 9
2020-07-30 06:36:00,648 INFO spawned: 'runserver' with pid 10
2020-07-30 06:36:00,650 INFO spawned: 'rqworker_low' with pid 11
2020-07-30 06:36:00,652 INFO spawned: 'rqworker_default_0' with pid 12
2020-07-30 06:36:00,658 INFO spawned: 'rqworker_default_1' with pid 15
2020-07-30 06:36:00,660 INFO spawned: 'git_status_updater' with pid 17
2020-07-30 06:36:00,665 INFO spawned: 'clamav_update' with pid 19
2020-07-30 06:36:00,671 DEBG 'ssh-agent' stdout output:
SSH_AUTH_SOCK=/tmp/ssh-agent.sock; export SSH_AUTH_SOCK;
echo Agent pid 18;

2020-07-30 06:36:00,672 DEBG 'ssh-agent' stderr output:
debug2: fd 3 setting O_NONBLOCK

2020-07-30 06:36:00,676 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:36:00,677 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139855060321848 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:36:00,677 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139855060321992 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:36:00,677 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:36:00,678 DEBG received SIGCLD indicating a child quit
2020-07-30 06:36:00,681 DEBG 'runserver' stderr output:
wait-for-it.sh: waiting for cvat_db:5432 without a timeout

2020-07-30 06:36:00,682 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:36:00,682 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:36:00,682 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:36:00,688 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:36:00,689 DEBG 'runserver' stderr output:
wait-for-it.sh: cvat_db:5432 is available after 0 seconds

2020-07-30 06:36:00,689 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:36:00,693 DEBG 'rqscheduler' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:00,693 DEBG 'runserver' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:00,693 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:36:00,695 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:36:00,698 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:36:00,698 DEBG 'rqworker_default_0' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:00,698 DEBG 'rqworker_default_1' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:00,701 DEBG 'rqworker_low' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:00,703 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:36:00,714 DEBG 'git_status_updater' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:36:01,026 DEBG 'ssh-agent' stderr output:
debug2: fd 4 setting O_NONBLOCK

2020-07-30 06:36:01,090 DEBG 'rqscheduler' stderr output:
06:36:01 Registering birth

2020-07-30 06:36:02,091 INFO success: ssh-agent entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: rqscheduler entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: runserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: rqworker_low entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: rqworker_default_0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: rqworker_default_1 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,091 INFO success: git_status_updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-07-30 06:36:02,093 INFO spawned: 'clamav_update' with pid 77
2020-07-30 06:36:02,098 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139855060322136 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:36:02,098 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139855060321704 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:36:02,099 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:36:02,099 DEBG received SIGCLD indicating a child quit
2020-07-30 06:36:04,103 INFO spawned: 'clamav_update' with pid 78
2020-07-30 06:36:04,113 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139855060322208 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:36:04,113 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139855060321992 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:36:04,113 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:36:04,113 DEBG received SIGCLD indicating a child quit
2020-07-30 06:36:07,119 INFO spawned: 'clamav_update' with pid 79
2020-07-30 06:36:07,125 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 139855060322280 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:36:07,126 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 139855060321704 for <Subprocess at 139855060469304 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:36:07,126 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:36:07,126 DEBG received SIGCLD indicating a child quit
2020-07-30 06:36:08,127 INFO gave up: clamav_update entered FATAL state, too many start retries too quickly
2020-07-30 06:53:05,734 WARN received SIGTERM indicating exit request
2020-07-30 06:53:05,735 INFO waiting for ssh-agent, rqscheduler, runserver, rqworker_low, rqworker_default_0, rqworker_default_1, git_status_updater to die
2020-07-30 06:53:06,736 DEBG killing git_status_updater (pid 17) with signal SIGTERM
2020-07-30 06:53:06,739 DEBG fd 36 closed, stopped monitoring <POutputDispatcher at 139855060321128 for <Subprocess at 139855060469448 with name git_status_updater in state STOPPING> (stdout)>
2020-07-30 06:53:06,739 DEBG fd 40 closed, stopped monitoring <POutputDispatcher at 139855060321416 for <Subprocess at 139855060469448 with name git_status_updater in state STOPPING> (stderr)>
2020-07-30 06:53:06,739 INFO stopped: git_status_updater (terminated by SIGTERM)
2020-07-30 06:53:06,739 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:06,739 DEBG killing rqworker_default_1 (pid 15) with signal SIGTERM
2020-07-30 06:53:06,740 DEBG killing rqworker_default_0 (pid 12) with signal SIGTERM
2020-07-30 06:53:06,741 DEBG fd 26 closed, stopped monitoring <POutputDispatcher at 139855060254376 for <Subprocess at 139855060469736 with name rqworker_default_0 in state STOPPING> (stdout)>
2020-07-30 06:53:06,741 DEBG fd 30 closed, stopped monitoring <POutputDispatcher at 139855060254664 for <Subprocess at 139855060469736 with name rqworker_default_0 in state STOPPING> (stderr)>
2020-07-30 06:53:06,741 DEBG fd 35 closed, stopped monitoring <POutputDispatcher at 139855060320840 for <Subprocess at 139855060469808 with name rqworker_default_1 in state STOPPING> (stderr)>
2020-07-30 06:53:06,741 INFO stopped: rqworker_default_0 (terminated by SIGTERM)
2020-07-30 06:53:06,741 DEBG fd 31 closed, stopped monitoring <POutputDispatcher at 139855060320552 for <Subprocess at 139855060469808 with name rqworker_default_1 in state STOPPING> (stdout)>
2020-07-30 06:53:06,741 INFO stopped: rqworker_default_1 (terminated by SIGTERM)
2020-07-30 06:53:06,741 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:06,742 DEBG killing rqworker_low (pid 11) with signal SIGTERM
2020-07-30 06:53:06,742 DEBG 'ssh-agent' stderr output:
debug1: XXX shrink: 3 < 4

2020-07-30 06:53:06,742 INFO reaped unknown pid 75
2020-07-30 06:53:06,742 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:06,742 DEBG fd 21 closed, stopped monitoring <POutputDispatcher at 139855060253800 for <Subprocess at 139855060469952 with name rqworker_low in state STOPPING> (stdout)>
2020-07-30 06:53:06,742 DEBG fd 25 closed, stopped monitoring <POutputDispatcher at 139855060254088 for <Subprocess at 139855060469952 with name rqworker_low in state STOPPING> (stderr)>
2020-07-30 06:53:06,742 INFO stopped: rqworker_low (terminated by SIGTERM)
2020-07-30 06:53:06,743 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:06,743 DEBG killing runserver (pid 10) with signal SIGTERM
2020-07-30 06:53:06,746 DEBG 'ssh-agent' stderr output:
debug2: fd 4 setting O_NONBLOCK

2020-07-30 06:53:08,748 INFO waiting for ssh-agent, rqscheduler, runserver to die
2020-07-30 06:53:11,753 INFO waiting for ssh-agent, rqscheduler, runserver to die
2020-07-30 06:53:14,758 INFO waiting for ssh-agent, rqscheduler, runserver to die
Unlinking stale socket /tmp/supervisord/supervisor.sock
2020-07-30 06:53:26,725 INFO RPC interface 'supervisor' initialized
2020-07-30 06:53:26,725 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-07-30 06:53:26,725 INFO supervisord started with pid 1
2020-07-30 06:53:27,729 INFO spawned: 'ssh-agent' with pid 8
2020-07-30 06:53:27,734 INFO spawned: 'rqscheduler' with pid 9
2020-07-30 06:53:27,738 INFO spawned: 'runserver' with pid 10
2020-07-30 06:53:27,740 INFO spawned: 'rqworker_low' with pid 11
2020-07-30 06:53:27,742 INFO spawned: 'rqworker_default_0' with pid 12
2020-07-30 06:53:27,744 INFO spawned: 'rqworker_default_1' with pid 15
2020-07-30 06:53:27,748 INFO spawned: 'git_status_updater' with pid 16
2020-07-30 06:53:27,751 INFO spawned: 'clamav_update' with pid 17
2020-07-30 06:53:27,763 DEBG 'ssh-agent' stdout output:
SSH_AUTH_SOCK=/tmp/ssh-agent.sock; export SSH_AUTH_SOCK;
echo Agent pid 19;

2020-07-30 06:53:27,766 DEBG 'ssh-agent' stderr output:
debug2: fd 3 setting O_NONBLOCK

2020-07-30 06:53:27,768 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:53:27,774 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:53:27,776 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 140553271248440 for <Subprocess at 140553271395896 with name clamav_update in state STARTING> (stdout)>
2020-07-30 06:53:27,776 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 140553271248584 for <Subprocess at 140553271395896 with name clamav_update in state STARTING> (stderr)>
2020-07-30 06:53:27,776 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:53:27,776 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:27,779 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:53:27,787 DEBG 'runserver' stderr output:
wait-for-it.sh: waiting for cvat_db:5432 without a timeout

2020-07-30 06:53:27,788 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:53:27,789 DEBG 'rqworker_low' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:53:27,789 DEBG 'rqworker_default_1' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:53:27,792 DEBG 'rqscheduler' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:53:27,793 DEBG 'rqworker_default_1' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:27,796 DEBG 'rqworker_low' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:27,797 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: waiting for cvat_redis:6379 without a timeout

2020-07-30 06:53:27,800 DEBG 'rqscheduler' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:27,801 DEBG 'git_status_updater' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:53:27,803 DEBG 'runserver' stderr output:
wait-for-it.sh: cvat_db:5432 is available after 0 seconds

2020-07-30 06:53:27,804 DEBG 'git_status_updater' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:27,805 DEBG 'runserver' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:27,817 DEBG 'rqworker_default_0' stderr output:
wait-for-it.sh: cvat_redis:6379 is available after 0 seconds

2020-07-30 06:53:27,819 DEBG 'rqworker_default_0' stderr output:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

2020-07-30 06:53:28,073 DEBG 'ssh-agent' stderr output:
debug2: fd 4 setting O_NONBLOCK

2020-07-30 06:53:28,142 DEBG 'rqscheduler' stderr output:
06:53:28 Registering birth

2020-07-30 06:53:29,144 INFO success: ssh-agent entered RUNNING state, process has stayed up for > than 1 seconds (start
2020-07-30 06:53:29,144 INFO success: rqscheduler entered RUNNING state, process has stayed up for > than 1 seconds (sta
2020-07-30 06:53:29,144 INFO success: runserver entered RUNNING state, process has stayed up for > than 1 seconds (start
2020-07-30 06:53:29,144 INFO success: rqworker_low entered RUNNING state, process has stayed up for > than 1 seconds (st
2020-07-30 06:53:29,144 INFO success: rqworker_default_0 entered RUNNING state, process has stayed up for > than 1 secon
2020-07-30 06:53:29,144 INFO success: rqworker_default_1 entered RUNNING state, process has stayed up for > than 1 secon
2020-07-30 06:53:29,144 INFO success: git_status_updater entered RUNNING state, process has stayed up for > than 1 secon
2020-07-30 06:53:29,145 INFO spawned: 'clamav_update' with pid 77
2020-07-30 06:53:29,152 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 140553271248728 for <Subprocess at 1
2020-07-30 06:53:29,152 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 140553271248296 for <Subprocess at 1
2020-07-30 06:53:29,152 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:53:29,152 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:31,156 INFO spawned: 'clamav_update' with pid 78
2020-07-30 06:53:31,162 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 140553271248800 for <Subprocess at 1
2020-07-30 06:53:31,162 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 140553271248584 for <Subprocess at 1
2020-07-30 06:53:31,162 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:53:31,162 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:34,168 INFO spawned: 'clamav_update' with pid 79
2020-07-30 06:53:34,181 DEBG fd 41 closed, stopped monitoring <POutputDispatcher at 140553271248872 for <Subprocess at 1
2020-07-30 06:53:34,181 DEBG fd 45 closed, stopped monitoring <POutputDispatcher at 140553271248296 for <Subprocess at 1
2020-07-30 06:53:34,181 INFO exited: clamav_update (exit status 0; not expected)
2020-07-30 06:53:34,181 DEBG received SIGCLD indicating a child quit
2020-07-30 06:53:35,183 INFO gave up: clamav_update entered FATAL state, too many start retries too quickly

Also, my docker logs cvat_db:

[andromodon@yogie cvat]$ docker logs cvat_db

PostgreSQL Database directory appears to contain a database; Skipping initialization

2020-07-30 06:30:33.132 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-07-30 06:30:33.132 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-07-30 06:30:33.142 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-07-30 06:30:33.177 UTC [20] LOG:  database system was shut down at 2020-07-21 07:58:52 UTC
2020-07-30 06:30:33.196 UTC [1] LOG:  database system is ready to accept connections
2020-07-30 06:30:36.310 UTC [27] LOG:  incomplete startup packet
2020-07-30 06:33:10.166 UTC [28] ERROR:  relation "auth_user" does not exist at character 280
2020-07-30 06:33:10.166 UTC [28] STATEMENT:  SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'django'
2020-07-30 06:34:24.712 UTC [1] LOG:  received smart shutdown request
2020-07-30 06:34:24.715 UTC [1] LOG:  worker process: logical replication launcher (PID 26) exited with exit code 1
2020-07-30 06:34:24.715 UTC [21] LOG:  shutting down
2020-07-30 06:34:24.769 UTC [1] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

2020-07-30 06:35:58.197 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-07-30 06:35:58.197 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-07-30 06:35:58.216 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-07-30 06:35:58.256 UTC [20] LOG:  database system was shut down at 2020-07-30 06:34:24 UTC
2020-07-30 06:35:58.279 UTC [1] LOG:  database system is ready to accept connections
2020-07-30 06:36:00.686 UTC [27] LOG:  incomplete startup packet
2020-07-30 06:36:36.556 UTC [28] ERROR:  relation "auth_user" does not exist at character 280                                                                          
2020-07-30 06:36:36.556 UTC [28] STATEMENT:  SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'django'                                                                                                                                            
2020-07-30 06:43:16.986 UTC [36] ERROR:  relation "auth_user" does not exist at character 280                                                                            
2020-07-30 06:43:16.986 UTC [36] STATEMENT:  SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'django'                                                                                                                                                
2020-07-30 06:44:33.529 UTC [38] ERROR:  relation "auth_user" does not exist at character 280                                                                              
2020-07-30 06:44:33.529 UTC [38] STATEMENT:  SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'django'                                                                                                                                                   
2020-07-30 06:48:33.871 UTC [43] ERROR:  relation "auth_user" does not exist at character 280                                                                                 
2020-07-30 06:48:33.871 UTC [43] STATEMENT:  SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = 'django'
2020-07-30 06:53:16.174 UTC [1] LOG:  received smart shutdown request
2020-07-30 06:53:16.182 UTC [1] LOG:  worker process: logical replication launcher (PID 26) exited with exit code 1
2020-07-30 06:53:16.183 UTC [21] LOG:  shutting down
2020-07-30 06:53:16.223 UTC [1] LOG:  database system is shut down

PostgreSQL Database directory appears to contain a database; Skipping initialization

2020-07-30 06:53:24.555 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-07-30 06:53:24.555 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-07-30 06:53:24.572 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-07-30 06:53:24.601 UTC [21] LOG:  database system was shut down at 2020-07-30 06:53:16 UTC
2020-07-30 06:53:24.611 UTC [1] LOG:  database system is ready to accept connections
2020-07-30 06:53:27.797 UTC [28] LOG:  incomplete startup packet

I hope I'm not stepping on your guys's conversation by adding my experience of the same error.

@andyDoucette
Copy link

andyDoucette commented Jul 30, 2020

Update: I also tried the migrate command @MuadDev came up with, and these migrations ran:

andromodon@yogie cvat]$ docker exec -it cvat bash -ic '/usr/bin/python3 ~/manage.py migrate'
Operations to perform:
  Apply all migrations: account, admin, auth, authtoken, contenttypes, engine, git, sessions, sites, socialaccount
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying account.0001_initial... OK
  Applying account.0002_email_max_length... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying authtoken.0001_initial... OK
  Applying authtoken.0002_auto_20160226_1747... OK
  Applying engine.0001_release_v0_1_0... OK
  Applying engine.0002_labeledpoints_labeledpointsattributeval_labeledpolygon_labeledpolygonattributeval_labeledpolyline_la... OK
  Applying engine.0003_objectpath_shapes... OK
  Applying engine.0004_task_z_order... OK
  Applying engine.0005_auto_20180609_1512... OK
  Applying engine.0006_auto_20180629_1501... OK
  Applying engine.0007_task_flipped... OK
  Applying engine.0008_auto_20180917_1424... OK
  Applying engine.0009_auto_20180917_1424... OK
  Applying engine.0010_auto_20181011_1517... OK
  Applying engine.0011_add_task_source_and_safecharfield... OK
  Applying engine.0012_auto_20181025_1618... OK
  Applying engine.0013_auth_no_default_permissions... OK
  Applying engine.0014_job_max_shape_id... OK
  Applying engine.0015_db_redesign_20190217... OK
  Applying engine.0016_attribute_spec_20190217... OK
  Applying engine.0017_db_redesign_20190221... OK
  Applying engine.0018_jobcommit... OK
  Applying engine.0019_frame_selection... OK
  Applying engine.0020_remove_task_flipped...Getting flipped tasks...
Conversion started...
 OK
  Applying engine.0021_auto_20190826_1827... OK
  Applying engine.0022_auto_20191004_0817... OK
  Applying engine.0023_auto_20200113_1323... OK
  Applying engine.0024_auto_20191023_1025...
Start schema migration...
INFO:0024_auto_20191023_1025:
Start schema migration...

Schema migration is finished...
INFO:0024_auto_20191023_1025:
Schema migration is finished...

Start data migration...
INFO:0024_auto_20191023_1025:
Start data migration...
 OK
  Applying engine.0025_auto_20200324_1222... OK
  Applying engine.0026_auto_20200719_1511... OK
  Applying git.0001_initial... OK
  Applying git.0002_auto_20190123_1305... OK
  Applying git.0003_gitdata_lfs... OK
  Applying sessions.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK
  Applying socialaccount.0001_initial... OK
  Applying socialaccount.0002_token_max_lengths... OK
  Applying socialaccount.0003_extra_data_default_dict... OK

After that, I could create the user too, but also not use it yet to log-in because of the same gateway error.

Here is the log stuff when I get the gateway error when trying to log-in:

cvat_proxy    | 172.23.0.1 - - [30/Jul/2020:07:19:31 +0000] "POST /api/v1/auth/login HTTP/1.1" 502 559 "http://localhost:8080/auth/login" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"
cvat_proxy    | 2020/07/30 07:19:31 [error] 7#7: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.23.0.1, server: localhost, request: "POST /api/v1/auth/login HTTP/1.1", upstream: "http://172.23.0.4:8080/api/v1/auth/login", host: "localhost:8080", referrer: "http://localhost:8080/auth/login"

I do suspect these are layerd problems and the migration thing is a solution to the first one. There's some additional discussion about the original problem here:
pinax/django-user-accounts#179

@andyDoucette
Copy link

andyDoucette commented Jul 31, 2020

As far as reproducing goes: @azhavoro : Did you try removing your docker volumes and removing the cvat docker containers before doing a "docker-compose up"? That reproduces it for me every time on the release-1.1.0 branch.

@andyDoucette
Copy link

Ah HA!!! :-D I finally figured out why this happens for some people and not for others. It took me days, but I was able to do a binary search on the difference between my machine (where the installation instructions did NOT work) and a machine in the cloud (where the exact same install script worked). After starting with entire filesystems as potential differences, I eventually got it down to a single line in my .bashrc file. The line is this:

umask 077

So, it seems, that the ability to run and use cvat (even if I got past the superuser issue with the migration, the server would never actually work when this umask line was in place), depends on the user's umask!!!

This greatly simplifies the problem now, hopefully the point that someone can submit a patch for it. I don't know enough about the cvat system to determine why the umask is breaking the install process . I suspect it has something to do with permissions in the git clone but I haven't verified that yet. Can someone from the cvat team replicate this and maybe adjust the installation instructions to set any permissions as needed after the clone, or better yet, fix whatever permissions thing is happening? I think 077 should be a valid umask for people to work under.

If it helps, here's my install script - it's the same as your instructions, but in one place so it might be helpful for you.

set -xe 
sudo apt-get update
sudo apt-get upgrade -y

# start instructions from cvat

sudo apt-get --no-install-recommends install -y \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg-agent \
  software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) \
  stable"
  
sudo apt-get update
sudo apt-get --no-install-recommends install -y docker-ce docker-ce-cli containerd.io

sudo usermod -aG docker $USER

sudo apt-get --no-install-recommends install -y python3-pip

sudo apt-get install -y python3-setuptools
sudo python3 -m pip install docker-compose compose
sudo chown -R "$USER":"$USER" /usr/local/lib/python3.6/dist-packages


sudo apt-get --no-install-recommends install -y git
git clone https://github.com/opencv/cvat
cd cvat
git checkout 820f2c5724a50650f7325508152c3ee166ffe245

#docker-compose build

sudo su -ml "$USER" <<EOF
# TODO: Try to remove the -d
docker-compose up -d
EOF

echo 'sleeping 1m to make sure the server is up.'
sleep 60

# #Exit and re-log in and then do this.  If it errors, then you have the issue.  If it runs fine, then you don't.
# docker exec -it cvat bash -ic 'python3 ~/manage.py createsuperuser'

@andyDoucette
Copy link

Update: A sudo chmod -R o+rX . after the git clone ... and cd cvat makes it work even if I have umask 077 as my usermask. Seems to be a permissions thing on something in the repo. I recommend finding what that thing is and maybe changing permissions in the docker container. IMHO, people should be able to have restrictive permissions in their home dir.

@nmanovic nmanovic added the bug Something isn't working label Aug 3, 2020
@nmanovic nmanovic added this to the 1.1.0-release milestone Aug 3, 2020
@cyrilzakka
Copy link

This worked for me as well @andyDoucette. Thanks!

@andyDoucette
Copy link

andyDoucette commented Oct 6, 2020 via email

@laurianops
Copy link

This is exactly what happened to me,
after changing my django files running in docker, i simply lost access to the django admin, i saw that the problem was the postgresql volume, apparently for some reason i lost the database access credentials by django, the solution: delete the images, volumes and start all over again, with the python manage.py migrate and python manage.py createsuperuser commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants