Docker image apicurio-registry-mem:2.4.1.Final is not working when using Colima as the docker engine
First of all latest is not the latest image:
docker pull apicurio/apicurio-registry-mem:latest
Last pushed 2 years ago
so using command line according to main page:
docker run -it -p 8080:8080 apicurio/apicurio-registry-mem
gives you version two years old
but at least this version works.
Booting the image with the following settings:
docker run -it -p 8080:8080 apicurio/apicurio-registry-mem:latest-release
gives the following result in the logs:
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar
Error: -jar requires jar file specification
Could you fix it?
Thank you for reporting an issue!
Pinging @jsenko to respond or triage.
The same problem with:
docker run -it -p 8080:8080 apicurio/apicurio-registry-kafkasql:latest-release
docker run -it -p 8080:8080 apicurio/apicurio-registry-sql:latest-release
I know that for these modes I have to provide additional configuration but these images don't even boot.
In the last layer of the image I see: ADD app-files/apicurio-registry-app-2.4.1.Final-all.tar.gz /deployments/ tar.gz file is probably being added instead of jar
Odd. Here's what I get (spoiler alert: success) when I run the latest release and 2.4.1.Final containers:
- Latest Release: https://gist.github.com/EricWittmann/7cb67afd336221d9099144e0001de455
- 2.4.1.Final: https://gist.github.com/EricWittmann/6dee870c14c0a2fdd30a7a1b5a155ff2
Works OK for me in both cases. Do you get the same result with the 2.4.1.Final container?
Also, while yes the latest tag is stale (we stopped using it), the latest-release and release # tags should be used and documented instead. Can you point me to where the docs are advising using the old latest tag?
I'll try it with docker instead of podman on another machine...
Here's my result running the latest-release tag using docker on centos 7:
[ewittman@bluejay ~]$ docker pull apicurio/apicurio-registry-mem:latest-release
latest-release: Pulling from apicurio/apicurio-registry-mem
762908e901a6: Pull complete
66fbbc2d9513: Pull complete
de4ee924c141: Pull complete
Digest: sha256:de9cc36c6c92dcc3b5764f91a2c4efcff863e92ef75fbf2903bec04688960830
Status: Downloaded newer image for apicurio/apicurio-registry-mem:latest-release
docker.io/apicurio/apicurio-registry-mem:latest-release
[ewittman@bluejay ~]$ docker run -it -p 8080:8080 apicurio/apicurio-registry-mem:latest-release
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar /deployments/apicurio-registry-app-2.4.1.Final-runner.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jolokia.util.ClassUtil (file:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar) to constructor sun.security.x509.X500Name(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.jolokia.util.ClassUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I> No access restrictor found, access to any MBean is allowed
Jolokia: Agent started with URL https://172.17.0.3:8778/jolokia/
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-12-20 19:18:08 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) apicurio-registry-app 2.4.1.Final on JVM (powered by Quarkus 2.14.0.Final) started in 3.150s. Listening on: http://0.0.0.0:8080
2022-12-20 19:18:08 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) Profile prod activated.
2022-12-20 19:18:08 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) Installed features: [agroal, cdi, jdbc-h2, micrometer, narayana-jta, oidc, rest-client, rest-client-jackson, resteasy, resteasy-jackson, scheduler, security, servlet, smallrye-context-propagation, smallrye-fault-tolerance, smallrye-health, vertx]
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.RegistryStorageProducer] (executor-thread-2) Using RegistryStore: io.apicurio.registry.storage.impl.sql.InMemoryRegistryStorage_ClientProxy
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) SqlRegistryStorage constructed successfully. JDBC URL: jdbc:h2:mem:registry_db
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Checking to see if the DB is initialized.
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Database not initialized.
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Initializing the Apicurio Registry database.
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Database type: h2
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Checking to see if the DB is up-to-date.
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-2) Build's DB version is 11
2022-12-20 19:18:09 INFO <> [io.apicurio.registry.storage.impl.sql.InMemoryRegistryStorage] (executor-thread-2) Using In Memory (H2) SQL storage.
Side note: the ADD command in the Dockerfile will automatically unpack the tar.gz file. This is important for our container because the Quarkus based application is not just a JAR - it's a JAR with a bunch of other (library) JARs.
Can you report what version of docker you're using? What host OS? Etc. Any additional information you might provide to try and reproduce this would be useful. I'm testing using podman on Fedora 37 and docker on centos 7.
Can you point me to where the docs are advising using the old latest tag?
on the main git page: https://github.com/Apicurio/apicurio-registry
Run one of the above docker images like this: docker run -it -p 8080:8080 apicurio/apicurio-registry-mem ... latest : represents the absolute newest build - essentially the newer of latest-release or latest-snapshot
Also, while yes the latest tag is stale (we stopped using it)
so it would be good to remove this tag from docker hub
really strange behavior:
docker run -it -p 8089:8080 apicurio/apicurio-registry-mem:latest-release
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ... ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected) INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar Error: -jar requires jar file specification
so as deployments folder doesn't have any jar file
thanks to your output I tried to set up jar file directly:
docker run -it -p 8089:8080 -e JAVA_APP_JAR=/deployments/apicurio-registry-app-2.4.1.Final-runner.jar apicurio/apicurio-registry-mem:latest-release
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ... INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar /deployments/apicurio-registry-app-2.4.1.Final-runner.jar WARNING: An illegal reflective access operation has occurred
it launched correctly, the page opens, everything seems to be working
so I created a section in docker-compose apicurio-registry-mem: image: apicurio/apicurio-registry-kafkasql:latest-release restart: unless-stopped hostname: apicurio-registry-mem container_name: apicurio-registry-mem ports: - 8089:8080 environment: JAVA_APP_JAR: /deployments/apicurio-registry-app-2.4.1.Final-runner.jar logging: driver: "local" options: mode: "non-blocking"
docker-compose up -d apicurio-registry-mem
Creating apicurio-registry-mem ... done
docker logs -f apicurio-registry-mem
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ... ERROR No such file /deployments/apicurio-registry-app-2.4.1.Final-runner.jar INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar Error: -jar requires jar file specification
maybe it's something with the owner of the deployments directory and visibility permissions?
docker run -it -p 8089:8080 -e JAVA_APP_JAR=/deployments/apicurio-registry-app-2.4.1.Final-runner.jar --name apicurio-registry-mem apicurio/apicurio-registry-mem:latest-release
docker exec -it apicurio-registry-mem bash
[jboss@2e3d018d344c ~]$ ls -al ls: cannot access '.': Operation not permitted ls: cannot access '..': Operation not permitted ls: cannot access '.bash_logout': Operation not permitted ls: cannot access '.bash_profile': Operation not permitted ls: cannot access '.bashrc': Operation not permitted ls: cannot access '.m2': Operation not permitted total 0 d????????? ? ? ? ? ? . d????????? ? ? ? ? ? .. -????????? ? ? ? ? ? .bash_logout -????????? ? ? ? ? ? .bash_profile -????????? ? ? ? ? ? .bashrc d????????? ? ? ? ? ? .m2 [jboss@2e3d018d344c ~]$ cd / [jboss@2e3d018d344c /]$ ls -al ls: cannot access '.': Operation not permitted ls: cannot access '..': Operation not permitted ls: cannot access 'bin': Operation not permitted ls: cannot access 'boot': Operation not permitted ls: cannot access 'dev': Operation not permitted ls: cannot access 'etc': Operation not permitted ls: cannot access 'home': Operation not permitted ls: cannot access 'lib': Operation not permitted ls: cannot access 'lib64': Operation not permitted ls: cannot access 'lost+found': Operation not permitted ls: cannot access 'media': Operation not permitted ls: cannot access 'mnt': Operation not permitted ls: cannot access 'opt': Operation not permitted ls: cannot access 'proc': Operation not permitted ls: cannot access 'root': Operation not permitted ls: cannot access 'run': Operation not permitted ls: cannot access 'sbin': Operation not permitted ls: cannot access 'srv': Operation not permitted ls: cannot access 'sys': Operation not permitted ls: cannot access 'tmp': Operation not permitted ls: cannot access 'usr': Operation not permitted ls: cannot access 'var': Operation not permitted ls: cannot access '.dockerenv': Operation not permitted ls: cannot access 'deployments': Operation not permitted ls: cannot access 'help.1': Operation not permitted ls: cannot access 'help.md': Operation not permitted total 0 d????????? ? ? ? ? ? . d????????? ? ? ? ? ? .. -????????? ? ? ? ? ? .dockerenv l????????? ? ? ? ? ? bin d????????? ? ? ? ? ? boot d????????? ? ? ? ? ? deployments d????????? ? ? ? ? ? dev d????????? ? ? ? ? ? etc -????????? ? ? ? ? ? help.1 -????????? ? ? ? ? ? help.md d????????? ? ? ? ? ? home l????????? ? ? ? ? ? lib l????????? ? ? ? ? ? lib64 d????????? ? ? ? ? ? lost+found d????????? ? ? ? ? ? media d????????? ? ? ? ? ? mnt d????????? ? ? ? ? ? opt d????????? ? ? ? ? ? proc d????????? ? ? ? ? ? root d????????? ? ? ? ? ? run l????????? ? ? ? ? ? sbin d????????? ? ? ? ? ? srv d????????? ? ? ? ? ? sys d????????? ? ? ? ? ? tmp d????????? ? ? ? ? ? usr d????????? ? ? ? ? ? var
docker exec -it --user 185:185 apicurio-registry-mem bash
[jboss@be2d9fddf82c ~]$ cd /deployments/ [jboss@be2d9fddf82c deployments]$ ls -al ls: cannot access '.': Operation not permitted ls: cannot access '..': Operation not permitted ls: cannot access 'data': Operation not permitted ls: cannot access 'apicurio-registry-app-2.4.1.Final-runner.jar': Operation not permitted ls: cannot access 'lib': Operation not permitted ls: cannot access 'meta': Operation not permitted total 0 d????????? ? ? ? ? ? . d????????? ? ? ? ? ? .. -????????? ? ? ? ? ? apicurio-registry-app-2.4.1.Final-runner.jar d????????? ? ? ? ? ? data d????????? ? ? ? ? ? lib d????????? ? ? ? ? ? meta [jboss@be2d9fddf82c deployments]$ ls -l apicurio-registry-app-2.4.1.Final-runner.jar ls: cannot access 'apicurio-registry-app-2.4.1.Final-runner.jar': Operation not permitted
Could you show what it looks like from your side?
Who owns the deployments directory and the jar file?
[ewittman@bluejay ~]$ docker exec -it apicurio-registry-mem bash
[jboss@6bf07999bf85 ~]$ ls -al
total 12
drwxrwx---. 3 jboss root 73 Dec 8 18:16 .
drwxr-xr-x. 3 root root 19 Dec 8 18:12 ..
-rw-r--r--. 1 jboss root 18 Jun 20 2022 .bash_logout
-rw-r--r--. 1 jboss root 141 Jun 20 2022 .bash_profile
-rw-r--r--. 1 jboss root 376 Jun 20 2022 .bashrc
drwxrwxr-x. 2 jboss root 26 Dec 8 18:16 .m2
[jboss@6bf07999bf85 ~]$ ls -al /
total 92
drwxr-xr-x. 19 root root 4096 Dec 21 14:17 .
drwxr-xr-x. 19 root root 4096 Dec 21 14:17 ..
-rwxr-xr-x. 1 root root 0 Dec 21 14:17 .dockerenv
lrwxrwxrwx. 1 root root 7 Jun 21 2021 bin -> usr/bin
dr-xr-xr-x. 4 root root 30 Dec 8 18:17 boot
drwxrwxr-x. 5 jboss root 93 Dec 19 11:40 deployments
drwxr-xr-x. 5 root root 360 Dec 21 14:17 dev
drwxr-xr-x. 55 root root 4096 Dec 21 14:17 etc
-rw-rw-r--. 1 root root 28996 Dec 8 18:11 help.1
-rw-rw-r--. 1 root root 23279 Dec 8 18:11 help.md
drwxr-xr-x. 3 root root 19 Dec 8 18:12 home
lrwxrwxrwx. 1 root root 7 Jun 21 2021 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jun 21 2021 lib64 -> usr/lib64
drwx------. 2 root root 6 Nov 30 17:47 lost+found
drwxr-xr-x. 2 root root 6 Jun 21 2021 media
drwxr-xr-x. 2 root root 6 Jun 21 2021 mnt
drwxrwxr-x. 4 jboss root 35 Dec 8 18:11 opt
dr-xr-xr-x. 211 root root 0 Dec 21 14:17 proc
dr-xr-x---. 3 root root 4096 Nov 30 18:28 root
drwxr-xr-x. 13 root root 4096 Dec 8 18:18 run
lrwxrwxrwx. 1 root root 8 Jun 21 2021 sbin -> usr/sbin
drwxr-xr-x. 2 root root 6 Jun 21 2021 srv
dr-xr-xr-x. 13 root root 0 Apr 10 2021 sys
drwxrwxrwt. 5 root root 4096 Dec 21 14:18 tmp
drwxrwxr-x. 12 jboss root 4096 Dec 8 18:11 usr
drwxr-xr-x. 19 root root 4096 Nov 30 17:47 var
[jboss@6bf07999bf85 ~]$ ls -al /deployments/
total 12960
drwxrwxr-x. 5 jboss root 93 Dec 19 11:40 .
drwxr-xr-x. 19 root root 4096 Dec 21 14:17 ..
-rw-r--r--. 1 1001 122 13239767 Dec 19 11:37 apicurio-registry-app-2.4.1.Final-runner.jar
drwxrwxr-x. 2 jboss root 6 Dec 8 18:16 data
drwxr-xr-x. 2 1001 122 20480 Dec 19 11:37 lib
drwxr-xr-x. 2 1001 122 6 Dec 19 11:36 meta
It's interesting, because we run these images in unprivileged k8s or openshift environments all the time with no trouble.
I just tested all the variants using docker in Ubuntu and all the images are working like a charm.
As Eric said, it would be great if you can share more information about the docker version etc.
Indeed it's something with the version of docker or linux itself.
I thought that docker is just something that separates the working container from the rest of the world.
These issues are on Fedora 7 linux with docker version 19.03.6.
I did a test and run on Ubuntu 20.04.5 with docker version 20.10.21 and it worked without a problem.
I face the same situation of the mem registry not starting in a MacOS 13.1 M1, using Colima as Docker engine. I start Colima like this:
colima start --arch x86_64 --memory 4
It does work with Rancher Desktop
@tomasAlabes I tried apicurio-registry-mem with Colima in a MacOS 13.1 M1 and I didn't hit any issue:
Colima instance:
$ colima list
PROFILE STATUS ARCH CPUS MEMORY DISK RUNTIME ADDRESS
default Running x86_64 2 4GiB 60GiB docker
Colima version info:
$ colima version
colima version 0.5.2
git commit: 6b5b6fe0540e708f0c9d6e8919fab292c671fc72
runtime: docker
arch: x86_64
client: v20.10.22
server: v20.10.20
Command output:
$ docker run -it -p 8089:8080 apicurio/apicurio-registry-mem:latest-release
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar /deployments/apicurio-registry-app-2.4.1.Final-runner.jar
...
It doesn't show the app initializing, meaning it's stuck or something, am I right? I mean this:
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-12-20 19:18:08 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) apicurio-registry-app 2.4.1.Final on JVM (powered by Quarkus 2.14.0.Final) started in 3.150s. Listening on: http://0.0.0.0:8080
etc
etc
You're able to hit an endpoint successfully?
@tomasAlabes When I tried it for the first time, I got full output that ended with:
2023-01-10 13:01:27 INFO <> [io.apicurio.registry.storage.impl.sql.InMemoryRegistryStorage] (executor-thread-2) Using In Memory (H2) SQL storage.
But when I try it again, and multiple times, it is stuck at:
INFO exec java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar /deployments/apicurio-registry-app-2.4.1.Final-runner.jar
So, you are right, it doesn't work well.
I tried apicurio-registry-mem with podman and with Docker Desktop on my Mac with M1 chip and it worked well.
It looks like problem with colima itself.
Closing this as I use colima now and it works with no issues for me.