Registering a Eureka Client to a Eureka Server

Published

i try to connect a Eureka Server to a Eureka Client without success. All in a Container. Docker/Container Network is set to Host.

I tried hosting both on my Desktop: Works
I tried hosting both on my Raspberry pi: Works

But when i host the Server on my Raspberry Pi i can’t connect the Service from my Desktop. I tried alot without success.

Sidenote: i can access Eureka Dashboard, and i have another Container running with a successful connection to a SQL database on my Desktop, i guess there shouldn’t be a network problem.

Client

server:
  port: 9001


spring:
  application.name: USER-SERVICE
  cloud:
    inetutils:
      preferred-networks:
        - 192.168

eureka:
  instance:
    prefer-ip-address: true
    hostname: 192.168.0.69
  client:
    fetch-registry: true
    register-with-eureka: true
    service-url:
      defeaultZone: http://192.168.0.69:8761/eureka

Server

server:
  port: 8761


eureka:
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://192.168.0.69:8761/eureka
  instance:
    hostname: 192.168.0.69
    prefer-ip-address: true

192.168.0.20 is my desktop
192.168.0.69 is my raspberry pi

Is this even possible? I tried alot different Settings tho… And as i said both hosted local or on the raspberry works.

Thanks in advance

Source: Docker Questions

Published
Categorised as docker, java, netflix-eureka, raspberry-pi, spring Tagged , , , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq