Kyle
10/26/2020, 11:47 AMWARNING: The PREFECT_SERVER_DB_CMD variable is not set. Defaulting to a blank string.
WARNING: The DB_CONNECTION_URL variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_DB variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The POSTGRES_USER variable is not set. Defaulting to a blank string.
Creating network "prefect-server" with the default driver
Creating tmp_postgres_1 ... done
Creating tmp_hasura_1 ... done
Creating tmp_graphql_1 ... done
Creating tmp_towel_1 ... done
Creating tmp_apollo_1 ... done
Creating tmp_ui_1 ... done
Attaching to tmp_postgres_1, tmp_hasura_1, tmp_graphql_1, tmp_towel_1, tmp_apollo_1, tmp_ui_1
graphql_1 | bash: -c: line 0: syntax error near unexpected token `&&'
graphql_1 | bash: -c: line 0: ` && python src/prefect_server/services/graphql/server.py'
hasura_1 | {"type":"pg-client","timestamp":"2020-10-26T11:45:30.504+0000","level":"warn","detail":{"message":"postgres connection failed, retrying(0)."}}
hasura_1 | {"type":"pg-client","timestamp":"2020-10-26T11:45:30.504+0000","level":"warn","detail":{"message":"postgres connection failed, retrying(1)."}}
hasura_1 | {"type":"startup","timestamp":"2020-10-26T11:45:30.504+0000","level":"error","detail":{"kind":"db_migrate","info":{"internal":"could not connect to server: No such file or directory\n\tIs the server running locally and accepting\n\tconnections on Unix domain socket \"/var/run/postgresql/.s.PGSQL.5432\"?\n","path":"$","error":"connection error","code":"postgres-error"}}}
ui_1 | πΎπΎπΎ UI running at localhost:8080 πΎπΎπΎ
postgres_1 | Error: Database is uninitialized and superuser password is not specified.
postgres_1 | You must specify POSTGRES_PASSWORD to a non-empty value for the
postgres_1 | superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
postgres_1 |
postgres_1 | You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
postgres_1 | connections without a password. This is *not* recommended.
postgres_1 |
postgres_1 | See PostgreSQL documentation about "trust":
postgres_1 | <https://www.postgresql.org/docs/current/auth-trust.html>
tmp_hasura_1 exited with code 1
tmp_graphql_1 exited with code 1
tmp_postgres_1 exited with code 1
Billy McMonagle
10/26/2020, 1:16 PMKyle
10/26/2020, 1:23 PM(venv) shark@shark-H310M-S2-2-0:~/Documents/prefect$ prefect config
{'debug': False, 'home_dir': '/home/shark/.prefect', 'backend': 'cloud', 'server': {'host': '<http://localhost>', 'port': 4200, 'host_port': 4200, 'endpoint': '<http://localhost:4200>', 'database': {'host': 'localhost', 'port': 5432, 'host_port': 5432, 'name': 'prefect_server', 'username': 'postgres', 'password': 'postgres', 'connection_url': '<postgresql://postgres:postgres@localhost:5432/prefect_server>', 'volume_path': '/home/shark/.prefect/pg_data/'}, 'graphql': {'host': '0.0.0.0', 'port': 4201, 'host_port': 4201, 'debug': False, 'path': '/graphql/'}, 'hasura': {'host': 'localhost', 'port': 3000, 'host_port': 3000, 'admin_secret': '', 'claims_namespace': 'hasura-claims', 'graphql_url': '<http://localhost:3000/v1alpha1/graphql>', 'ws_url': '<ws://localhost:3000/v1alpha1/graphql>', 'execute_retry_seconds': 10}, 'ui': {'host': '<http://localhost>', 'port': 8080, 'host_port': 8080, 'endpoint': '<http://localhost:8080>', 'apollo_url': '<http://localhost:4200/graphql>'}, 'telemetry': {'enabled': True}}, 'cloud': {'api': '<https://api.prefect.io>', 'endpoint': '<https://api.prefect.io>', 'graphql': '<https://api.prefect.io/graphql>', 'use_local_secrets': True, 'heartbeat_interval': 30.0, 'check_cancellation_interval': 15.0, 'diagnostics': False, 'logging_heartbeat': 5, 'queue_interval': 30.0, 'agent': {'name': 'agent', 'labels': [], 'level': 'INFO', 'auth_token': '', 'agent_address': '', 'resource_manager': {'loop_interval': 60}}}, 'logging': {'level': 'INFO', 'format': '[%(asctime)s] %(levelname)s - %(name)s | %(message)s', 'log_attributes': [], 'datefmt': '%Y-%m-%d %H:%M:%S', 'log_to_cloud': False, 'extra_loggers': []}, 'flows': {'eager_edge_validation': False, 'run_on_schedule': True, 'checkpointing': False, 'defaults': {'storage': {'add_default_labels': True, 'default_class': 'prefect.environments.storage.Local'}}}, 'tasks': {'defaults': {'max_retries': 0, 'retry_delay': None, 'timeout': None}}, 'engine': {'executor': {'default_class': 'prefect.engine.executors.LocalExecutor', 'dask': {'address': '', 'cluster_class': 'distributed.deploy.local.LocalCluster'}}, 'flow_runner': {'default_class': 'prefect.engine.flow_runner.FlowRunner'}, 'task_runner': {'default_class': 'prefect.engine.task_runner.TaskRunner'}}}
prefect backend server
) and start the prefect server running this command: prefect server start
Billy McMonagle
10/26/2020, 1:59 PMprefect server start
should mean that you're using the default docker-compose.yml
, which lives here https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/docker-compose.yml~/.prefect/config.toml
file that doesn't have a postgres password setKyle
10/26/2020, 4:27 PM[server]
[server.database]
username = "postgres"
password = "postgres"
volume_path = "~/.prefect/pg_data/"
Billy McMonagle
10/26/2020, 5:03 PMname = "your_db_name
Kyle
10/26/2020, 5:05 PMBilly McMonagle
10/26/2020, 5:08 PMparameter :postgres_user, type: :String, default: "prefect"
parameter :postgres_password, type: :String, default: "test-password"
parameter :postgres_db, type: :String, default: "prefect_server"
Kyle
10/26/2020, 5:10 PMBilly McMonagle
10/26/2020, 5:11 PMprefect
CLI command.Kyle
10/26/2020, 5:12 PMBilly McMonagle
10/26/2020, 5:13 PMKyle
10/26/2020, 5:14 PMBilly McMonagle
10/26/2020, 5:21 PMKyle
10/26/2020, 5:23 PM[server]
[server.database]
name = "prefect_server"
username = "postgres"
password = "postgres"
volume_path = "~/.prefect/pg_data/"
Billy McMonagle
10/26/2020, 5:25 PMdocker system prune
to cleanup your local system.docker run --rm --name pg-docker -e POSTGRES_PASSWORD=password -p 5432:5432 postgres
Kyle
10/26/2020, 5:31 PMdocker system prune -a
) and run it again. although I already did it before adding the name
property to the config.toml file.Billy McMonagle
10/26/2020, 5:32 PMKyle
10/26/2020, 5:34 PMJesper van Dijke
10/27/2020, 12:19 AMlocal/bin/prefect server start
not directly in your home, it will then use the toml.
Search and read my comments here from the last few days, encountered the same problem...
docker-compose will probably need a .env
fileKyle
10/27/2020, 12:24 AMbin
directory within .local
.(venv) shark@shark-H310M-S2-2-0:~/Documents/prefect$ ~/.local/
lib/ share/