iotaledger / sandbox

14 stars 11 forks source link

Invalid resource name given #12

Open yillkid opened 6 years ago

yillkid commented 6 years ago

I deploy sandbox using Google Cloud (follow this section), but got error message when I run the sandbox_server binary: {"level":"fatal","ts":1512464704.4758828,"caller":"server/main.go:550","msg":"pubsub topic","error":"rpc error: code = InvalidArgument desc = Invalid resource name given (name=projects//topics/iotasandbox). Refer to https://cloud.google.com/pubsub/overview#names for more information.","name":"iotasandbox","stacktrace":"main.(*App).initPubSub\n\t/home/ubuntu/sandbox/cmd/server/main.go:550\nmain.main\n\t/home/ubuntu/sandbox/cmd/server/main.go:655\nruntime.main\n\t/usr/lib/go-1.8/src/runtime/proc.go:185"}

Seems I miss config environment variable INCOMING_JOBS_TOPIC Where should I get/set this variable ?

knarz commented 6 years ago

If you use the docker-compose.yml file then it should be set automatically. If you run the binary directly then you could try this INCOMING_JOBS_TOPIC=foobar ./sandbox-server

yillkid commented 6 years ago

What is foobar ? means any custom string? $ INCOMING_JOBS_TOPIC=foobar ./sandbox-server {"level":"fatal","ts":1512487363.6686463,"caller":"server/main.go:550","msg":"pubsub topic","error":"rpc error: code = InvalidArgument desc = Invalid resource name given (name=projects//topics/foobar). Refer to https://cloud.google.com/pubsub/overview#names for more information.","namei":"foobar","stacktrace":"main.(*App).initPubSub\n\t/home/ubuntu/sandbox/cmd/server/main.go:550\nmain.main\n\t/home/ubuntu/sandbox/cmd/server/main.go:655\nruntime.main\n\t/usr/lib/go-1.8/src/runtime/proc.go:185"}

knarz commented 6 years ago

That is the name you use as the topic name for gclouds pubsub service.

If you can, try playing with the docker-compose.yml on a local machine before attempting to deploy it to gcloud.

I can see if I can update the README a bit when I have some free time.

yillkid commented 6 years ago

I can run with docker but it's a static image, I want to trace and modify the source code.