Ok thanks, so now I’ve simplified my Tomcat Dockerfile, and I can reach the Unicorn in a few seconds, I can even see the full expected starting log :
05.05.17 11:17:35 (+0200) Downloaded application 'registry2.resin.io/testapp/f339ed6d6cfaf6d28670d8702256d8b9b72de5d7'
05.05.17 11:17:36 (+0200) Killing application 'registry2.resin.io/testapp/95bdffab5724a4cec26a047164e03a4ce41d0a7b'
05.05.17 11:17:41 (+0200) Killed application 'registry2.resin.io/testapp/95bdffab5724a4cec26a047164e03a4ce41d0a7b'
05.05.17 11:17:42 (+0200) Installing application 'registry2.resin.io/testapp/f339ed6d6cfaf6d28670d8702256d8b9b72de5d7'
05.05.17 11:17:44 (+0200) Installed application 'registry2.resin.io/testapp/f339ed6d6cfaf6d28670d8702256d8b9b72de5d7'
05.05.17 11:17:44 (+0200) Starting application 'registry2.resin.io/testapp/f339ed6d6cfaf6d28670d8702256d8b9b72de5d7'
05.05.17 11:17:54 (+0200) Started application 'registry2.resin.io/testapp/f339ed6d6cfaf6d28670d8702256d8b9b72de5d7'
05.05.17 11:20:36 (+0200) 05-May-2017 09:20:36.799 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
05.05.17 11:20:36 (+0200) 05-May-2017 09:20:36.859 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.8-openjdk/jre/lib/arm/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/arm:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/arm:/usr/java/packages/lib/arm:/lib:/usr/lib
05.05.17 11:21:00 (+0200) 05-May-2017 09:20:59.886 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
05.05.17 11:21:08 (+0200) 05-May-2017 09:21:08.860 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
05.05.17 11:21:09 (+0200) 05-May-2017 09:21:09.526 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
05.05.17 11:21:11 (+0200) 05-May-2017 09:21:11.510 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
05.05.17 11:21:11 (+0200) 05-May-2017 09:21:11.665 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 165367 ms
05.05.17 11:21:16 (+0200) 05-May-2017 09:21:16.915 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
05.05.17 11:21:17 (+0200) 05-May-2017 09:21:17.006 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.14
05.05.17 11:21:19 (+0200) 05-May-2017 09:21:19.235 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
05.05.17 11:21:21 (+0200) 05-May-2017 09:21:21.369 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
05.05.17 11:21:21 (+0200) 05-May-2017 09:21:21.519 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 9798 ms
And when I exec a shell in my running container, can see the expected “HTTP 404” response on querying “http://localhost:8080” :
/opt/apache-tomcat-8.5.14 # wget localhost:8080
Connecting to localhost:8080 (127.0.0.1:8080)
wget: server returned error: HTTP/1.1 404
It also works from the host :
root@30467b3:~# wget localhost:8080
Connecting to localhost:8080 (127.0.0.1:8080)
wget: server returned error: HTTP/1.1 404
and it works from my windows PC on local address :
C:\Users\Tristan>"C:\Program Files (x86)\GnuWin32\bin\wget" 192.168.1.14:8080
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2017-05-05 11:47:47-- http://192.168.1.14:8080/
Connexion vers 192.168.1.14:8080...connecté.
requête HTTP transmise, en attente de la réponse...404
2017-05-05 11:47:47 ERREUR 404: (pas de description).
BUT when I try the public device URL on port 8080, it doesn’t work, it says “ERR_CONNECTION_CLOSED” and I don’t get the expected HTTP 404. Your doc says :
“Resin.io devices expose all ports by default, meaning you can run applications which listen on any port without issue.”
So did I miss a step to declare this 8080 port, or should I fill an issue report somewhere ?
P.S. about the autorestart, according to Docker doc it’s supposed use an incremental back-off algorithm, but it looks like it’s occuring every 10 s for ever, are you by-passing docker restart mechanisms ?