https://prefect.io logo
#prefect-community
Title
# prefect-community
p

Praveen Chaudhary

04/27/2022, 10:25 AM
i am able to see projects under command prefect get projects
a

Anna Geller

04/27/2022, 10:31 AM
Can you send a screenshot of both your terminal output and what you see in the UI? You should see the same output on this UI page https://cloud.prefect.io/team/projects
p

Praveen Chaudhary

04/27/2022, 11:06 AM
i am using prefect server on ubuntu machine
import prefect from prefect import task, Flow,Client @task def hello_task(): logger = prefect.context.get("logger") logger.info("Hello world!") with Flow("hello-flow") as flow: hello_task() state = flow.run() cl = Client() #cl.register(flow,project_name="pkc1") flow.register(project_name="pkc1")
this the script
a

Anna Geller

04/27/2022, 11:16 AM
thanks for sharing your screenshot! I found the problem - your browser can't connect to your GraphQL API - that's why it's loading forever. Here is how you can fix it:
Copy code
[server]
endpoint = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"

  [server.ui]
    apollo_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
more on that here
p

Praveen Chaudhary

04/27/2022, 11:31 AM
no config.toml
grpahql page accessible
a

Anna Geller

04/27/2022, 11:37 AM
you can create this file yourself
are you doing everything from the same machine? or is Server running on a VM and you access the UI from another machine? You need this config.toml addition on the machine from which you access the UI Also, how did you start your Server? You may need to add the --expose flag:
Copy code
prefect server start --expose --use-volume
p

Praveen Chaudhary

04/27/2022, 11:41 AM
yes
Copy code
prefect server start --expose
i am running prefect on server and accessing UI on local laptop via tunneling
a

Anna Geller

04/27/2022, 11:46 AM
Thanks for explaining, so you need to add the file ~/.prefect/config.toml:
Copy code
[server]
endpoint = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"

  [server.ui]
    apollo_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
p

Praveen Chaudhary

04/27/2022, 3:12 PM
@Anna Geller still same after adding config.toml
a

Anna Geller

04/27/2022, 3:25 PM
Can you try to restart your server? Is your port 4200 open to allow access?
p

Praveen Chaudhary

04/27/2022, 3:27 PM
i have done the tunelling on 4200 port that's why i am able to open page if graphql ... attached
a

Anna Geller

04/27/2022, 3:39 PM
can you try to also open port 8080?
3 Views