ERROR: Failed to start i2ptunnel java.lang.NoClassDefFoundError: jakarta/servlet/ServletException #104

Open
opened 2025-04-21 15:00:04 -04:00 by idk · 11 comments
Owner

I previously, for version 2.0.0 I believe, followed the instructions for installation on debian here.

I built this as a docker image.
Everything worked fine.

Today I basically rebuilt it all, to pull in the latest i2p packages.

When starting i2p router, I see errors like these in the logs:

2023/03/22 16:31:23 | ERROR: Failed to start i2ptunnel java.lang.NoClassDefFoundError: jakarta/servlet/ServletException
2023/03/22 16:31:23 | java.lang.NoClassDefFoundError: jakarta/servlet/ServletException
2023/03/22 16:31:23 | 	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
2023/03/22 16:31:23 | 	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
2023/03/22 16:31:23 | 	at java.base/java.lang.Class.getConstructor0(Class.java:3578)
2023/03/22 16:31:23 | 	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(ContextHandler.java:2902)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletContextHandler$Context.createInstance(ServletContextHandler.java:1299)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createServlet(ContextHandler.java:2919)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1202)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:592)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
2023/03/22 16:31:23 | 	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:774)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
2023/03/22 16:31:23 | 	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
2023/03/22 16:31:23 | 	at net.i2p.router.web.WebAppStarter.startWebApp(WebAppStarter.java:126)
2023/03/22 16:31:23 | 	at net.i2p.router.web.WebAppStarter.startWebApp(WebAppStarter.java:101)
2023/03/22 16:31:23 | 	at net.i2p.router.web.RouterConsoleRunner.startConsole(RouterConsoleRunner.java:844)
2023/03/22 16:31:23 | 	at net.i2p.router.web.RouterConsoleRunner.startup(RouterConsoleRunner.java:239)
2023/03/22 16:31:23 | 	at net.i2p.router.startup.RouterAppManager.addAndStart(RouterAppManager.java:54)
2023/03/22 16:31:23 | 	at net.i2p.router.startup.LoadClientAppsJob$RunApp.run(LoadClientAppsJob.java:303)
2023/03/22 16:31:23 | 	at java.base/java.lang.Thread.run(Thread.java:833)
2023/03/22 16:31:23 | 	at net.i2p.util.I2PThread.run(I2PThread.java:103)
2023/03/22 16:31:23 | Caused by: java.lang.ClassNotFoundException: jakarta.servlet.ServletException
2023/03/22 16:31:23 | 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
2023/03/22 16:31:23 | 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
2023/03/22 16:31:23 | 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
2023/03/22 16:31:23 | 	... 33 more

Obviously all i2p apps are dead in the water.

This feels like a missed dependency in the i2p package/jar, but maybe I'm mistaken and there is some way to fix this from the OS/container side?

OS used: debian bookworm (slim base image tag)
JDK: OpenJDK 17-jre (installed as dependency for i2p)

The same behavior exist on x86 and armhf.

