Closed Rutik333 closed 2 years ago
Could you show me how you register your eureka service?
eureka_client.init(eureka_server=eurekaConfig["eureka_server"], instance_ip= eurekaConfig["instance_host"], instance_host= eurekaConfig["instance_host"], status_page_url=eurekaConfig["status_page_url"], home_page_url=eurekaConfig["home_page_url"], health_check_url=eurekaConfig["health_check_url"], eureka_protocol="https",
# duration_in_secs=30,
# instance_secure_port_enabled= True,
# instance_unsecure_port_enabled= False,
app_name=eurekaConfig["app_name"],
instance_port=eurekaConfig["instance_port"],
ha_strategy=eureka_client.HA_STRATEGY_RANDOM
# eureka_context="/eureka"
)
On https://localhost:8761/eureka my eurekaserver is running and i configured same url in eureka_server
Please confirm the value of eurekaConfig["instance_port"]
is 5000
, and if this value is 5000
, please visit your euraka server via url http://localhost:8761/eureka/v2/apps
(or http://localhost:8761/eureka/apps
, depends on which version of eureka server you are using) and check if the information of your python-service
, and it's nice you can show the result XML here.
for my python service secure Port is 9443 and port is 5000
for other java service its same as there port did I miss any configuration?
It seems that you have set instance_secure_port_enabled
to True
, but in your code shown upside, you comments that configuration. The 9443 secure port is disable by default. Please try to set instance_secure_port_enabled= False
and instance_unsecure_port_enabled= True
explicitly, and check the result via http://localhost:8761/eureka/v2/apps
eureka_client.init(eureka_server=eurekaConfig["eureka_server"], instance_host= eurekaConfig["instance_host"], instance_ip = eurekaConfig["instance_ip"], status_page_url=eurekaConfig["status_page_url"], home_page_url=eurekaConfig["home_page_url"], health_check_url=eurekaConfig["health_check_url"], eureka_protocol="https",
instance_secure_port_enabled= False, instance_unsecure_port_enabled= True, app_name=eurekaConfig["app_name"], instance_port=eurekaConfig["instance_port"])
I changed my configuration to this still secure port is 9443 how I make secure port to 5000 ,is there any other configuration
In java if my service port is 5013 then my secure port is also 5013 but in python its 9443
update I forgot to add instance_secure_port: The secure port of this instance. after adding this now it working fine Thankyou so much @keijack
I am having python service . Now I want to call my python service request though java which communicate python service through Eureka I am successfully registered my python service to eureka but while I'm trying to communicate java service with python I'm getting error feign.RetryableException: Failed to connect to 127.0.0.1:9443 executing POST http:/python-service/apipy/list
my java service running on 9996 my python service running on 5000 my eureka server running on 8761
but why eureka its trying to connect 9443 port while I want to connect to python service which is on 5000