https://prefect.io logo
Title
s

Scarlett King

01/27/2022, 12:15 PM
Hi guys, I’ve just redeployed prefect server to AKS via helm chart and having trouble connecting to graphql from ui. How can I troubleshoot this?
a

Anna Geller

01/27/2022, 12:22 PM
You need to ensure that the right ports are open. Networking is a bit challenging on Azure and I’m no networking expert, but you need to ensure that: • API endpoint is reachable - the default port is 4200 and it would need to be open to allow the API to be reachable from Server • if you implement a Kubernetes agent, the port 8080 should be open by default to allow health checks - you can disable that in your agent when needed
s

Scarlett King

01/27/2022, 1:53 PM
So from AKS, it looks like graphQL wasn’t started when we deployed the helm chart
👍 1
Is there a way I can troubleshoot why graphql wasn’t started?
a

Anna Geller

01/27/2022, 2:20 PM
The first thing I would look are the logs from the respective pods. If you are using the latest Server version, it has been quite recently moved to Hasura 2.0 which could be perhaps related to your issue? Also, have you ran the database migration? I think this is the most common issue users come across when migrating server. There is a command that can help with DB migration:
prefect server upgrade database
z

Zanie

01/27/2022, 3:51 PM
(The helm chart should run db migrations for you) If you can connect to the cluster you can use
kubectl
to list the pods e.g.
kubctl get pods
then use
kubectl describe pod <NAME>
and
kubectl logs <NAME>
to inspect the pod.
:upvote: 1
s

Scarlett King

01/28/2022, 10:08 AM
Ah ok, that explains it. We revert back to an older image and it works. Where do I run the command for db migration? We’re deploying to AKS via the helm chart
The helm chart was stuck at upgrade step. I wonder if it’s an issue because we’re running persistent db?
a

Anna Geller

01/28/2022, 10:51 AM
As long as you configured your persistent database on the helm chart, GraphQL should automatically run the migration for you in this line
s

Scarlett King

02/18/2022, 9:24 AM
Hi Anna, it seems we have configured the persistence db on the helm chart but we still get issue at the db upgrade command. On the helm chart,
useSubChart
is set to false and
persistence
is kept at
enable: false
as well. Do we need to set that to true? The notes on the helm chart seems to recommend that it stays false.
a

Anna Geller

02/18/2022, 9:53 AM
Perhaps you can trigger it manually? The command should be:
kubectl exec graphqlPodName prefect-server database upgrade -y
s

Scarlett King

02/18/2022, 10:42 AM
Ok, let me try it