I previously, for version 2.0.0 I believe, followed the instructions for installation on debian [here](https://geti2p.net/en/download/debian). I built this as a docker image. Everything worked fine. Today I basically rebuilt it all, to pull in the latest i2p packages. When starting i2p router, I see errors like these in the logs: ``` 2023/03/22 16:31:23 | ERROR: Failed to start i2ptunnel java.lang.NoClassDefFoundError: jakarta/servlet/ServletException 2023/03/22 16:31:23 | java.lang.NoClassDefFoundError: jakarta/servlet/ServletException 2023/03/22 16:31:23 | at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) 2023/03/22 16:31:23 | at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373) 2023/03/22 16:31:23 | at java.base/java.lang.Class.getConstructor0(Class.java:3578) 2023/03/22 16:31:23 | at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754) 2023/03/22 16:31:23 | at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createInstance(ContextHandler.java:2902) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletContextHandler$Context.createInstance(ServletContextHandler.java:1299) 2023/03/22 16:31:23 | at org.eclipse.jetty.server.handler.ContextHandler$StaticContext.createServlet(ContextHandler.java:2919) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1202) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:592) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:750) 2023/03/22 16:31:23 | at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) 2023/03/22 16:31:23 | at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) 2023/03/22 16:31:23 | at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) 2023/03/22 16:31:23 | at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310) 2023/03/22 16:31:23 | at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735) 2023/03/22 16:31:23 | at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:774) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379) 2023/03/22 16:31:23 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449) 2023/03/22 16:31:23 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414) 2023/03/22 16:31:23 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916) 2023/03/22 16:31:23 | at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) 2023/03/22 16:31:23 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) 2023/03/22 16:31:23 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) 2023/03/22 16:31:23 | at net.i2p.router.web.WebAppStarter.startWebApp(WebAppStarter.java:126) 2023/03/22 16:31:23 | at net.i2p.router.web.WebAppStarter.startWebApp(WebAppStarter.java:101) 2023/03/22 16:31:23 | at net.i2p.router.web.RouterConsoleRunner.startConsole(RouterConsoleRunner.java:844) 2023/03/22 16:31:23 | at net.i2p.router.web.RouterConsoleRunner.startup(RouterConsoleRunner.java:239) 2023/03/22 16:31:23 | at net.i2p.router.startup.RouterAppManager.addAndStart(RouterAppManager.java:54) 2023/03/22 16:31:23 | at net.i2p.router.startup.LoadClientAppsJob$RunApp.run(LoadClientAppsJob.java:303) 2023/03/22 16:31:23 | at java.base/java.lang.Thread.run(Thread.java:833) 2023/03/22 16:31:23 | at net.i2p.util.I2PThread.run(I2PThread.java:103) 2023/03/22 16:31:23 | Caused by: java.lang.ClassNotFoundException: jakarta.servlet.ServletException 2023/03/22 16:31:23 | at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) 2023/03/22 16:31:23 | at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) 2023/03/22 16:31:23 | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) 2023/03/22 16:31:23 | ... 33 more ``` Obviously all i2p apps are dead in the water. This feels like a missed dependency in the i2p package/jar, but maybe I'm mistaken and there is some way to fix this from the OS/container side? OS used: debian bookworm (`slim` base image tag) JDK: OpenJDK 17-jre (installed as dependency for i2p) The same behavior exist on x86 and armhf.
idk added this to the 2.4.0 milestone 2025-04-21 15:00:04 -04:00
idk added the
blocker
major
package
labels 2025-04-21 15:00:04 -04:00
Author
Owner

No action on that ticket, but Mantic will be out shortly. We can presume it won't be fixed in Lunar, but will be able to test the Mantic release (without our Lunar workarounds) before our release.

We should add required libjetty versions to our control files.

No action on that ticket, but Mantic will be out shortly. We can presume it won't be fixed in Lunar, but will be able to test the Mantic release (without our Lunar workarounds) before our release. We should add required libjetty versions to our control files.
Author
Owner
Entered Ubuntu ticket https://bugs.launchpad.net/ubuntu/+source/jetty9/+bug/2036331
Author
Owner

Found some late-March emails that refreshed my memory even more. idk set up the debian-alt/lunar dir for 2.2.1 exactly as I recommended.

So what's changed since then is that Debian has fixed it in bookworm, Ubuntu has pulled that for Mantic, but does not have it for Lunar.

So I'd like to file a bug for Lunar, if they fix it before our next release then we can do a simple cleanup, otherwise I recommend adding a Mantic subdir.

Found some late-March emails that refreshed my memory even more. idk set up the debian-alt/lunar dir for 2.2.1 exactly as I recommended. So what's changed since then is that Debian has fixed it in bookworm, Ubuntu has pulled that for Mantic, but does _not_ have it for Lunar. So I'd like to file a bug for Lunar, if they fix it before our next release then we can do a simple cleanup, otherwise I recommend adding a Mantic subdir.
Author
Owner

OK, wasn't noted by @idk here, hence my confusion, but he did add the jakarta symlink to the files debian-alt/lunar/i2prouter.links and debian-alt/lunar/control on April 7, presumably in prep for the 2.2.1 release. I assume you did it because you hit build errors?

That remains necessary for lunar only, because they're on -3. Users would still have failures with plugins. Not necessary for mantic, bookworm, sid.

I propose we enter an Ubuntu bug asking them to pull in -4. Then we wouldn't need the symlink and we could use lunar for the others again. Otherwise we'll need to add debian-alt/mantic ? Not strictly required but probably should.

OK, wasn't noted by @idk here, hence my confusion, but he did add the jakarta symlink to the files debian-alt/lunar/i2prouter.links and debian-alt/lunar/control on April 7, presumably in prep for the 2.2.1 release. I assume you did it because you hit build errors? That remains necessary for lunar _only_, because they're on -3. Users would still have failures with plugins. Not necessary for mantic, bookworm, sid. I propose we enter an Ubuntu bug asking them to pull in -4. Then we wouldn't need the symlink and we could use lunar for the others again. Otherwise we'll need to add debian-alt/mantic ? Not strictly required but probably should.
Author
Owner

found more notes. Debian patched Jetty (without announcement?) to switch dependency to tomcat10 in Feb. - this is what caused the breakage, it wasn't an upstream Jetty change. At the time I didn't get around to reporting it to Debian.

Thankfully, they reverted it in May:

jetty9 (9.4.50-4) unstable; urgency=medium

  * Team upload.
  * Revert the switch to libtomcat10-java. For now Jetty 9 only works correctly
    with libtomcat9-java. (Closes: #1036798)

 -- Markus Koschany <apo@debian.org>  Sat, 27 May 2023 16:28:19 +0200

jetty9 (9.4.50-3) unstable; urgency=medium

  * Team upload.
  * Depend on libtomcat10-java instead of libtomcat9-java.
  * Add tomcat10-migration.patch.
  * Ignore jetty-jaspi module because it does not work with Tomcat 10 yet.

 -- Markus Koschany <apo@debian.org>  Sun, 19 Feb 2023 13:41:00 +0100

Also for .51 in sid:

jetty9 (9.4.51-2) experimental; urgency=medium

  * Team upload.
  * Revert switch to libtomcat10-java. (Closes: #1036798)

 -- Markus Koschany <apo@debian.org>  Sat, 27 May 2023 16:47:13 +0200

jetty9 (9.4.51-1) experimental; urgency=medium

  * Team upload.
  * New upstream release.
  * Replace dependency on lsb-base with sysvinit-utils.
    - Fix: litian error     depends-on-obsolete-package.
  * Add a systemd timer for debian/jetty9.service.
    - Fix: lintian warning missing-systemd-timer-for-cron-script.
  * Fix lintian warning skip-systemd-native-flag-missing-pre-depends.
  * Fix lintian warning mismatched-override.

 -- sun min <sunmin89@outlook.com>  Wed, 29 Mar 2023 10:10:33 +0800

ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036798

So 9.4.50-3 and 9.4.51-1 are borked, 9.4.50-4 and 9.4.51-2 should work.

This is good, because 50-3 and 51-1 would have caused us enormous pain to work around.

I need to go back through their mailing list to see if there's further discussion or future plans.

UNFORTUNATELY, Ubuntu lunar has 9.4.50-3 so we probably need to ask them to pull -4? Any reports of failures on lunar? If not why not?

found more notes. Debian patched Jetty (without announcement?) to switch dependency to tomcat10 in Feb. - this is what caused the breakage, it wasn't an upstream Jetty change. At the time I didn't get around to reporting it to Debian. Thankfully, they reverted it in May: ``` jetty9 (9.4.50-4) unstable; urgency=medium * Team upload. * Revert the switch to libtomcat10-java. For now Jetty 9 only works correctly with libtomcat9-java. (Closes: #1036798) -- Markus Koschany <apo@debian.org> Sat, 27 May 2023 16:28:19 +0200 jetty9 (9.4.50-3) unstable; urgency=medium * Team upload. * Depend on libtomcat10-java instead of libtomcat9-java. * Add tomcat10-migration.patch. * Ignore jetty-jaspi module because it does not work with Tomcat 10 yet. -- Markus Koschany <apo@debian.org> Sun, 19 Feb 2023 13:41:00 +0100 ``` Also for .51 in sid: ``` jetty9 (9.4.51-2) experimental; urgency=medium * Team upload. * Revert switch to libtomcat10-java. (Closes: #1036798) -- Markus Koschany <apo@debian.org> Sat, 27 May 2023 16:47:13 +0200 jetty9 (9.4.51-1) experimental; urgency=medium * Team upload. * New upstream release. * Replace dependency on lsb-base with sysvinit-utils. - Fix: litian error depends-on-obsolete-package. * Add a systemd timer for debian/jetty9.service. - Fix: lintian warning missing-systemd-timer-for-cron-script. * Fix lintian warning skip-systemd-native-flag-missing-pre-depends. * Fix lintian warning mismatched-override. -- sun min <sunmin89@outlook.com> Wed, 29 Mar 2023 10:10:33 +0800 ``` ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036798 So 9.4.50-3 and 9.4.51-1 are borked, 9.4.50-4 and 9.4.51-2 should work. This is good, because 50-3 and 51-1 would have caused us enormous pain to work around. I need to go back through their mailing list to see if there's further discussion or future plans. UNFORTUNATELY, Ubuntu lunar has 9.4.50-3 so we probably need to ask them to pull -4? Any reports of failures on lunar? If not why not?
Author
Owner

My notes on the topic, this is a miserable packaging issue:

Jetty now wants the jakarta version... as of when?
For now, libtomcat9 is still in lunar/mantic/bookworm/sid/etc.
Replace tomcat 9 with tomcat 10
Tomcat 10.1 is java 11+
Tomcat 10.0 is java 8+ but abandoned
libtomcat10 only in ubuntu lunar, debian bookworm and sid
need with-libtomcat-10 flag in build scripts
Debian bug #1031817
Will it be removed in bookworm? probably not?

!!!!!
https://tomcat.apache.org/migration-10.html#Migrating_from_9.0.x_to_10.0.x
There is a significant breaking change between Tomcat 9.0.x and Tomcat 10.0.x.
The Java package used by the specification APIs has changed from javax... to jakarta.... It will be necessary to recompile web applications against the new APIs.

Tomcat 10 jakarta!!!
https://tomcat.apache.org/migration-10.html#Migrating_from_9.0.x_to_10.0.x
i2p.i2p/-#394
https://github.com/i2p/i2p.i2p/issues/42
libjakarta-servlet-api-java
/usr/share/java/jakarta-servlet-api-5.0.0.jar
/usr/share/java/jakarta-servlet-api.jar

Adding major label because we need a plan

My notes on the topic, this is a miserable packaging issue: ``` Jetty now wants the jakarta version... as of when? For now, libtomcat9 is still in lunar/mantic/bookworm/sid/etc. Replace tomcat 9 with tomcat 10 Tomcat 10.1 is java 11+ Tomcat 10.0 is java 8+ but abandoned libtomcat10 only in ubuntu lunar, debian bookworm and sid need with-libtomcat-10 flag in build scripts Debian bug #1031817 Will it be removed in bookworm? probably not? ``` !!!!! https://tomcat.apache.org/migration-10.html#Migrating_from_9.0.x_to_10.0.x There is a significant breaking change between Tomcat 9.0.x and Tomcat 10.0.x. The Java package used by the specification APIs has changed from javax... to jakarta.... It will be necessary to recompile web applications against the new APIs. Tomcat 10 jakarta!!! https://tomcat.apache.org/migration-10.html#Migrating_from_9.0.x_to_10.0.x http://git.idk.i2p/i2p-hackers/i2p.i2p/-/issues/394 https://github.com/i2p/i2p.i2p/issues/42 libjakarta-servlet-api-java /usr/share/java/jakarta-servlet-api-5.0.0.jar /usr/share/java/jakarta-servlet-api.jar Adding major label because we need a plan
Author
Owner

OK after taking a look at the research, it would appear that this is deeper than it first appears. See:

So this is still an issue, but only for a particular group of users in a particular set of circumstances. The size of that group is still to-be-determined at this time.

So for right now, the right solution must remain symlinking jakarta-servlet-api.jar. This issue will remain open while we figure out the appropriate packaging solution.

OK after taking a look at the research, it would appear that this is deeper than it first appears. See: - https://dev.to/tbroyer/the-javax-jakarta-mess-and-a-gradle-solution-3c44 - https://dev.to/tbroyer/the-javax-to-jakarta-mess-its-even-worse-than-i-thought-54ag So this is still an issue, but only for a particular group of users in a particular set of circumstances. The size of that group is still to-be-determined at this time. So for right now, the right solution must remain symlinking `jakarta-servlet-api.jar`. This issue will remain open while we figure out the appropriate packaging solution.
Author
Owner

Perfect that actually helps a ton, I'll work on it today.

Perfect that actually helps a ton, I'll work on it today.
Author
Owner

Indeed I can 😄

armhf version

FROM arm32v7/debian:bookworm-slim
RUN apt-get update -y; apt-get install -y apt-transport-https lsb-release curl gnupg procps binutils-multiarch
RUN  echo "deb [signed-by=/usr/share/keyrings/i2p-archive-keyring.gpg] https://deb.i2p2.de/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/i2p.list
RUN curl -o i2p-archive-keyring.gpg https://geti2p.net/_static/i2p-archive-keyring.gpg
RUN gpg --keyid-format long --import --import-options show-only --with-fingerprint i2p-archive-keyring.gpg
RUN cp i2p-archive-keyring.gpg /usr/share/keyrings
RUN apt-get update
RUN apt-get install -y i2p i2p-keyring vim lsof libjakarta-servlet-api-java
# Commented out items pertaining to libjakarta-servlet-api-java to highlight the necessary addition
# RUN apt-get install -y libjakarta-servlet-api-java
# RUN ln -s /usr/share/java/jakarta-servlet-api.jar /usr/share/i2p/lib/jakarta-servlet-api.jar
RUN useradd -ms /bin/bash i2p
RUN mkdir -p /home/i2p/.i2p/ && chown i2p:i2p /home/i2p/.i2p/
RUN mkdir -p /home/i2p/.i2p/i2psnark && chown i2p:i2p /home/i2p/.i2p/i2psnark

# This is really non-optimal - would be much better as runtime config
RUN sed -i s/wrapper.java.maxmemory=128/wrapper.java.maxmemory=512/ /etc/i2p/wrapper.config

USER i2p
WORKDIR /home/i2p
COPY ./startapp.sh /home/i2p/

ENTRYPOINT ["/home/i2p/startapp.sh"]

x86 version, pretty much the same, just the base image differs

FROM debian:bookworm-slim
RUN apt-get update -y; apt-get install -y apt-transport-https lsb-release curl gnupg procps binutils-multiarch
RUN  echo "deb [signed-by=/usr/share/keyrings/i2p-archive-keyring.gpg] https://deb.i2p2.de/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/i2p.list
RUN curl -o i2p-archive-keyring.gpg https://geti2p.net/_static/i2p-archive-keyring.gpg
RUN gpg --keyid-format long --import --import-options show-only --with-fingerprint i2p-archive-keyring.gpg
RUN cp i2p-archive-keyring.gpg /usr/share/keyrings
RUN apt-get update
RUN apt-get install -y i2p i2p-keyring vim lsof libjakarta-servlet-api-java
# Commented out items pertaining to libjakarta-servlet-api-java to highlight the necessary addition
# RUN apt-get install -y libjakarta-servlet-api-java
# RUN ln -s /usr/share/java/jakarta-servlet-api.jar /usr/share/i2p/lib/jakarta-servlet-api.jar
RUN useradd -ms /bin/bash i2p
RUN mkdir -p /home/i2p/.i2p/ && chown i2p:i2p /home/i2p/.i2p/
RUN mkdir -p /home/i2p/.i2p/i2psnark && chown i2p:i2p /home/i2p/.i2p/i2psnark

# This is really non-optimal - would be much better as runtime config
RUN sed -i s/wrapper.java.maxmemory=128/wrapper.java.maxmemory=512/ /etc/i2p/wrapper.config

USER i2p
WORKDIR /home/i2p
COPY ./startapp.sh /home/i2p/

ENTRYPOINT ["/home/i2p/startapp.sh"]

My focus is on the armhf variant (yeah, I'm one of those guys :p )
The build was working fine between October 2022 and "now", where "now" is just where I figured I would rebuild to pull in latest i2p package.

Indeed I can :smile: armhf version ``` FROM arm32v7/debian:bookworm-slim RUN apt-get update -y; apt-get install -y apt-transport-https lsb-release curl gnupg procps binutils-multiarch RUN echo "deb [signed-by=/usr/share/keyrings/i2p-archive-keyring.gpg] https://deb.i2p2.de/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/i2p.list RUN curl -o i2p-archive-keyring.gpg https://geti2p.net/_static/i2p-archive-keyring.gpg RUN gpg --keyid-format long --import --import-options show-only --with-fingerprint i2p-archive-keyring.gpg RUN cp i2p-archive-keyring.gpg /usr/share/keyrings RUN apt-get update RUN apt-get install -y i2p i2p-keyring vim lsof libjakarta-servlet-api-java # Commented out items pertaining to libjakarta-servlet-api-java to highlight the necessary addition # RUN apt-get install -y libjakarta-servlet-api-java # RUN ln -s /usr/share/java/jakarta-servlet-api.jar /usr/share/i2p/lib/jakarta-servlet-api.jar RUN useradd -ms /bin/bash i2p RUN mkdir -p /home/i2p/.i2p/ && chown i2p:i2p /home/i2p/.i2p/ RUN mkdir -p /home/i2p/.i2p/i2psnark && chown i2p:i2p /home/i2p/.i2p/i2psnark # This is really non-optimal - would be much better as runtime config RUN sed -i s/wrapper.java.maxmemory=128/wrapper.java.maxmemory=512/ /etc/i2p/wrapper.config USER i2p WORKDIR /home/i2p COPY ./startapp.sh /home/i2p/ ENTRYPOINT ["/home/i2p/startapp.sh"] ``` x86 version, pretty much the same, just the base image differs ``` FROM debian:bookworm-slim RUN apt-get update -y; apt-get install -y apt-transport-https lsb-release curl gnupg procps binutils-multiarch RUN echo "deb [signed-by=/usr/share/keyrings/i2p-archive-keyring.gpg] https://deb.i2p2.de/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/i2p.list RUN curl -o i2p-archive-keyring.gpg https://geti2p.net/_static/i2p-archive-keyring.gpg RUN gpg --keyid-format long --import --import-options show-only --with-fingerprint i2p-archive-keyring.gpg RUN cp i2p-archive-keyring.gpg /usr/share/keyrings RUN apt-get update RUN apt-get install -y i2p i2p-keyring vim lsof libjakarta-servlet-api-java # Commented out items pertaining to libjakarta-servlet-api-java to highlight the necessary addition # RUN apt-get install -y libjakarta-servlet-api-java # RUN ln -s /usr/share/java/jakarta-servlet-api.jar /usr/share/i2p/lib/jakarta-servlet-api.jar RUN useradd -ms /bin/bash i2p RUN mkdir -p /home/i2p/.i2p/ && chown i2p:i2p /home/i2p/.i2p/ RUN mkdir -p /home/i2p/.i2p/i2psnark && chown i2p:i2p /home/i2p/.i2p/i2psnark # This is really non-optimal - would be much better as runtime config RUN sed -i s/wrapper.java.maxmemory=128/wrapper.java.maxmemory=512/ /etc/i2p/wrapper.config USER i2p WORKDIR /home/i2p COPY ./startapp.sh /home/i2p/ ENTRYPOINT ["/home/i2p/startapp.sh"] ``` My focus is on the armhf variant (yeah, I'm one of those guys :p ) The build was working fine between October 2022 and "now", where "now" is just where I figured I would rebuild to pull in latest i2p package.
Author
Owner

I think this can go deeper than documentation, we should be able to express this as a dependency in our debian package itself and make it work automatically. In fact, it should work automatically, it does work automatically for me, and I'm not sure why it's broken for you. Are you able to share with me your Dockerfile?

I think this can go deeper than documentation, we should be able to express this as a dependency in our debian package itself and make it work automatically. In fact, it should work automatically, it does work automatically for me, and I'm not sure why it's broken for you. Are you able to share with me your `Dockerfile`?
Author
Owner

Solution provided on github: https://github.com/i2p/i2p.i2p/issues/42#issuecomment-1483807575

In a nutshell, install libjakarta-servlet-api-java, and link or copy the jar to /use/share/i2p/lib

Documentation should maybe be updated?

Solution provided on github: https://github.com/i2p/i2p.i2p/issues/42#issuecomment-1483807575 In a nutshell, install `libjakarta-servlet-api-java`, and link or copy the jar to `/use/share/i2p/lib` Documentation should maybe be updated?
Sign in to join this conversation.
No Label
blocker
major
package
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.i2p#104
No description provided.