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

socket.herror: [Errno 11004] host not found #75

Open
ThanhTu130200 opened this issue Mar 20, 2023 · 2 comments
Open

socket.herror: [Errno 11004] host not found #75

ThanhTu130200 opened this issue Mar 20, 2023 · 2 comments

Comments

@ThanhTu130200
Copy link

I ran to this error when registry to java eureka server:

WARNING: Error when getting host by ip
Traceback (most recent call last):
File "C:\Users\ASUS\AppData\Local\Programs\Python\Python38\lib\site-packages\py_eureka_client\netint_utils.py", line 35, in get_host_by_ip
return socket.gethostbyaddr(ip)[0]
socket.herror: [Errno 11004] host not found

And here is my code:

from vcmc import LocationVisualizer
import py_eureka_client.eureka_client as eureka_client

if __name__ == "__main__":
    eureka_client.init(eureka_server="http://10.1.5.60:9090/micro-registration/",
                            app_name="mwg-app-accounting-service-hello-world",
                            instance_port=80)
    
    app = LocationVisualizer()
    app.run()
@keijack
Copy link
Owner

keijack commented Mar 20, 2023

That means that the host cannot find by ip automatically, you should specify the instance_host in init method.

@AhmdFahad
Copy link

eureka_client.init(eureka_server="http://localhost:8761/eureka/",
app_name="Service4",
instance_port=5000,
instance_host="127.0.0.1")🙃

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

3 participants