<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Spring Cloud Open Feign &#8211; My Shitty Code</title>
	<atom:link href="https://myshittycode.com/tag/spring-cloud-open-feign/feed/" rel="self" type="application/rss+xml" />
	<link>https://myshittycode.com</link>
	<description>Embracing the Messiness in Search of Epic Solutions</description>
	<lastBuildDate>Fri, 06 Jan 2023 16:15:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://myshittycode.com/wp-content/uploads/2022/04/cropped-icon-32x32.png</url>
	<title>Spring Cloud Open Feign &#8211; My Shitty Code</title>
	<link>https://myshittycode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">205304208</site>	<item>
		<title>Feign + Eureka: UnknownHostException when Attempting to Invoke a Service</title>
		<link>https://myshittycode.com/2019/04/30/feign-eureka-unknownhostexception-when-attempting-to-invoke-a-service/</link>
					<comments>https://myshittycode.com/2019/04/30/feign-eureka-unknownhostexception-when-attempting-to-invoke-a-service/#comments</comments>
		
		<dc:creator><![CDATA[Shitty Author]]></dc:creator>
		<pubDate>Wed, 01 May 2019 01:52:09 +0000</pubDate>
				<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Spring Boot]]></category>
		<category><![CDATA[Spring Cloud Netflix Eureka]]></category>
		<category><![CDATA[Spring Cloud Netflix Ribbon]]></category>
		<category><![CDATA[Spring Cloud Open Feign]]></category>
		<guid isPermaLink="false">http://myshittycode.com/?p=1104</guid>

					<description><![CDATA[<p>PROBLEM When attempting use Feign to invoke a service through Eureka, the following exception occurs:- SOLUTION Go to the donkey-kong-service app and add the following line to the application.properties:- Now, when Feign tries to invoke the service, the IP address will be used instead of the OS&#8217; reported hostname.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2019/04/30/feign-eureka-unknownhostexception-when-attempting-to-invoke-a-service/">Feign + Eureka: UnknownHostException when Attempting to Invoke a Service</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">PROBLEM</h2>



<p>When attempting use Feign to invoke a service through Eureka, the following exception occurs:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
MY-HOST-NAME executing GET http://donkey-kong-service/throw/barrels/10
feign.RetryableException: MY-HOST-NAME executing GET http://donkey-kong-service/throw/barrels/10
	at feign.FeignException.errorExecuting(FeignException.java:84)
	at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:113)
	...
Caused by: java.net.UnknownHostException: MY-HOST-NAME
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
</pre></div>


<h2 class="wp-block-heading">SOLUTION</h2>



<p>Go to the <b>donkey-kong-service</b> app and add the following line to the <code>application.properties</code>:-</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
eureka.instance.prefer-ip-address=true
</pre></div>


<p>Now, when Feign tries to invoke the service, the IP address will be used instead of the OS&#8217; reported hostname.</p>
<p>The post <a rel="nofollow" href="https://myshittycode.com/2019/04/30/feign-eureka-unknownhostexception-when-attempting-to-invoke-a-service/">Feign + Eureka: UnknownHostException when Attempting to Invoke a Service</a> appeared first on <a rel="nofollow" href="https://myshittycode.com">My Shitty Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://myshittycode.com/2019/04/30/feign-eureka-unknownhostexception-when-attempting-to-invoke-a-service/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1104</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)
Database Caching using Disk

Served from: myshittycode.com @ 2026-02-18 22:12:42 by W3 Total Cache
-->