My image contains a java application and is builded from this docker file:
FROM cogniteev/oracle-java:java8
MAINTAINER me@opencanarias.es
RUN mkdir /opt/siscloudrepositoryapy
WORKDIR /opt/siscloudrepositoryapy
COPY ./target/siscloudreposirotyapi*.jar /opt/siscloudrepositoryapy/
COPY ./startup.sh /opt/siscloudrepositoryapy/
RUN chmod +x /opt/siscloudrepositoryapy/startup.sh
RUN mkdir /opt/siscloudrepositoryapy/lib
COPY ./target/lib/*.jar /opt/siscloudrepositoryapy/lib/
EXPOSE 4567
CMD /opt/siscloudrepositoryapy/startup.sh
I export the image using “docker save tarfile.tar”. On the host I import the image using command “docker load -i tarfile.tar”.
I have no problems to run (docker run -it -p 4567:4567 IMAGEID bash) the container but when we start using it. On some hosts works perfectly but on others doesn’t.
To test the container I do (lynx http://localhost:4567/api/me@opencanarias.es/projects). It works on Host1, does not work on Host2.
This is all the info I have…
Host 1 - debian 8 - KVM - Virtual Machine
VERSION
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.5.1
Git commit: f4bf5c7
Built:
OS/Arch: linux/amd64
Server:
Version: 1.8.3
API version: 1.20
Go version: go1.5.1
Git commit: f4bf5c7
Built:
OS/Arch: linux/amd64
INFO
Containers: 2
Images: 18
Storage Driver: devicemapper
Pool Name: docker-8:1-2-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 2.559 GB
Data Space Total: 107.4 GB
Data Space Available: 5.744 GB
Metadata Space Used: 2.548 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.145 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.110 (2015-10-30)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.2.0-040200-generic
Operating System: Debian GNU/Linux stretch/sid (containerized)
CPUs: 1
Total Memory: 993.1 MiB
Name: debian8
ID: KTIV:MOFC:KS3G:SQNY:3BRW:SQFT:YX62:E33Z:FANE:2YM7:OMJ3:Q3VD
IMAGES
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 906974ea0c0a 33 hours ago 655.1 MB
CONTAINERS
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d208f42677c8 9069 "bash" 8 minutes ago Up 8 minutes 0.0.0.0:4567->4567/tcp thirsty_heisenberg
UNAME -A
Linux debian8 4.2.0-040200-generic #201508301530 SMP Sun Aug 30 19:31:40 UTC 2015 x86_64 GNU/Linux
Host 2 - debian 8 - GCE - Virtual Machine
VERSION
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: linux/amd64
INFO
Containers: 12
Images: 40
Storage Driver: overlay
Backing Filesystem: extfs
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.2.0-0.bpo.1-amd64
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 3.618 GiB
Name: nodo1
ID: VJ2B:3FLU:QQJR:W7KF:H2C7:3WQH:GQ2G:2FF2:7MC5:IFSB:Z3K6:SYGH
IMAGES
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
xxxxxx/javatest latest 906974ea0c0a 33 hours ago 655.1 MB
CONTAINERS
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c363d08c9676 9069 "bash" 24 hours ago Up 24 hours 0.0.0.0:4567->4567/tcp nostalgic_kowalevski
UNAME -A
Linux nodo1 4.2.0-0.bpo.1-amd64 #1 SMP Debian 4.2.3-2~bpo8+1 (2015-10-20) x86_64 GNU/Linux
When it doesn’t work this is the problem:
And this is the console output:
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeaders(Ljava/lang/String;)Ljava/util/Collection;
at spark.utils.GzipUtils.checkAndWrap(GzipUtils.java:64)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:251)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)
[qtp1186902720-14] WARN org.eclipse.jetty.server.HttpChannel - //pro-container01.opencanarias.com:4567/api/bcuesta@opencanarias.es/projects
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeaders(Ljava/lang/String;)Ljava/util/Collection;
at spark.utils.GzipUtils.checkAndWrap(GzipUtils.java:64)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:251)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)
[qtp1186902720-15] INFO spark.webserver.MatcherFilter - The requested route [/favicon.ico] has not been mapped in Spark
[qtp1186902720-15] WARN org.eclipse.jetty.server.HttpChannel - //pro-container01.opencanarias.com:4567/favicon.ico
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeaders(Ljava/lang/String;)Ljava/util/Collection;
at spark.utils.GzipUtils.checkAndWrap(GzipUtils.java:64)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:251)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)
[qtp1186902720-15] WARN org.eclipse.jetty.server.HttpChannel - //pro-container01.opencanarias.com:4567/favicon.ico
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getHeaders(Ljava/lang/String;)Ljava/util/Collection;
at spark.utils.GzipUtils.checkAndWrap(GzipUtils.java:64)
at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:251)
at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)
I have the same problem on a CentOS 6.7 virtual machine.
My developer team argue that the same container doesn’t work every where the same way!!!.
Thanks in advance.