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

Micro web is not working properly (tested with greeter example) #25

Closed
s8sg opened this issue Mar 11, 2016 · 5 comments
Closed

Micro web is not working properly (tested with greeter example) #25

s8sg opened this issue Mar 11, 2016 · 5 comments

Comments

@s8sg
Copy link
Contributor

s8sg commented Mar 11, 2016

inval

The error is the data value is being passed as null, and the below is coming. I'm not sure about the below error.

2016/03/11 19:24:44 [WARN] Service tag "e={\"name\":\"Say.Hello\",\"request\":{\"name\":\"Request\",\"type\":\"Request\",\"values\":[{\"name\":\"Name\",\"type\":\"string\",\"values\":null}]},\"response\":{\"name\":\"Response\",\"type\":\"Response\",\"values\":[{\"name\":\"Msg\",\"type\":\"string\",\"values\":null}]},\"metadata\":{\"stream\":\"false\"}}" will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.

Though Micro query is working fine:

swarvanu@swarvanu-ThinkPad-L440 ~/ $ micro query go.micro.srv.greeter Say.Hello '{"name": "Swarvanu"}'
{
    "msg": "Hello Swarvanu"
}

I followed the below steps:
1> go get github.com/micro/micro
2> consul agent -dev -advertise=127.0.0.1
3> micro --enable_stats --web_address 127.0.0.1:8585 web
4> swarvanu@swarvanu-ThinkPad-L440 ~/goprojects/src/github.com/micro/micro/examples/greeter/server $ go run main.go

Is there anything wrong, in what I'm doing ?

@s8sg s8sg changed the title Micro web is not working properly (for greeter) Micro web is not working properly (tested with greeter example) Mar 11, 2016
@asim
Copy link
Member

asim commented Mar 11, 2016

Hi. The warning is just that, a warning. It's occurring within consul as it attempts to map tag data as txt records for DNS but obviously that's not possible with the format. This means DNS resolution doesn't work for anything registered via micro. Consul doesn't actually support base64 encoding for DNS txt records which makes it difficult to format it in anyway that would make it valid. We use tags as a hacked method to store metadata about the the services.

It's not an issue and everything functions correctly from a micro perspective. We could potentially address this in go-micro/registry to resolve the warnings but require an elegant solution. PRs welcome.

@asim
Copy link
Member

asim commented Mar 11, 2016

Sorry to add. Missed the thing about values not seeming to be passed through. Will have a look in a few minutes.

@asim
Copy link
Member

asim commented Mar 11, 2016

PR was made #24 which actually fixes the RPC issue and improves the implementation slightly. That's merged.

@asim
Copy link
Member

asim commented Mar 11, 2016

Fixed version pushed to the demo along with the greeter server for testing http://web.micro.pm/query

@s8sg
Copy link
Contributor Author

s8sg commented Mar 12, 2016

verified with the latest changes. The issue is fixed now.

issue 25 fixed

Closing the issue

@s8sg s8sg closed this as completed Mar 12, 2016
milosgajdos pushed a commit to milosgajdos/micro that referenced this issue Oct 20, 2019
Add selector interface and implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants