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

Response has invalid UTF-8 #1789

Closed
rajeshkmindix opened this issue Nov 17, 2017 · 1 comment
Closed

Response has invalid UTF-8 #1789

rajeshkmindix opened this issue Nov 17, 2017 · 1 comment

Comments

@rajeshkmindix
Copy link

rajeshkmindix commented Nov 17, 2017

Hi,

I get the following error when trying to insert some nodes into dgraph.

com.google.protobuf.InvalidProtocolBufferException: Protocol message had invalid UTF-8.

I narrowed it down to

`ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 9080).usePlaintext(true).build();
DgraphGrpc.DgraphBlockingStub blockingStub = DgraphGrpc.newBlockingStub(channel);
DgraphClient dgraphClient = new DgraphClient(Collections.singletonList(blockingStub));

for(int i = 0; i < 1000; i++) {
  JsonObject json = new JsonObject();
  json.addProperty("id", i);
  json.addProperty("name", "abcdefgh" + i);

  System.out.println("for " + i);
  Mutation mu =
          Mutation.newBuilder()
                  .setCommitImmediately(true)
                  .setSetJson(ByteString.copyFromUtf8(json.toString()))
                  .build();
  dgraphClient.newTransaction().mutate(mu);
}`

After inserting around 100 to 150 nodes. I get the above error. If I rerun the above code, I get the same error for the first record itself. Every subsequent mutation request gets the same error.

I installed using
curl https://get.dgraph.io -sSf | bash

Ran it using
dgraph zero --port_offset -2000 dgraph server --memory_mb 2048 --zero localhost:5080
Need help with this.

Thanks in advance,
Rajesh

@manishrjain
Copy link
Contributor

This belongs to the dgraph-io/dgraph4j repository. I'll create an issue for you.

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

No branches or pull requests

2 participants