Skip to content

Homepage is all blank #1914

Closed
Closed

Description

@jb4652

Problem:
Setup up on an Ubuntu 24.04 Server, all commands run smooth except one shown below:

  1. localhost:80 all page blank.
  2. localhost:8000 will show homepage, but layout is strange. All logo images are missing, while login with admin account is OK. The pop up menu, e.g. "Benchmarks" can not be shown by click the small triangle besides it.
  3. localhost:9000 will indirected to localhost:9000/minio/login. the page seems OK and by login using the default Access Key and Secret Key, no table/data shown in the web page.

Only command running with error:
sudo docker compose exec django ./manage.py generate_data
error:
WARN[0000] The "RABBITMQ_HTTP_PROXY" variable is not set. Defaulting to a blank string.
WARN[0000] The "RABBITMQ_HTTPS_PROXY" variable is not set. Defaulting to a blank string.
WARN[0000] The "RABBITMQ_NO_PROXY" variable is not set. Defaulting to a blank string.
WARN[0000] /home/github/codalab/codabench/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
Creating data of size 3 with an admin account.
Traceback (most recent call last):
File "/app/./manage.py", line 15, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/app/src/apps/commands/management/commands/generate_data.py", line 49, in handle
comp = CompetitionFactory(created_by=user)
File "/usr/local/lib/python3.9/site-packages/factory/base.py", line 46, in call
return cls.create(**kwargs)
File "/usr/local/lib/python3.9/site-packages/factory/base.py", line 563, in create
return cls._generate(enums.CREATE_STRATEGY, kwargs)
File "/usr/local/lib/python3.9/site-packages/factory/base.py", line 500, in _generate
return step.build()
File "/usr/local/lib/python3.9/site-packages/factory/builder.py", line 276, in build
instance = self.factory_meta.instantiate(
File "/usr/local/lib/python3.9/site-packages/factory/base.py", line 314, in instantiate
return self.factory._create(model, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/factory/django.py", line 165, in _create
return manager.create(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 422, in create
obj.save(force_insert=True, using=self.db)
File "/app/src/apps/competitions/models.py", line 273, in save
super().save(*args, **kwargs)
File "/app/src/apps/chahub/models.py", line 109, in save
super().save(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 873, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 910, in _do_insert
return manager._insert([self], fields=fields, return_id=update_pk,
File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1186, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1376, in execute_sql
for sql, params in self.as_sql():
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1318, in as_sql
value_rows = [
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1319, in
[self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1319, in
[self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1270, in pre_save_val
return field.pre_save(obj, add=True)
File "/usr/local/lib/python3.9/site-packages/django/db/models/fields/files.py", line 289, in pre_save
file.save(file.name, file.file, save=False)
File "/usr/local/lib/python3.9/site-packages/django/db/models/fields/files.py", line 88, in save
self.name = self.storage.save(name, content, max_length=self.field.max_length)
File "/usr/local/lib/python3.9/site-packages/django/core/files/storage.py", line 54, in save
name = self._save(name, content)
File "/usr/local/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 491, in _save
self._save_content(obj, content, parameters=parameters)
File "/usr/local/lib/python3.9/site-packages/storages/backends/s3boto3.py", line 506, in _save_content
obj.upload_fileobj(content, ExtraArgs=put_parameters)
File "/usr/local/lib/python3.9/site-packages/boto3/s3/inject.py", line 619, in object_upload_fileobj
return self.meta.client.upload_fileobj(
File "/usr/local/lib/python3.9/site-packages/boto3/s3/inject.py", line 539, in upload_fileobj
return future.result()
File "/usr/local/lib/python3.9/site-packages/s3transfer/futures.py", line 73, in result
return self._coordinator.result()
File "/usr/local/lib/python3.9/site-packages/s3transfer/futures.py", line 233, in result
raise self._exception
File "/usr/local/lib/python3.9/site-packages/s3transfer/tasks.py", line 126, in call
return self._execute_main(kwargs)
File "/usr/local/lib/python3.9/site-packages/s3transfer/tasks.py", line 150, in _execute_main
return_value = self._main(**kwargs)
File "/usr/local/lib/python3.9/site-packages/s3transfer/upload.py", line 692, in _main
client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist

Activity

  1. ihsaan-ullah commented on Jul 7, 2025

    @ihsaan-ullah
    Collaborator

    Have you run this command?

    docker compose exec django ./manage.py collectstatic --noinput
    
  2. ihsaan-ullah commented on Jul 7, 2025

    @ihsaan-ullah
    Collaborator

    On my side localhost:80 works fine. Can you check your djnago container logs for any errors when you access localhost

  3. added
    Setup
    on Jul 8, 2025
  4. jb4652 commented on Jul 9, 2025

    @jb4652
    Author

    Have you run this command?

    docker compose exec django ./manage.py collectstatic --noinput
    

    After running sudo docker compose up -d, I got:
    WARN[0000] The "RABBITMQ_HTTP_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] The "RABBITMQ_HTTPS_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] The "RABBITMQ_NO_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] /home/github/codalab/codabench/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
    [+] Running 11/11
    ✔ Container codabench-builder-1 Running 0.0s
    ✔ Container codabench-redis-1 Running 0.0s
    ✔ Container codabench-db-1 Running 0.0s
    ✔ Container codabench-rabbit-1 Running 0.0s
    ✔ Container codabench-minio-1 Healthy 0.5s
    ✔ Container codabench-flower-1 Running 0.0s
    ✔ Container codabench-site_worker-1 Running 0.0s
    ✔ Container codabench-django-1 Running 0.0s
    ✔ Container codabench-createbuckets-1 Running 0.0s
    ✔ Container codabench-compute_worker-1 Running 0.0s
    ✔ Container codabench-caddy-1 Running 0.0s

    And after running sudo docker compose exec django ./manage.py generate_data , I got the above mentioned errors. After that, I indeed run sudo docker compose exec django ./manage.py collectstatic --noinput and the results are as follows:
    WARN[0000] The "RABBITMQ_HTTP_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] The "RABBITMQ_HTTPS_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] The "RABBITMQ_NO_PROXY" variable is not set. Defaulting to a blank string.
    WARN[0000] /home/github/codalab/codabench/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion

    0 static files copied to '/app/src/staticfiles', 308 unmodified.

  5. jb4652 commented on Jul 9, 2025

    @jb4652
    Author

    On my side localhost:80 works fine. Can you check your djnago container logs for any errors when you access localhost

    Could you please tell me where and how to inspect the django container logs as I am new to web development and only would like to deploy my own codabench instance, thank you.

  6. curious-broccoli commented on Jul 9, 2025

    @curious-broccoli
    Contributor

    I had this error (missing static files) a few times after my server restarted but I think not consistently.

    I think check the logs of the builder container docker compose logs builder to check for errors

    Otherwise try docker compose down and docker compose up -d again and I think that fixes it

  7. ihsaan-ullah commented on Jul 9, 2025

    @ihsaan-ullah
    Collaborator

    I have never used sudo docker compose exec django ./manage.py generate_data. Maybe skip it for now and check if everything else work. For django logs I think you need sudo docker compose logs django

  8. ihsaan-ullah commented on Jul 9, 2025

    @ihsaan-ullah
    Collaborator

    @jb4652 I am also deploying codabench instance. I followed the documentation and skipped the generate data. Everything seems ok on my side
    I access my instance using the IP like this http://<IP-ADDRESS>:8000/

  9. Didayolo commented on Jul 15, 2025

    @Didayolo
    Member

    Also, have you run the Django migration?

    docker compose exec django ./manage.py migrate
    
  10. Didayolo commented on Aug 5, 2025

    @Didayolo
    Member

    Any update on this?

    I close it as it is staling, but feel free to re-engage if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Setup

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions