question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi @vsoch !

Due to my employer not being keen on using S3 buckets for hosting the images (and paying for it…), I am now looking into setting up an sregistry server myself on site. Due to Docker being currently unsupported by our IT dept, I am running my test on a freshly spun up AWS LightSail instance running Ubuntu Xenial. After following your instructions I got something up and running (even with https!), but I am seeing a Django error when launching docker-compose up, which appears to stop the website from functioning properly: trying to login results in even more Django related errors…

I think this is very similar to #48

Any thoughts?

Here is the output I am currently getting:

> docker-compose up
Creating sregistry_redis_1
Creating sregistry_db_1
Creating sregistry_uwsgi_1
Creating sregistry_nginx_1
Creating sregistry_scheduler_1
Creating sregistry_worker_1
Attaching to sregistry_redis_1, sregistry_db_1, sregistry_uwsgi_1, sregistry_worker_1, sregistry_nginx_1, sregistry_scheduler_1
redis_1      | 1:C 11 Jul 2019 16:39:36.642 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1      | 1:C 11 Jul 2019 16:39:36.647 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1      | 1:C 11 Jul 2019 16:39:36.647 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1      | 1:M 11 Jul 2019 16:39:36.648 * Running mode=standalone, port=6379.
redis_1      | 1:M 11 Jul 2019 16:39:36.648 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1      | 1:M 11 Jul 2019 16:39:36.648 # Server initialized
redis_1      | 1:M 11 Jul 2019 16:39:36.648 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1      | 1:M 11 Jul 2019 16:39:36.648 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1      | 1:M 11 Jul 2019 16:39:36.648 * Ready to accept connections
db_1         | The files belonging to this database system will be owned by user "postgres".
db_1         | This user must also own the server process.
db_1         | 
db_1         | The database cluster will be initialized with locale "en_US.utf8".
db_1         | The default database encoding has accordingly been set to "UTF8".
db_1         | The default text search configuration will be set to "english".
db_1         | 
db_1         | Data page checksums are disabled.
db_1         | 
db_1         | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1         | creating subdirectories ... ok
db_1         | selecting default max_connections ... 100
db_1         | selecting default shared_buffers ... 128MB
db_1         | selecting default timezone ... Etc/UTC
db_1         | selecting dynamic shared memory implementation ... posix
db_1         | creating configuration files ... ok
db_1         | running bootstrap script ... ok
db_1         | performing post-bootstrap initialization ... ok
db_1         | syncing data to disk ... ok
db_1         | 
db_1         | WARNING: enabling "trust" authentication for local connections
db_1         | You can change this by editing pg_hba.conf or using the option -A, or
db_1         | --auth-local and --auth-host, the next time you run initdb.
db_1         | 
db_1         | Success. You can now start the database server using:
db_1         | 
db_1         |     pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1         | 
db_1         | ****************************************************
db_1         | WARNING: No password has been set for the database.
db_1         |          This will allow anyone with access to the
db_1         |          Postgres port to access your database. In
db_1         |          Docker's default configuration, this is
db_1         |          effectively any other container on the same
db_1         |          system.
db_1         | 
db_1         |          Use "-e POSTGRES_PASSWORD=password" to set
db_1         |          it in "docker run".
db_1         | ****************************************************
db_1         | waiting for server to start....2019-07-11 16:39:39.741 UTC [41] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1         | 2019-07-11 16:39:39.777 UTC [42] LOG:  database system was shut down at 2019-07-11 16:39:39 UTC
db_1         | 2019-07-11 16:39:39.792 UTC [41] LOG:  database system is ready to accept connections
db_1         |  done
db_1         | server started
db_1         | 
db_1         | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1         | 
db_1         | 2019-07-11 16:39:39.807 UTC [41] LOG:  received fast shutdown request
db_1         | waiting for server to shut down....2019-07-11 16:39:39.809 UTC [41] LOG:  aborting any active transactions
db_1         | 2019-07-11 16:39:39.820 UTC [41] LOG:  background worker "logical replication launcher" (PID 48) exited with exit code 1
db_1         | 2019-07-11 16:39:39.828 UTC [43] LOG:  shutting down
db_1         | 2019-07-11 16:39:39.843 UTC [41] LOG:  database system is shut down
db_1         |  done
db_1         | server stopped
db_1         | 
db_1         | PostgreSQL init process complete; ready for start up.
db_1         | 
db_1         | 2019-07-11 16:39:39.941 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1         | 2019-07-11 16:39:39.941 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1         | 2019-07-11 16:39:39.945 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1         | 2019-07-11 16:39:39.982 UTC [50] LOG:  database system was shut down at 2019-07-11 16:39:39 UTC
db_1         | 2019-07-11 16:39:39.989 UTC [1] LOG:  database system is ready to accept connections
uwsgi_1      | No changes detected
worker_1     | 11:39:43 RQ worker 'rq:worker:eb0c8ac5250d45e283b411c0ee699dc0' started, version 1.0
worker_1     | 11:39:43 *** Listening on default...
worker_1     | 11:39:43 Cleaning registries for queue: default
scheduler_1  | 11:39:43 Registering birth
uwsgi_1      | Operations to perform:
uwsgi_1      |   Apply all migrations: auth
uwsgi_1      | Running migrations:
uwsgi_1      |   Applying contenttypes.0001_initial... OK
uwsgi_1      |   Applying contenttypes.0002_remove_content_type_name... OK
uwsgi_1      |   Applying auth.0001_initial... OK
uwsgi_1      |   Applying auth.0002_alter_permission_name_max_length... OK
uwsgi_1      |   Applying auth.0003_alter_user_email_max_length... OK
uwsgi_1      |   Applying auth.0004_alter_user_username_opts... OK
uwsgi_1      |   Applying auth.0005_alter_user_last_login_null... OK
uwsgi_1      |   Applying auth.0006_require_contenttypes_0002... OK
uwsgi_1      |   Applying auth.0007_alter_validators_add_error_messages... OK
uwsgi_1      |   Applying auth.0008_alter_user_username_max_length... OK
uwsgi_1      |   Applying auth.0009_alter_user_last_name_max_length... OK
uwsgi_1      |   Applying auth.0010_alter_group_name_max_length... OK
uwsgi_1      |   Applying auth.0011_update_proxy_permissions... OK
uwsgi_1      | Operations to perform:
uwsgi_1      |   Apply all migrations: admin, auth, authtoken, contenttypes, sessions, social_django, taggit
uwsgi_1      | Running migrations:
db_1         | 2019-07-11 16:39:46.529 UTC [59] ERROR:  relation "users_user" does not exist
db_1         | 2019-07-11 16:39:46.529 UTC [59] STATEMENT:  ALTER TABLE "django_admin_log" ADD CONSTRAINT "django_admin_log_user_id_c564eba6_fk_users_user_id" FOREIGN KEY ("user_id") REFERENCES "users_user" ("id") DEFERRABLE INITIALLY DEFERRED
uwsgi_1      |   Applying admin.0001_initial...Traceback (most recent call last):
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 84, in _execute
uwsgi_1      |     return self.cursor.execute(sql, params)
uwsgi_1      | psycopg2.errors.UndefinedTable: relation "users_user" does not exist
uwsgi_1      | 
uwsgi_1      | 
uwsgi_1      | The above exception was the direct cause of the following exception:
uwsgi_1      | 
uwsgi_1      | Traceback (most recent call last):
uwsgi_1      |   File "manage.py", line 8, in <module>
uwsgi_1      |     execute_from_command_line(sys.argv)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
uwsgi_1      |     utility.execute()
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/__init__.py", line 375, in execute
uwsgi_1      |     self.fetch_command(subcommand).run_from_argv(self.argv)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 323, in run_from_argv
uwsgi_1      |     self.execute(*args, **cmd_options)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 364, in execute
uwsgi_1      |     output = self.handle(*args, **options)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 83, in wrapped
uwsgi_1      |     res = handle_func(*args, **kwargs)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 234, in handle
uwsgi_1      |     fake_initial=fake_initial,
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/migrations/executor.py", line 117, in migrate
uwsgi_1      |     state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
uwsgi_1      |     state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/migrations/executor.py", line 247, in apply_migration
uwsgi_1      |     migration_recorded = True
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 110, in __exit__
uwsgi_1      |     self.execute(sql)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 137, in execute
uwsgi_1      |     cursor.execute(sql, params)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 67, in execute
uwsgi_1      |     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
uwsgi_1      |     return executor(sql, params, many, context)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 84, in _execute
uwsgi_1      |     return self.cursor.execute(sql, params)
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/utils.py", line 89, in __exit__
uwsgi_1      |     raise dj_exc_value.with_traceback(traceback) from exc_value
uwsgi_1      |   File "/usr/local/lib/python3.5/site-packages/django/db/backends/utils.py", line 84, in _execute
uwsgi_1      |     return self.cursor.execute(sql, params)
uwsgi_1      | django.db.utils.ProgrammingError: relation "users_user" does not exist
uwsgi_1      | 
uwsgi_1      | 
uwsgi_1      | 0 static files copied to '/var/www/static', 340 unmodified.
uwsgi_1      | Starting periodic command scheduler: cron.
uwsgi_1      | [uWSGI] getting INI configuration from uwsgi.ini
uwsgi_1      | Thu Jul 11 16:39:47 2019 - *** Starting uWSGI 2.0.18 (64bit) on [Thu Jul 11 16:39:47 2019] ***
uwsgi_1      | Thu Jul 11 16:39:47 2019 - compiled with version: 6.3.0 20170516 on 09 July 2019 12:59:31
uwsgi_1      | Thu Jul 11 16:39:47 2019 - os: Linux-4.4.0-1052-aws #61-Ubuntu SMP Mon Feb 12 23:05:58 UTC 2018
uwsgi_1      | Thu Jul 11 16:39:47 2019 - nodename: 9f8b89931064
uwsgi_1      | Thu Jul 11 16:39:47 2019 - machine: x86_64
uwsgi_1      | Thu Jul 11 16:39:47 2019 - clock source: unix
uwsgi_1      | Thu Jul 11 16:39:47 2019 - pcre jit disabled
uwsgi_1      | Thu Jul 11 16:39:47 2019 - detected number of CPU cores: 1
uwsgi_1      | Thu Jul 11 16:39:47 2019 - current working directory: /code
uwsgi_1      | Thu Jul 11 16:39:47 2019 - detected binary path: /usr/local/bin/uwsgi
uwsgi_1      | Thu Jul 11 16:39:47 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
uwsgi_1      | Thu Jul 11 16:39:47 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
uwsgi_1      | Thu Jul 11 16:39:47 2019 - chdir() to /code/
uwsgi_1      | Thu Jul 11 16:39:47 2019 - your memory page size is 4096 bytes
uwsgi_1      | Thu Jul 11 16:39:47 2019 - detected max file descriptor number: 1048576
uwsgi_1      | Thu Jul 11 16:39:47 2019 - lock engine: pthread robust mutexes
uwsgi_1      | Thu Jul 11 16:39:47 2019 - thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi_1      | Thu Jul 11 16:39:47 2019 - uwsgi socket 0 bound to TCP address :3031 fd 3
uwsgi_1      | Thu Jul 11 16:39:47 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
uwsgi_1      | Thu Jul 11 16:39:47 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
uwsgi_1      | Thu Jul 11 16:39:47 2019 - Python version: 3.5.7 (default, Jun 11 2019, 01:40:46)  [GCC 6.3.0 20170516]
uwsgi_1      | Thu Jul 11 16:39:47 2019 - Python main interpreter initialized at 0x559d82fddd00
uwsgi_1      | Thu Jul 11 16:39:47 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
uwsgi_1      | Thu Jul 11 16:39:47 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
uwsgi_1      | Thu Jul 11 16:39:47 2019 - python threads support enabled
uwsgi_1      | Thu Jul 11 16:39:47 2019 - your server socket listen backlog is limited to 100 connections
uwsgi_1      | Thu Jul 11 16:39:47 2019 - your mercy for graceful operations on workers is 60 seconds
uwsgi_1      | Thu Jul 11 16:39:47 2019 - mapped 521440 bytes (509 KB) for 16 cores
uwsgi_1      | Thu Jul 11 16:39:47 2019 - *** Operational MODE: preforking+threaded ***
uwsgi_1      | Thu Jul 11 11:39:47 2019 - WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x559d82fddd00 pid: 25 (default app)
uwsgi_1      | Thu Jul 11 11:39:47 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
uwsgi_1      | Thu Jul 11 11:39:47 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
uwsgi_1      | Thu Jul 11 11:39:47 2019 - *** uWSGI is running in multiple interpreter mode ***
uwsgi_1      | Thu Jul 11 11:39:47 2019 - spawned uWSGI master process (pid: 25)
uwsgi_1      | Thu Jul 11 11:39:47 2019 - spawned uWSGI worker 1 (pid: 27, cores: 4)
uwsgi_1      | Thu Jul 11 11:39:47 2019 - spawned uWSGI worker 2 (pid: 28, cores: 4)
uwsgi_1      | Thu Jul 11 11:39:47 2019 - spawned uWSGI worker 3 (pid: 29, cores: 4)
uwsgi_1      | Thu Jul 11 11:39:47 2019 - spawned uWSGI worker 4 (pid: 30, cores: 4)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
tschoonjcommented, Jul 11, 2019

slow?? I don’t know anyone who responds as fast as you!

This is not urgent anyway. Please take all the time you need.

Thanks again!

0reactions
vsochcommented, Jul 11, 2019

It’s not actually organized very well, and it’s been bothering me for a few months. I made this simple template for a very basic documentation base, and this one has gotten a little bit too big! But now I have a new project to do… so you can expect probably some work on better docs over this weekend 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Django documentation
This page contains some advice about errors and problems commonly encountered during the development of Django applications.
Read more >
Django In Trouble - YouTube
Hi, we're the beagle boys, fater and son. But my hoo-man told me to call him brother. Anyway, let's continue our adventures with...
Read more >
Top 10 Mistakes That Django Developers Make - Toptal
Mistake No. 1: Using the Global System Python Environment for Project Dependencies · Mistake No. 2: Not Pinning Project Dependencies in a requirements....
Read more >
Finding and Fixing Django N+1 Problems | Product Blog • Sentry
The Django Python framework allows people to build websites extremely ... One common database problem is that ORMs can cause N+1 queries.
Read more >
10 Django Trouble Spots for Beginners - Code
10 Django Trouble Spots for Beginners · 1. It's Not a CMS · 2. Local Environment Setup · 3. Projects vs. Apps ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found