hudl / fargo

Golang client for Netflix Eureka
MIT License
133 stars 53 forks source link

Register job at Eureka Server #76

Open rfscheidt opened 3 years ago

rfscheidt commented 3 years ago

Hello everyone,

I am trying to register my Golang client app in the Eureka java server, following this way:

func EurekaClienteRegister2() { e := fargo.EurekaConnection{ ServiceUrls: []string{"http://10.0.2.110:9080/discovery-service/eureka"}, Timeout: 2, }

i := fargo.Instance{
    HostName:         "http://10.0.2.248:8087/ged-service/",
    Port:             8087,
    App:              "ged-service-name",
    IPAddr:           "10.0.2.248",
    VipAddress:       "10.0.2.248",
    DataCenterInfo:   fargo.DataCenterInfo{Name: fargo.MyOwn},
    SecureVipAddress: "10.0.2.248",
    Status:           fargo.UP,
}

err := e.RegisterInstance(&i)
if err == nil {
    log.Println(err)
}

}

But, in the console Eureka server, it appear stranger:

image

And, the problem is that, my gateway don't find the client. 2021-11-09 11:39:16.246 WARN [gateway-service-name,de773706e662d245,de773706e662d245] 34176 --- [ctor-http-nio-3] o.s.c.l.core.RoundRobinLoadBalancer : No servers available for service: GED-SERVICE-NAME

bodhili commented 7 months ago

need to set the statusPageUrl