Rpc error: unknown service graphp.Dgraph

I want to try the latest Dgraph. So I pull the latest code from github, “go install” it and then run it from command line.

And i also write a piece of code to do query through the Go client.

package main

import (



func main() {

	cc, err := grpc.Dial("", grpc.WithInsecure())
	if err != nil {
		log.Fatal("Cant not connect to dgarp rpc service." + err.Error())
	dc := graphp.NewDgraphClient(cc)
	req := &graphp.Request{}
	ql := `
    bossOf:boss_of {name}, 
    reportTo:~boss_of {name} 
	req.Query = ql
	resp, err := dc.Run(context.Background(), req)
	if err != nil {
		log.Fatal("Failed to do query:" + err.Error())
	fmt.Printf("%v", resp.N)

The error i get is like this,

2017/03/13 17:52:56 Failed to do query:rpc error: code = Unimplemented desc = unknown service graphp.Dgraph
exit status 1

Hey @Rader,

There were some recent changes to move all protos in their own directory. This might have to do with that. @ashish: Can you look into this?

@mrjn @ashish my fault, it’s not a bug. There is an old version 0.7.3 installed. From the command line I should run ./dgraph instead of dgraph which launches the old version.

But, why don’t we display some version information at the startup?

raderdeMacBook-Pro:bin rader$ ./dgraph
Starting commit routine.
2017/03/14 09:53:34 worker.go:89: Worker listening at address:
2017/03/14 09:53:34 main.go:769: grpc server started.
2017/03/14 09:53:34 main.go:770: http server started.
2017/03/14 09:53:34 main.go:771: Server listening on port 8080
Node with GroupID: 0, ID: 1
Node with GroupID: 1, ID: 1
Group 0 found 0 entries
New Node for group: 0
Group 1 found 0 entries
New Node for group: 1
raft2017/03/14 09:53:34 INFO: 1 became follower at term 0
raft2017/03/14 09:53:34 INFO: newRaft 1 [peers: , term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]

We could. Feel free to file a bug.

I think this still needs to be fixed as the latest Go client won’t work with the latest Dgraph binary that is v0.7.3 because of the proto change.

Also, we could display the version but on binaries built from master it would still be v0.7.3 (version remains same until a new version is tagged and released). So it probably won’t help to debug this issue but might be good in general.

Should we have two columns in dgraph wiki for go-client : one for v0.7.3 and other for master ?

Actually, I think we should bring back query/graph and make the goclient (our Goclient isn’t released like the binaries hence would have only the latest version) use that. When we do the next release (hopefully this week), we can revert this change. That’s the best solution I can think of.

I think it’s a good idea, just like what you do for the query page.

I have created one “Display some version information at the startup #697

We have updated the goclient wiki page with workable examples for v0.7.3 and master.

@ashish I see the schema changed. The old schema begin with “scalar (” can not be loaded in the latest build. What’s the new schema format?

Just remove the scalar keyword, and block. The rest works the same way.

We have the schema format below each code example on clients page.

@pawan Dgraph loader can retrieve the version of Dgraph, and display it. Also, is there a way to get the latest git commit version, and add that along with the branch name. This way, every Dgraph binary would have a info rich version.

type definition does not work too. “Person” is not valid in this example:

age: int @index
name: string @index

type Person {
name: string
age: int
address: string
boss_of: uid @reverse

Please remove type Person and its block curly braces.
Also, you need to remove any duplicate schema definitions, like age and name in above examples

so, the type definition will not be supported in the future?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.