cardano-graphql
cardano-graphql copied to clipboard
Cardano-graphql instance running in a kubernetes cluster returns blank error page at `http://localhost:3100/graphql`
Summary
I'm running a cardano stack inside a Kind kubernetes cluster. The stack consists of the following containers with these images
- CARDANO_NODE:
inputoutput/cardano-node:1.35.0 - CARDANO_DB_SYNC:
inputoutput/cardano-db-sync:13.0.0 - HASURA_CLIENT:
inputoutput/cardano-graphql-hasura:6.2.0 - CARDANO_GRAPHQL:
inputoutput/cardano-graphql:6.2.0-testnet - CUSTOM_BACKEND:
An in house image
The error persists within the inputoutput/cardano-graphql:6.2.0-testnet container; the container logs this information at first launch & everything I restart it which seems normal to me
{"name":"cardano-graphql","hostname":"cardano-graphql-testnet-9dc5fb75b-zlsf9","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-07-15T23:03:45.457Z","v":0}
{"name":"cardano-graphql","hostname":"cardano-graphql-testnet-9dc5fb75b-zlsf9","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-07-15T23:03:45.575Z","v":0}
The pod.yml file looks like this for the cardano-graphql configuration
containers:
- name: cardano-graphql-testnet
image: inputoutput/cardano-graphql:6.2.0-testnet
ports:
- containerPort: 3100
env:
- name: NETWORK
value: testnet
- name: METADATA_SERVER_URI
value: "https://tokens.cardano.org"
- name: ALLOW_INTROSPECTION
value: "true"
- name: CACHE_ENABLED
value: "true"
- name: LOGGER_MIN_SEVERITY
value: info
- name: API_PORT
value: "3100"
- name: LISTEN_ADDRESS
value: "0.0.0.0"
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: postgres-chaindb-config
key: ocs-postgres-chaindb-url
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: postgres-chaindb-secrets
key: postgres_db
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-chaindb-secrets
key: postgres_password
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-chaindb-secrets
key: postgres_user
volumes:
- name: postgres-chaindb-secrets
secret:
items:
- key: postgres_db
path: postgres_db
- key: postgres_user
path: postgres_user
- key: postgres_password
path: postgres_password
secretName: postgres-chaindb-secrets
Once I run said container & reach the browser I get nothing, blank page & infinite loading the browser tab at the top of the browser. The page shows this error This page isn’t working; localhost didn’t send any data. ERR_EMPTY_RESPONSE
EDIT: Running the following curl returns this message curl: (52) Empty reply from server
curl -X POST \
-H "Content-Type: application/json" \
-d '{"query": "{ cardano { tip { number slotNo epoch { number } } } }"}' \
http://localhost:3100/graphql
Steps to reproduce the bug
- Deploy
inputoutput/cardano-graphql:6.2.0-testnetimage into a kubernetes pod aftercardano-node,cardano-db-sync& 'postgres' have been setup - Go to
http://localhost:3100/graphqland see a error page that saysThis page isn’t working; localhost didn’t send any data. ERR_EMPTY_RESPONSE
Actual Result
error page that says This page isn’t working; localhost didn’t send any data. ERR_EMPTY_RESPONSE & an infinite loading bar inside the tab in the browser
Expected Result
To see the graphql console at http://localhost:3100/graphql
Environment
{
os: {
arch: 'x64',
cpus: { count: 24, model: '12th Gen Intel(R) Core(TM) i9-12900KS' },
release: '5.18.7-200.fc36.x86_64',
totalMem: 67040788480,
type: 'Linux'
},
version: '6.2.0'
}
Platform
- [ ] Linux (Ubuntu)
- [X] Linux (Other)
- [ ] macOS
- [ ] Windows
Platform version
Fedora Workstation 36
Runtime
- [ ] Node.js
- [X] Docker
Runtime version
v20.10.17
It's getting stuck trying to apply the Hasura migrations or metadata. See if the debug logs reveal any more hints:
- name: LOGGER_MIN_SEVERITY
value: debug
Just saw this sorry for late reply, I've built a custom image of the master branch due to the fact my cardano-node was at 1.35.0 & cardano-db-sync at 13.0.0. I added the LOGGER_MIN_SEVERITY env & I'm currently getting this error. Should I switch my graphql image back to 6.2.0-testnet instead of building from master?
================================
Missing environment variables:
loggerMinSeverity: undefined
Exiting with error code 1
================================
I'm a but confused because I have added this env before