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

Auto registration issues, need manual registration #3

Open
leoujz opened this issue Nov 2, 2022 · 4 comments
Open

Auto registration issues, need manual registration #3

leoujz opened this issue Nov 2, 2022 · 4 comments

Comments

@leoujz
Copy link

leoujz commented Nov 2, 2022

request: http://localhost:8080/helloworld/call
response: {"id":"go.micro.api","code":500,"detail":"service not found","status":"Internal Server Error"}

Am I missing some steps or config?

Environments:

go version go1.18.7 linux/arm64
go-micro version v1.1.4
go install github.com/go-micro/api/cmd/api@latest

Reproducing steps:

create a service

  • go-micro new service helloworld
  • cd helloworld && make init proto update tidy
  • go-micro run

test the service

go-micro call helloworld Helloworld.Call '{"name":"John"}'

response
{"msg":"Hello John"}

run api and test

  • api
    2022-11-02 09:20:38 file=http/http.go:90 level=info HTTP API Listening on [::]:8080
  • request
    http://localhost:8080/helloworld/call
  • response
    {"id":"go.micro.api","code":500,"detail":"service not found","status":"Internal Server Error"}
@leoujz
Copy link
Author

leoujz commented Nov 9, 2022

I think this issue could be closed. see go-micro/go-micro#2587

@Davincible Davincible changed the title service not found Auto registration issues, need manual registration Nov 9, 2022
@Davincible
Copy link

I will keep this issue open as long as auto registration doesn't work

@leoujz
Copy link
Author

leoujz commented Nov 9, 2022

I already committed a pull request to go-micro/go-micro repo, and add some usage on go-micro/api repo. This is not solution on auto registration, but a fix on endpoint name extraction when no endpoint matched. It make the api gateway working without extra effort, at least in the case mentioned in README of api repo. so close the issue?

@yaowenzhou
Copy link

Hello, about this issue, I want to know how you configure the route

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

3 participants