Import data got PermissionDenied

Hi, I have tried this method here to import data that has been exported directly from dgraph slash. However, when I run the command

docker run -it --rm -v /path/to/g01.json.gz:/tmp/g01.json.gz dgraph/dgraph:v20.07-slash \
dgraph live --slash_grpc_endpoint=<grpc-endpoint>:443 -f /tmp/g01.json.gz -t <accessJWT>

I got error below:

Running transaction with dgraph endpoint: <grpc-endpoint>
Error while loading schema from alpha rpc error: code = Unauthenticated desc = Unauthorized: HTTP status code 401; transport: missing content-type field
rpc error: code = Unauthenticated desc = Unauthorized: HTTP status code 401; transport: missing content-type field

I am sure that I have provided the correct accessJWT, but why do I still getting this error?
Any help please?
Thanks

Hi @shinchan you are using the wrong image to connect with your backend. We have come a long way and there are many changes which could have played the role in error. Please use image dgraph/dgraph:v21.03-slash.

Sample script would be

#!/usr/bin/env bash

DEPLOYMENT_URL="your-backend-url"
DEPLOYMENT_JWT="<deployment-jwt>"

docker run -it --rm -v /users/dgraph/downloads:/tmp dgraph/dgraph:v21.03-slash \
  dgraph live --slash_grpc_endpoint=${DEPLOYMENT_URL}:443 -f /tmp/1million.rdf.gz -t ${DEPLOYMENT_JWT}

Deployment JWT is the api key you can generate from the API Key tab on settings page. Do remember it takes about 30 sec for the api key to get active once generated.

Hello, Good evening,

I am using Dgraph Live to do a live import and follow the current docs for Live Import into a dedicated cloud cluster, but I am getting some errors and wondering if the docs do not work for the new version of Dgraph(v23.1.0).

Processing schema file "/tmp/g01.schema"
E0107 22:27:05.798488 1 xidmap.go:168] Error while getting lease: rpc error: code = Unknown desc = extracting namespace from JWT: unable to parse jwt token: token contains an invalid number of segments
Error while processing schema file "/tmp/g01.schema": rpc error: code = Unauthenticated desc = no accessJwt available
rpc error: code = Unauthenticated desc = no accessJwt available

I copied the API key directly from the Dgraph Cloud setting page, but it still says no access is available.

I am copying data from a shared cluster into a dedicated cluster, and it is not working. Can I get some help getting this backend data imported into my dedicated instance?

I tried both with and without the schema file(the schemas are identical in both instances)
Here are the commands I used, and I get similar errors:

docker run -it --rm -v <path-to-file>/g01.rdf:/tmp/g01.rdf dgraph/dgraph:latest \

dgraph live --slash_grpc_endpoint=<grpc-endpoint>-f /tmp/g01.rdf -t <apiKey>

I get this error below, using the command above:

Dgraph version : v23.1.0
Dgraph codename : dgraph
Dgraph SHA-256 : c455c829ccc239e6b4a0624c37a3ffdc082da94d8ae7b71e5bc0801bb23f6624
Commit SHA-1 : 2b18d19
Commit timestamp : 2023-08-17 13:27:10 -0500
Branch : HEAD
Go version : go1.19.12
jemalloc enabled : true

For Dgraph official documentation, visit https://dgraph.io/docs.
For discussions about Dgraph , visit [https://discuss.dgraph.io](https://discuss.dgraph.io/).
For fully-managed Dgraph Cloud , visit https://dgraph.io/cloud.
Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
Copyright 2015-2023 Dgraph Labs, Inc.

Running transaction with dgraph endpoint:***.us-east-1.aws.cloud.dgraph.io:443

Error while loading schema from alpha rpc error: code = Unauthenticated desc = no accessJwt available
E0107 22:31:34.402434 1 xidmap.go:168] Error while getting lease: rpc error: code = Unknown desc = extracting namespace from JWT: unable to parse jwt token: token contains an invalid number of segments
rpc error: code = Unauthenticated desc = no accessJwt available

And then I tried this command:

docker run -it --rm -v <path-to-file>:/tmp dgraph/dgraph:latest \
dgraph live --slash_grpc_endpoint <grpc-endpoint> -f /tmp/g01.rdf -s /tmp/g01.schema -t <apiKey>

I get this error below:

Processing schema file "/tmp/g01.schema"

E0107 22:27:05.798488 1 xidmap.go:168] Error while getting lease: rpc error: code = Unknown desc = extracting namespace from JWT: unable to parse jwt token: token contains an invalid number of segments
Error while processing schema file "/tmp/g01.schema": rpc error: code = Unauthenticated desc = no accessJwt available
rpc error: code = Unauthenticated desc = no accessJwt available 

Any help would be greatly appreciated!