ivargrimstad / snoopee

SnoopEE - The Lean Microservice Framework for Java EE
http://snoopee.agilejava.eu/
MIT License
17 stars 6 forks source link

Handshake error #12

Open mulderbaba opened 7 years ago

mulderbaba commented 7 years ago

Getting Handshake error while registering service.

[2017-08-07T00:32:10.011+0300] [Payara 5.0] [WARNING] [] [eu.agilejava.snoopee] [tid: _ThreadID=146 _ThreadName=__ejb-thread-pool2] [timeMillis: 1502055130011] [levelValue: 900] [[
  Handshake error.]]
@EnableSnoopEEClient(serviceName = "temperature")
@ApplicationPath("/weather")
public class WeatherMicroService extends Application {

}
 */
@Path("/temperature")
public class TemperatureResource {

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response getAverageTemperature() {
        Temperature temperature = new Temperature();
        temperature.setTemperature(35D);
        temperature.setTemperatureScale(TemperatureScale.CELSIUS);

        return Response.ok(temperature).build();
    }
}
public class Temperature {

    private Double temperature;
    private TemperatureScale temperatureScale;

    public Double getTemperature() {
        return temperature;
    }

    public void setTemperature(Double temperature) {
        this.temperature = temperature;
    }

    public TemperatureScale getTemperatureScale() {
        return temperatureScale;
    }

    public void setTemperatureScale(TemperatureScale temperatureScale) {
        this.temperatureScale = temperatureScale;
    }

    @Override
    public String toString() {
        return "Temperature{" +
                "temperature=" + temperature +
                ", temperatureScale=" + temperatureScale +
                '}';
    }
}

snoopee.yml

snoopee:
   host: http://localhost
   port: 8080
   serviceRoot: weather-service-snoopee-1.0/weather
   snoopeeService: localhost:8081/snoop-service/

Using Docker for Mac & Pulling SnoopEE first with:

docker pull ivargrimstad/snoopee-service:2.0.0-SNAPSHOT

Executing it with:

docker run -it -p 8081:8080 ivargrimstad/snoop-service
ivargrimstad commented 6 years ago

I know there were an issue with reaching the host from Docker after an upgrade. Will check this again

ivargrimstad commented 6 years ago

Not to self: When fixing this, also att a litte robustness to allow for missing trailing / in configuration.