To facilitate better answering of questions, if you have a question, please fill in the following info. Otherwise, please delete the template.
What I want to do
1, I need to login using /admin
endpoint , with default user name groot and password is password
What I did
I have started dgraph new version 23.1.0 with docker.
docker run -it -d -p 7080:7080 --network dgraph_default -p 8080:8080 -p 9080:9080 -v ~/dgraph1:/dgraph dgraph/dgraph:v23.1.0 dgraph alpha --zero=192.168.1.100:5080 --my=192.168.1.100:7080 --bindall=true --security whitelist=0.0.0.0/0; auth_token=123
zer started with below commans
docker run -it -d -p 5080:5080 --network dgraph_default -p 6080:6080 -v ~/zero:/dgraph dgraph/dgraph:v23.1.0 dgraph zero --my=192.168.1.100:5080 --bindall=true
Dgraph metadata
dgraph version
v23.1.0
I have tried to login localhost:8080 , but always getting login failed because invalid username or password
error
/usr/bin/curl --silent --header 'X-Dgraph-AuthToken: 123' --header 'Content-Type: application/graphql' --request POST localhost:8080/admin --upload-file login.graphql
cat login.graphql
mutation {
login(userId: "groot", password: "password") {
response {
accessJWT
refreshJWT
}
}
}
Error log
{"errors":[{"message":"resolving login failed because invalid username or password","locations":[{"line":2,"column":3}]}],"data":{"login":null},"extensions":{"tracing":{"version":1,"startTime":"2024-02-26T12:00:11.717761338Z","endTime":"2024-02-26T12:00:11.726096964Z","duration":8335618}}}
When I try to get info from alpha , server went down immediately
curl --request POST --header 'content-type: application/json' --header 'X-Dgraph-AuthToken: 123' --url http://localhost:8080/admin --data '{"query":"query Config {\n state {\n groups {\n members {\n addr\n groupId\n id\n }\n }\n zeros {\n addr\n groupId\n }\n }\n health {\n status\n address\n instance\n version\n }\n}"}'
getting below error log while doing above query
I0227 03:33:42.070553 15 access_ee.go:368] RefreshAcls closed
I0227 03:33:43.953126 15 admin.go:865] namespace: 0. No GraphQL schema in Dgraph; serving empty GraphQL API
I0227 03:34:23.225841 15 http.go:239] namespace: 0. Got GraphQL request over HTTP.
I0227 03:34:23.226160 15 middlewares.go:183] GraphQL admin query. Name = health
I0227 03:34:23.226163 15 middlewares.go:183] GraphQL admin query. Name = state
I0227 03:34:23.226173 15 health.go:32] Got health request
[Sentry] 2024/02/27 03:34:23 Sending fatal event [eb6009f174ac41cd8529a21b78a5cba6] to o318308.ingest.sentry.io project: 1805390
2024/02/27 03:34:23 strconv.ParseUint: parsing "\x00\x00\x00\x00\x00\x00\x00\x00dgraph.graphql.xid": invalid syntax
github.com/dgraph-io/dgraph/x.Check
/home/runner/work/dgraph/dgraph/x/error.go:42
github.com/dgraph-io/dgraph/x.strToUint
/home/runner/work/dgraph/dgraph/x/keys.go:139
github.com/dgraph-io/dgraph/x.ParseNamespace
/home/runner/work/dgraph/dgraph/x/keys.go:125
github.com/dgraph-io/dgraph/graphql/admin.convertToGraphQLResp
/home/runner/work/dgraph/dgraph/graphql/admin/state.go:96
github.com/dgraph-io/dgraph/graphql/admin.resolveState
/home/runner/work/dgraph/dgraph/graphql/admin/state.go:56
github.com/dgraph-io/dgraph/graphql/resolve.QueryResolverFunc.Resolve
/home/runner/work/dgraph/dgraph/graphql/resolve/query.go:53
github.com/dgraph-io/dgraph/graphql/resolve.LoggingMWQuery.func1
/home/runner/work/dgraph/dgraph/graphql/resolve/middlewares.go:184
github.com/dgraph-io/dgraph/graphql/resolve.QueryResolverFunc.Resolve
/home/runner/work/dgraph/dgraph/graphql/resolve/query.go:53
github.com/dgraph-io/dgraph/graphql/resolve.IpWhitelistingMW4Query.func1
/home/runner/work/dgraph/dgraph/graphql/resolve/middlewares.go:177
github.com/dgraph-io/dgraph/graphql/resolve.QueryResolverFunc.Resolve
/home/runner/work/dgraph/dgraph/graphql/resolve/query.go:53
github.com/dgraph-io/dgraph/graphql/resolve.(*RequestResolver).Resolve.func3.1
/home/runner/work/dgraph/dgraph/graphql/resolve/resolver.go:546
runtime.goexit
/opt/hostedtoolcache/go/1.19.12/x64/src/runtime/asm_amd64.s:1594
Waiting for your reply to start our development process. Thanks.