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.

Database issues when following docker install guide

See original GitHub issue

The documentation says to run:

docker-compose -p citadel up -d
docker-compose -p citadel -f docker-compose.yml -f docker-compose.migrate.yml run --rm migrate

I ran those with no apparent issues.

The documentation then says:

If you visit http://localhost:3333, you will get redirected to the installation screen so that you can create the first system user.

When I surf to the page, it brings me to a login screen, not a setup screen to create the first user. This is printed in the log:

postgres_1  | 2020-07-21 20:34:14.735 UTC [27] ERROR:  relation "system_options" does not exist at character 59
postgres_1  | 2020-07-21 20:34:14.735 UTC [27] STATEMENT:  -- name: GetSystemOptionByKey :one
postgres_1  | 	SELECT key, value FROM system_options WHERE key = $1
postgres_1  | 	
web_1       | time="21-07-2020 20:34:14" level=error msg="get system option" error="pq: relation \"system_options\" does not exist"
postgres_1  | 2020-07-21 20:34:14.804 UTC [27] ERROR:  relation "system_options" does not exist at character 59
postgres_1  | 2020-07-21 20:34:14.804 UTC [27] STATEMENT:  -- name: GetSystemOptionByKey :one
postgres_1  | 	SELECT key, value FROM system_options WHERE key = $1
postgres_1  | 	
web_1       | time="21-07-2020 20:34:14" level=error msg="get system option" error="pq: relation \"system_options\" does not exist"
postgres_1  | 2020-07-21 20:34:28.013 UTC [27] ERROR:  relation "user_account" does not exist at character 174
postgres_1  | 2020-07-21 20:34:28.013 UTC [27] STATEMENT:  -- name: GetUserAccountByUsername :one
postgres_1  | 	SELECT user_id, created_at, email, username, password_hash, profile_bg_color, full_name, initials, profile_avatar_url, role_code FROM user_account WHERE username = $1
postgres_1  | 	

Trying to sign in with admin/admin produces this:

web_1       | time="21-07-2020 20:34:28" level=warning msg="user account not found" username=admin

I’ve tried stopping the docker containers, removing them, and removing the volumes and then running it again with no luck.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
tioniscommented, Jul 21, 2020

I can reproduce this as of 70802ff4c950e08391e2883a31c0bd462585692a.

0reactions
JadeVanecommented, Sep 25, 2021

Same here. I got a login page when visited http://localhost:3333 after running taskcafe for the first time, so I am not able to create the first user now.

BTW, I build taskcate from source code, and run the command below to try to get it work

# login to postgresql
sudo -u postgres psql

# create database
CREATE DATABASE taskcafe OWNER taskcafe;
GRANT ALL PRIVILEGES ON DATABASE taskcafe TO taskcafe;

# fix a bug
sudo -u postgres psql taskcafe -c 'CREATE EXTENSION "uuid-ossp";'

# run taskcafe
./taskcafe migrate --config config.toml 
./taskcafe web --config config.toml

the bug above means I will get the error message below when I run ./taskcafe migrate --config config.toml follow the documents

Error: migration failed: permission denied to create extension "uuid-ossp" in line 0: CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

CREATE TABLE refresh_token (
  token_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
  user_id uuid NOT NULL,
  created_at timestamptz NOT NULL,
  expires_at timestamptz NOT NULL
);
 (details: pq: permission denied to create extension "uuid-ossp")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Grafana "query data error" after following docker installation ...
Recently installed teslamate (latest) in QNAPs container station according to docker installation guide. No local modifications on the yml file ...
Read more >
How to Debug and Fix Common Docker Issues - DigitalOcean
In this troubleshooting guide aimed at people new to Docker, you'll troubleshoot problems when building Docker images, resolve naming collisions ...
Read more >
Overview | Docker Documentation
Overview. Welcome! We're excited that you want to learn Docker. This guide contains step-by-step instructions on how to get started with Docker.
Read more >
Overview | Docker Documentation
Troubleshooting, logs, and known issues. ... The Troubleshoot page contains the following options: Restart Docker Desktop. Select to restart Docker Desktop.
Read more >
Control startup and shutdown order in Compose
How to control service startup and shutdown order in Docker Compose.
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