data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[Bug]: Receiving 503 error

Open hidhana opened this issue 2 years ago • 2 comments

What happened?

We have deployed container in AKS mounting config and schema file using configmap. I can see config file and schema file in App/ directory in pod. However I am getting 503 error when i try to reach /graphql endpoint.

Version

latest

What database are you using?

CosmosDB NoSQL

What hosting model are you using?

Custom Docker host

Which API approach are you accessing DAB through?

GraphQL

Relevant log output

> GET /graphql HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 503 Service Unavailable
< Content-Length: 0
< Date: Thu, 30 Nov 2023 07:05:08 GMT
< Server: Kestrel
< x-ms-correlation-id: a135147e-f3f3-4885-b58a-4cfde129dae6

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

hidhana avatar Nov 30 '23 07:11 hidhana

apiVersion: apps/v1 kind: Deployment metadata: name: cbapidab-deploy namespace: sobdev labels: app: cbapidab-app mon: pro annotations: prometheus.io/scrape: "true" prometheus.io/path: "/metrics" prometheus.io/port: "9102" prometheus.io/scheme: "http"
spec: replicas: 2 selector: matchLabels: service: cbapidab-srv template: metadata: labels: app: cbapidab-app service: cbapidab-srv spec:
nodeSelector: kubernetes.azure.com/mode: user
containers: - name: cbapi image: mcr.microsoft.com/azure-databases/data-api-builder:latest imagePullPolicy: Always ports: - containerPort: 8080 protocol: TCP
env: - name: ASPNETCORE_URLS value: http://+:8080 - name: DAB_ENVIRONMENT value: Development - name: DAB_CONFIG_FILE value: /App/dab-config.json resources: limits: memory: 500Mi cpu: 500m requests: memory: 300Mi cpu: 300m
volumeMounts: - name: cbapidab-configmap mountPath: /App/dab-config.Development.json subPath: dab-config.Development.json - name: cbapidab-configmap mountPath: /App/opensalesorder.gql subPath: opensalesorder.gql volumes: - name: cbapidab-configmap configMap: name: cbapidab-configmap

apiVersion: v1 kind: Service metadata: name: cbapidab-srv labels: app: cbapidab-app service: cbapidab-srv spec: ports: - port: 80 targetPort: 8080 selector: service: cbapidab-srv

apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: cbapidab-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: cbapidab-deploy minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 50

Above is deployment yaml

hidhana avatar Nov 30 '23 07:11 hidhana

Hi @hidhana, sorry for the delay in responding. Does the Microsoft Learn article not help mitigate your issue? https://learn.microsoft.com/azure/data-api-builder/run-using-container If not, what is it missing to get you running?

seantleonard avatar Mar 12 '24 18:03 seantleonard