spring cloud - Error when getting the Info from Config Server -
i configuring eureka client app, registered port result in 80.
the server config obtained eureka auto-discovery enabled, when auto-discovery disabled port registered correctly.
the port of app assigned command line (--server.port=8080) , deleted in other properties files (app.yaml, boostrap.yaml , in config server git repo)
i have notice in code:
eurekaclientconfiguration.java
if (port != 0 && instanceconfig.getnonsecureport() == 0) { instanceconfig.setnonsecureport(port); }
the instanceconfig.getnonsecureport() never 0, due this, nonsecureport property never changed.
i have register port property in other place?
edited add detail:
i mean bootstrap.yml has following lines:
cloud:config:discovery:enabled: true
the yml config in github repository , doesn’t have port assigned
the app running in port 8082 app param --server.port=8082 when registered in eureka port 80 instead of 8082
<port enabled="true">8082</port> <secureport enabled="false">443</secureport>
this cause every based ribbon invocation doesn’t correct url.
i notice port setting correctly in handler event after init
eurekaclientconfiguration.java:
public void onapplicationevent(embeddedservletcontainerinitializedevent event) { ... eurekaclientconfiguration.this.port = event.getembeddedservletcontainer().getport();
but flag "running" active , doesn't have effect
thanks lot help
Comments
Post a Comment