Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed eureka connection on UAT #83

Open
AAyiku opened this issue May 7, 2024 · 4 comments
Open

Failed eureka connection on UAT #83

AAyiku opened this issue May 7, 2024 · 4 comments

Comments

@AAyiku
Copy link

AAyiku commented May 7, 2024

Hi @keijack
I am having issues with connecting my python fastapi app to the discovery server on a UAT environment. However, I have no issues connecting to my discovery server locally. Here is the code snippet:

[2024-05-07 10:38:28]-[Thread-1]-[eureka_client:633] WARNING: Eureka server ["http://discoveryserver.kowri.uat:8080/eureka/"] is down, use next url to try. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 631, in __try_eureka_servers_in_list await fun(url) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 709, in do_register await _register(url, self.__instance) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_basic.py", line 301, in _register req = http_client.HttpRequest(f"{_format_url(eureka_server)}apps/{quote(instance_dic['app'])}", File "/usr/local/lib/python3.9/site-packages/py_eureka_client/http_client.py", line 82, in __init__ raise URLError("Unvalid URL") urllib.error.URLError: <urlopen error Unvalid URL> [2024-05-07 10:38:29]-[Thread-1]-[eureka_client:713] WARNING: Register error! Will try in next heartbeat. Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 616, in __try_all_eureka_servers await self.__try_eureka_server_in_zone(fun) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 586, in __try_eureka_server_in_zone await self.__try_eureka_servers_in_list( File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 643, in __try_eureka_servers_in_list raise EurekaServerConnectionException( 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 "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 710, in register await self.__connect_to_eureka_server(do_register) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 653, in __connect_to_eureka_server await self.__try_all_eureka_servers(fun) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 618, in __try_all_eureka_servers await self.__try_eureka_server_not_in_zone(fun) File "/usr/local/lib/python3.9/site-packages/py_eureka_client/eureka_client.py", line 598, in __try_eureka_server_not_in_zone raise EurekaServerConnectionException( py_eureka_client.eureka_client.EurekaServerConnectionException: <urlopen error All eureka servers in all zone are down!>

Any sort of help will be very appreciated!

@keijack
Copy link
Owner

keijack commented May 8, 2024

What if you use curl to visit http://discoveryserver.kowri.uat:8080/eureka/ ?

@AAyiku
Copy link
Author

AAyiku commented May 8, 2024

It is an internal link, so it can't be accessed locally

@AAyiku
Copy link
Author

AAyiku commented May 8, 2024

@keijack would the library be able to connect to a proxy server, that gives access to a the discovery server?

@keijack
Copy link
Owner

keijack commented May 10, 2024

Currently no, pythone-eureka-client cannot connect to a eureka server via a proxy server, however, you can define your own HttpClient to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants