Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traefik error #118

Open
pomazanbohdan opened this issue May 3, 2020 · 5 comments
Open

Traefik error #118

pomazanbohdan opened this issue May 3, 2020 · 5 comments

Comments

@pomazanbohdan
Copy link

pomazanbohdan commented May 3, 2020

I create config.

scylla-data-apis:
image: datastaxlabs/cassandra-data-apis
hostname: scylla-data-apis
container_name: scylla-data-apis
restart: unless-stopped
volumes:
- ./config.yaml:/root/config.yaml
networks:
- scylla
labels:
- "traefik.enable=true"
- "traefik.http.routers.scylla.entrypoints=web"
- "traefik.http.routers.scylla.rule=Host(DOMAIN)"
- "traefik.http.middlewares.scylla-https-redirect.redirectscheme.scheme=websecure"
- "traefik.http.routers.scylla.middlewares=scylla-https-redirect"
- "traefik.http.routers.scylla-secure.entrypoints=websecure"
- "traefik.http.routers.scylla-secure.rule=Host(DOMAIN)"
- "traefik.http.routers.scylla-secure.tls=true"
- "traefik.http.routers.scylla-secure.tls.certresolver=cloudflare"
- "traefik.http.services.scylla.loadbalancer.server.port=8080"
- "traefik.docker.network=proxy"

image

{"level":"info","ts":1588522561.0406232,"caller":"log/logger.go:74","msg":"using config file","file":"/root/config.yaml"}, {"level":"info","ts":1588522561.2010622,"caller":"log/logger.go:74","msg":"building schemas"}, {"level":"info","ts":1588522561.2910392,"caller":"log/logger.go:74","msg":"get started by visiting the GraphQL playground","url":"http://localhost:8080/graphql-playground"}, {"level":"info","ts":1588522561.2911048,"caller":"log/logger.go:74","msg":"server listening","port":8080,"type":"GraphQL"},

curl http://192.168.16.5:8080/graphql-playground work

But https://DOMAIN/graphql-playground
Error 504
Gateway time-out

@pomazanbohdan
Copy link
Author

pomazanbohdan commented May 3, 2020

Traefik work, cassandra-data-apis not resolv

` <script>window.addEventListener('load', function (event) {
GraphQLPlayground.init(document.getElementById('root'), {
endpoint: 'http://**localhost:**8080/graphql'
})
})</script>

`
curl http://192.168.16.5:8080/graphql
404 page not found

@jorgebay
Copy link
Contributor

jorgebay commented May 4, 2020

Hi @pomazanbohdan

From the log messages, it looks like you don't have a keyspace created in your database. You need at least a user-defined keyspace in your database for the service to expose it.

I'm not sure I follow the issue related to the playground. If you are able to access the graphql playground, the playground will default to http://localhost:8080/graphql/<first_keyspace>. Make sure you change localhost with the accessible IP/name of the service and have a user defined keyspace. For example, if you have the service running on 192.168.16.5:8080 and you have a keyspace named my_keyspace, change the url on the playground to http://192.168.16.5:8080/graphql/my_keyspace

@mpenick
Copy link
Contributor

mpenick commented May 4, 2020

The graphql-playground can fail because of CORs (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors). After #119 is merged you can use the following configuration to access from any IP address.

docker run -e "DATA_API_ACCESS_CONTROL_ALLOW_ORIGIN=*"

@pomazanbohdan
Copy link
Author

From the log messages, it looks like you don't have a keyspace created in your database. You need at least a user-defined keyspace in your database for the service to expose it.

@jorgebay

For me as a non-programmer, this is a problem.
I installed this product just so that it would deploy an access point over a clean cluster.
I would like for him to be able to initiate the default space with an empty cluster.

In the future, already with the help of convenient and familiar tools for using graphql, I would have continued my work.

@jorgebay
Copy link
Contributor

jorgebay commented May 5, 2020

For me as a non-programmer, this is a problem.

Sure, we are here to make the project as easy to use as possible, I've filed #121 to make sure the behaviour is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants