Skip to content

Amazon eureka client connect to eureka server often fail #86

Description

@wuxinke1

Recently, this error often appears, why is this?
`[2024-05-06 05:37:33]-[eureka_client]-[line:1147] -WARNING: Eureka server [http://127.0.0.1:7001/eureka] is down, use next url to try.
Traceback (most recent call last):
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1161, in __connect_to_eureka_server
self.__try_eureka_server_in_cache(fun)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1103, in __try_eureka_server_in_cache
raise EurekaServerConnectionException("All eureka servers in cache are down!")
py_eureka_client.eureka_client.EurekaServerConnectionException: <urlopen error All eureka servers in cache are down!>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1145, in __try_eureka_servers_in_list
fun(url)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1247, in do_send_heartbeat
send_heartbeat(url, self.__instance["app"],
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 384, in send_heartbeat
http_client.load(req, timeout=_DEFAULT_TIME_OUT)[0]
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/http_client.py", line 146, in load
res = http_cli.urlopen()
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/http_client.py", line 111, in urlopen
return urllib.request.urlopen(self.request, data=self.data, timeout=self.timeout,
File "/usr/lib64/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib64/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib64/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib64/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib64/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404:
[2024-05-06 05:37:33]-[eureka_client]-[line:1252] -WARNING: Cannot send heartbeat to server, try to register.
Traceback (most recent call last):
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1161, in __connect_to_eureka_server
self.__try_eureka_server_in_cache(fun)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1103, in __try_eureka_server_in_cache
raise EurekaServerConnectionException("All eureka servers in cache are down!")
py_eureka_client.eureka_client.EurekaServerConnectionException: <urlopen error All eureka servers in cache are down!>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1131, in __try_all_eureka_servers
self.__try_eureka_server_in_zone(fun)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1106, in __try_eureka_server_in_zone
self.__try_eureka_servers_in_list(fun, self.__eureka_server_conf.servers_in_zone, self.zone)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1156, in __try_eureka_servers_in_list
raise EurekaServerConnectionException(f"All eureka servers in zone[{_zone}] are down!")
py_eureka_client.eureka_client.EurekaServerConnectionException: <urlopen error All eureka servers in zone[default] are down!>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1250, in send_heartbeat
self.__connect_to_eureka_server(do_send_heartbeat)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1163, in __connect_to_eureka_server
self.__try_all_eureka_servers(fun)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1133, in __try_all_eureka_servers
self.__try_eureka_server_not_in_zone(fun)
File "/py3.8/lib64/python3.8/site-packages/py_eureka_client/eureka_client.py", line 1116, in __try_eureka_server_not_in_zone
raise EurekaServerConnectionException("All eureka servers in all zone are down!")
py_eureka_client.eureka_client.EurekaServerConnectionException: <urlopen error All eureka servers in all zone are down!>`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions