hyperledger-archives / education-sawtooth-simple-supply

https://wiki.hyperledger.org/display/LMDWG
Apache License 2.0
51 stars 61 forks source link

Creating agent getting proxy error #26

Closed venkatesh-nagineni closed 5 years ago

venkatesh-nagineni commented 5 years ago

I try to create new agent with signup but getting proxy error with following image . Please help me to resolve this issue. proxy_error

this is bacause simple-supply rest api not listening on port 8000 and exit with following error TypeError: new() got an unexpected keyword argument 'serialized_options'

venkatesh-nagineni commented 5 years ago

The problem is simple-supply-rest-api not running in my docker with the following error message

TypeError: new() got an unexpected keyword argument 'serialized_options'

Here i have docker status console

johnandersen777 commented 5 years ago

What's the status on this? I'm still seeing as of 401202b27060dd5658ac3cfd7f6fbc460fc0aa2a no proxy variables are set in my environment

danintel commented 5 years ago

I played around with it and found the simple-supply-rest-api container is not starting, so nothing is listening to port 8000. The container dies with this error:

simple-supply-rest-api | TypeError: __new__() got an unexpected keyword argument 'serialized_options'

The cause with protobuf. New generated code from a newer version of protoc, the protobuf compiler, is being used with old protobuf runtime. The runtime can be newer or the same (is backwards compatible), but the protobuf runtime cannot be older.

I may be going out on a limb here, but I believe the protobuf library came from repo.sawtooth.me, used for internal Sawtooth testing and development, in file rest_api/Dockerfile. Again, this is just an unproven theory of mine.

harunurkst commented 5 years ago

I have the same problem. How I will fix it?

danintel commented 5 years ago

See also issue #24, which partly or fully duplicates this issue.

danintel commented 5 years ago

A fix for this error is in PR #30. Basically the fix is to remove the serialized_options arguments from the protobufs/*/*_pb2.py files.. The serialized_options argument requires Protobuf 3.6.0 or above to support serialized_options, but repo.sawtooth.me is only at Protobuf 3.4.1 for Sawtooth 1.0 and 1.1 at least.

danipisca07 commented 5 years ago

A fix for this error is in PR #30. Basically the fix is to remove the serialized_options arguments from the protobufs/*/*_pb2.py files.. The serialized_options argument requires Protobuf 3.6.0 or above to support serialized_options, but repo.sawtooth.me is only at Protobuf 3.4.1 for Sawtooth 1.0 and 1.1 at least.

Hi dan, sorry but the file you are suggesting to modify are autogenerated by the protocol buffer compiler (agent.proto generates aget_pb2.py) when I launch docker-compose up, so even if I remove all the occurrences of serialized_options they are automatically reinserted every time and the same error appears. I should somehow manage to remove them in the window of time betweek the creation of the compiler and the usage....there isn't any other possible workaround?

danintel commented 5 years ago

My suggestion is just a workaround until the root problem is fixed.

The root problem is fixing the development repository for the old release Sawtooth 1.0 at repo.sawtooth.me or to use the Sawtooth 1.2 release once it is available.

Another workaround is to modify the docker-compose file to not use the repo.sawtooth.me repository and use the latest Protobuf library and compiler.