Thread
#prefect-community
    o

    Oleg

    2 years ago
    Hi! I’m trying to run prefect server on virtual centos machine with custom .prefect/config.toml
    [server]
    
    host = "ip"
    port = "8081"
    url = "https://${server.host}:${server.port}"
    
    [ui]
    
    host = "<http://ip>"
    port = "8081"
    host_port = "8081"
    endpoint = "${ui.host}:${ui.port}"
    And after checking prefect.config in python, I see my custom properties:
    <Box: {'debug': False, 'home_dir': '/home/o.ilinsky/.prefect', 'backend': 'server', 'server': {'host': 'ip', 'port': 8081, 'host_port': 4200, 'endpoint': 'ip:8081', 'database': {'host': 'localhost', 'port': 5432, 'host_port': 5432, 'name': 'prefect_server', 'username': 'prefect', 'password': 'test-password', 'connection_url': '<postgresql://prefect:test-password@localhost:5432/prefect_server>', 'volume_path': '/home/o.ilinsky/.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>', 'graphql_url': '<http://localhost:4200/graphql>'}, 'telemetry': {'enabled': True}, 'url': '<https://ip:8081>'}, 'cloud': {'api': 'ip:8081', 'endpoint': '<https://api.prefect.io>', 'graphql': 'ip:8081/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'}}, 'ui': {'host': '<http://ip>', 'port': 8081, 'host_port': 8081, 'endpoint': '<http://ip:8081>', 'graphql_url': '<http://ip:4200>'}}>
    But server starts with localhost:8080 option:
    Visit <http://localhost:8080> to get started
    And nothing on 8081 port. I also tried to set env
    export PREFECT__USER_CONFIG_PATH=/home/o.ilinsky/.prefect/config.toml
    But it’s does’t work too. Do you know what I do wrong?) P.S. i’m new in prefect, so it may by stupid error 😃 ``````
    nicholas

    nicholas

    2 years ago
    Hi @Oleg - your config looks a little suspicious. For example the UI and Server (Apollo) ports are identical, which will mean one of them won't spin up (usually the UI). What's the setup you're trying to accomplish?
    o

    Oleg

    2 years ago
    Hi. @nicholas The problem, which I’m trying to fix is localhost in web UI links. Prefect is running on virtual server. For example, link to graphql looks like http://localhost:4200 and I want to fix it. Also I’d like to use another port for UI. I fixed conf file:
    [server]
    
    host = "my.ip"
    port = "8080"
    url = "https://${server.host}:${server.port}"
    
    [ui]
    
    host = "<http://my.ip>"
    port = "8081"
    host_port = "8081"
    endpoint = "${ui.host}:${ui.port}"
    graphql_url = "${ui.host}:${server.host_port}"
    But still ui on 8080 port.
    I’ve set ip of virtual machine in web UI and it fixed problem with localhost.
    nicholas

    nicholas

    2 years ago
    Hi @Oleg - does that mean you've got this figured out?
    o

    Oleg

    2 years ago
    @nicholas, partially yes) but I can’t change UI port 😃