0

I am using Netflix Zuul with Spring Boot for routing/proxy purposes. It listens on a port defined in a application.yml:

server:
  port: ${port:8080}

I also wanted to use Hystrix for circuit breaking as well as having the Hystrix dashboard. I achieved that with the annotation as follow:

@EnableHystrixDashboard
@SpringBootApplication
public class Main {
    public static void main(String[] args) {
        new SpringApplication(Main.class).run(args);
    }
}

Now I can access the dashboard under localhost:8080/hystrix. Additionaly I have Spring Actuator under port 8181 set with management.port: 8181 property in application.yml.

My question is:

  • is that possible to have hystrix dashboard located under other port, e.g. 8181 or any other? So I can be sure that port 8080 is dedicated only for routing/proxy purposes?
Dariusz Mydlarz
  • 2,940
  • 6
  • 31
  • 59
  • just add the server.port property in hystrix dashboard's application.yml. it will start in other port what the actuall problem . – Grinish Nepal May 19 '16 at 18:33
  • The Hystirx Dashboard is enabled in the same application as my Zuul, so changing the port makes Zuul listening on different port, not only Hystirx Dashboard – Dariusz Mydlarz May 20 '16 at 05:14
  • 1
    why would you do that ... if you need diff port i think hystrix dashboard will have to be a seperate application... Having it on the same project might complicate things.... – Grinish Nepal May 20 '16 at 17:42
  • Actually I did it this way at the moment, I was curious whether is it possible to have as one app. However, thanks :) – Dariusz Mydlarz May 23 '16 at 05:51

1 Answers1

0

If you run both things under the same application they will always have the same port because both things run in the same embedded server which is what is configured by using the property:

server: port: 8080

Ramon Rius
  • 404
  • 3
  • 7