Skip to content

Unable to create postgres production DB #10463

Open
@satonotdead

Description

Describe the bug

Docker instance shows the following after initial installation:

rails-1 | I, [2024-11-20T14:06:11.222161 #1] INFO -- : [5cfe37c2-305b-47de-96ac-53a9594f94a0] Completed 500 Internal Server Error in 20ms (ActiveRecord: 5.3ms | Allocations: 4184) rails-1 | F, [2024-11-20T14:06:11.223341 #1] FATAL -- : [5cfe37c2-305b-47de-96ac-53a9594f94a0] rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "installation_configs" does not exist rails-1 | LINE 9: WHERE a.attrelid = '"installation_configs"'::regclass rails-1 | ^ rails-1 | ): rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] app/models/installation_config.rb:29:in block in class:InstallationConfig'
rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] lib/global_config.rb:54:in db_fallback' rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] lib/global_config.rb:45:in load_from_cache'
rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] lib/global_config.rb:12:in block in get' rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] lib/global_config.rb:11:in each'
rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] lib/global_config.rb:11:in get' rails-1 | [5cfe37c2-305b-47de-96ac-53a9594f94a0] app/controllers/dashboard_controller.rb:18:in set_global_config'
rails-1 | I, [2024-11-20T14:06:11.950127 #1] INFO -- : [3eacd7fd-84aa-47f9-9fbe-d054eb23a750] Started GET "/favicon.ico" for 172.69.71.7 at 2024-11-20 14:06:11 +0000
rails-1 | F, [2024-11-20T14:06:11.951871 #1] FATAL -- : [3eacd7fd-84aa-47f9-9fbe-d054eb23a750]
rails-1 | [3eacd7fd-84aa-47f9-9fbe-d054eb23a750] ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
rails-1 | [3eacd7fd-84aa-47f9-9fbe-d054eb23a750]
-rails-1 | I, [2024-11-20T14:06:43.854491 #1] INFO -- : [78e77c48-916e-43a2-b921-c46fdc8dc993] Started GET "/" for 172.69.71.86 at 2024-11-20 14:06:43 +0000
rails-1 | I, [2024-11-20T14:06:43.856566 #1] INFO -- : [78e77c48-916e-43a2-b921-c46fdc8dc993] Processing by DashboardController#index as HTML
postgres-1 | 2024-11-20 14:06:43.858 UTC [80] ERROR: relation "installation_configs" does not exist at character 491
postgres-1 | 2024-11-20 14:06:43.858 UTC [80] STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
postgres-1 | pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
postgres-1 | c.collname, col_description(a.attrelid, a.attnum) AS comment,
postgres-1 | attgenerated as attgenerated
postgres-1 | FROM pg_attribute a
postgres-1 | LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
postgres-1 | LEFT JOIN pg_type t ON a.atttypid = t.oid
postgres-1 | LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
postgres-1 | WHERE a.attrelid = '"installation_configs"'::regclass
postgres-1 | AND a.attnum > 0 AND NOT a.attisdropped
postgres-1 | ORDER BY a.attnum
postgres-1 |
rails-1 | I, [2024-11-20T14:06:43.858803 #1] INFO -- : [78e77c48-916e-43a2-b921-c46fdc8dc993] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.8ms | Allocations: 453)
rails-1 | F, [2024-11-20T14:06:43.859898 #1] FATAL -- : [78e77c48-916e-43a2-b921-c46fdc8dc993]
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "installation_configs" does not exist
rails-1 | LINE 9: WHERE a.attrelid = '"installation_configs"'::regclass
rails-1 | ^
rails-1 | ):
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993]
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] app/models/installation_config.rb:29:in block in <class:InstallationConfig>' rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] lib/global_config.rb:54:in db_fallback'
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] lib/global_config.rb:45:in load_from_cache' rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] lib/global_config.rb:12:in block in get'
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] lib/global_config.rb:11:in each' rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] lib/global_config.rb:11:in get'
rails-1 | [78e77c48-916e-43a2-b921-c46fdc8dc993] app/controllers/dashboard_controller.rb:18:in set_global_config'

Read similar issues without a solution on #2590 #5476 #2351. I can debug and complete with more info is needed.

To Reproduce

Follow the official installation guides (on Docker).

Expected behavior

Initil script creates the DB.

Environment

Linux VM

Cloud Provider

None

Platform

None

Operating system

Linux x86_64

Browser and version

No response

Docker (if applicable)

Docker Compose version v2.29.7

Additional context

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions