<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi yeah I managed to get it to work. I set undertow server as&nbsp;<span style="background-color: rgba(255, 255, 255, 0);">172.17.0.65 and it worked. To my understanding, this IP is something docker comes up with and is an internal IP (it's different every time you run a docker container). The external IP is something completely different.</span></div><div><br></div><div>So in summary you must set the host server for undertow as the Internal IP in the Iptables created by docker.<br><br><br></div><div><br>On 31 Oct 2014, at 19:55, Bernd &lt;<a href="mailto:ecki@zusammenkunft.net">ecki@zusammenkunft.net</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><p dir="ltr">Your iptables do not contain 127.0.0.1 and ::1 as destination?</p>
<p dir="ltr">I would try it without a packet filter first.</p>
<div class="gmail_quote">Am 31.10.2014 12:51 schrieb "Chris Christo" &lt;_<a href="mailto:c.c@mail.com">c.c@mail.com</a>&gt;:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Has anyone managed to get undertow working with docker (on CoreOS)?<br>
<br>
I have a very basic jar that starts up an undertow server on (localhost at port 80) and has a single HttpHandler at the endpoint ‘/hello’. I’ve tested the jar locally and the endpoint works fine.<br>
<br>
I have a docker file along the lines of:<br>
<br>
---------------<br>
FROM dockerfile/java:oracle-java8<br>
<br>
## wget the app from a server<br>
<br>
CMD java -jar my-app.jar<br>
<br>
EXPOSE 80<br>
---------------<br>
<br>
I then run the container (after building it from the above docker file) as follows:<br>
<br>
docker run -d -p 80:80 my-app<br>
<br>
(Yes I made sure the server did start and is running before the following:)<br>
<br>
I see that the iptables are as follows (which is identical to what dockerfiles/nginx produces):<br>
<br>
---------------<br>
Chain INPUT (policy ACCEPT)<br>
target&nbsp; &nbsp; &nbsp;prot opt source&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;destination<br>
<br>
Chain FORWARD (policy ACCEPT)<br>
target&nbsp; &nbsp; &nbsp;prot opt source&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;destination<br>
ACCEPT&nbsp; &nbsp; &nbsp;tcp&nbsp; --&nbsp; anywhere&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;172.17.0.65&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp dpt:http<br>
ACCEPT&nbsp; &nbsp; &nbsp;all&nbsp; --&nbsp; anywhere&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;anywhere&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ctstate RELATED,ESTABLISHED<br>
ACCEPT&nbsp; &nbsp; &nbsp;all&nbsp; --&nbsp; anywhere&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;anywhere<br>
ACCEPT&nbsp; &nbsp; &nbsp;all&nbsp; --&nbsp; anywhere&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;anywhere<br>
<br>
Chain OUTPUT (policy ACCEPT)<br>
target&nbsp; &nbsp; &nbsp;prot opt source&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;destination<br>
---------------<br>
<br>
Finally I try to curl at the ‘/hello’ endpoint but I just get a connection refused. I try the curl request to localhost from within the same server and it doesn’t work. I also try from a different computer using the public IP of the machine and it does’t work.<br>
<br>
The dockerfile/nginx works perfect when I curl at it at port 80.<br>
<br>
I’m stumped for ideas, please help!<br>
<br>
Thanks,<br>
<br>
Chris<br>
<br>
<br>
<br>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</blockquote></div>
</div></blockquote></body></html>