title: Registering a Eureka Client to a Eureka Server
body: <p>i try to connect a Eureka Server to a Eureka Client without success. All in a Container. Docker/Container Network is set to Host.</p>
  <p>I tried hosting both on my Desktop: Works
  I tried hosting both on my Raspberry pi: Works</p>
  <p>But when i host the Server on my Raspberry Pi i can't connect the Service from my Desktop. I tried alot without success.</p>
  <p>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.</p>
  <p>Client</p>
  <pre><code>server:
    port: 9001
  
  
  spring:
    application.name: USER-SERVICE
    cloud:
      inetutils:
        preferred-networks:
          - 192.168
  
  eureka:
    instance:
      prefer-ip-address: true
      hostname: 192.168.0.20
    client:
      fetch-registry: true
      register-with-eureka: true
      service-url:
        defeaultZone: http://192.168.0.69:8761/eureka
  </code></pre>
  <p>Server</p>
  <pre><code>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
  </code></pre>
  <p>192.168.0.20 is my desktop
  192.168.0.69 is my raspberry pi</p>
  <p>Is this even possible? I tried alot different Settings tho... And as i said both hosted local or on the raspberry works.</p>
  <p>Thanks in advance</p>
  <p>Error Message :</p>
  <pre><code>2021-08-15 00:40:24.177  INFO 16044 --- [           main] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eureka/}, exception=I/O error on GET request for &quot;http://localhost:8761/eureka/apps/&quot;: Connect to localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect stacktrace=org.springframework.web.client.ResourceAccessException: I/O error on GET request for &quot;http://localhost:8761/eureka/apps/&quot;: Connect to localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:8761 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
  
  </code></pre>