YunoHost-Apps / jenkins_ynh

Jenkins package for YunoHost
https://jenkins.io/
Apache License 2.0
5 stars 10 forks source link

Upgrading fails and restore fails too with java.net.BindException: Address already in use #121

Open CodeShakingSheep opened 1 year ago

CodeShakingSheep commented 1 year ago

Describe the bug

I don't know why I have problems with Jenkins upgrades recently. Again I just wanted to upgrade Jenkins through webadmin and unfortunately it fails. The restore fails too. This time it's another error message as you can see in the logs. Caused: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080 because Caused by: java.net.BindException: Address already in use. Could this be related to changes made to fix https://github.com/YunoHost-Apps/jenkins_ynh/issues/108 ?

However, a fresh installation worked (with warnings). During fresh install Jenkins was set up on port 8095. Here are the logs for the fresh install as well as this might be useful info: https://paste.yunohost.org/raw/bigubakuxo

Context

Steps to reproduce

I just hit the upgrade button from the webadmin. I couldn't try again with CLI as the whole app was removed afterwards.

Expected behavior

The app should successfully upgrade.

Logs

https://paste.yunohost.org/raw/ihomenurod

2023-08-01 07:43:45,148: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: java.io.IOException: Failed to start Jetty
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at winstone.Launcher.<init>(Launcher.java:209)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at winstone.Launcher.main(Launcher.java:492)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at executable.Main.main(Main.java:347)
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
2023-08-01 07:43:45,149: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2023-08-01 07:43:45,150: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.Server.doStart(Server.java:398)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at winstone.Launcher.<init>(Launcher.java:205)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         ... 6 more
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: Caused by: java.net.BindException: Address already in use
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind0(Native Method)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind(Net.java:459)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind(Net.java:448)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         ... 21 more
2023-08-01 07:43:45,151: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: 2023-08-01 07:43:44.681+0000 [id=1]        SEVERE        winstone.Logger#logInternal: Container startup failed
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: java.net.BindException: Address already in use
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind0(Native Method)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind(Net.java:459)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.Net.bind(Net.java:448)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]: Caused: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
2023-08-01 07:43:45,152: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.server.Server.doStart(Server.java:398)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
2023-08-01 07:43:45,153: DEBUG - Aug 01 07:43:44 maindomain.tld jenkins[631869]:         at winstone.Launcher.<init>(Launcher.java:205)
csavelief commented 1 year ago

Hi! I might make a mistake, but from what I understand from the commit history, my fix is only available from 2.401.3~ynh1 onward.

Edit 1. I think I may not understand what is the difference between xxx~ynh1 and xxx~ynh2...

Edit 2. I tried to install jenkins 2.401.3~ynh1 on a server where the default install port is already taken : it worked. Weird.

CodeShakingSheep commented 1 year ago

Hi, I'm not sure. I just recognized that your fix was only added in install script. I'm not that familiar with yunohost app packaging yet. But shouldn't there also be a fix in upgrade script?

Just asking because I got the exact same error again when trying to upgrade from 2.401.3\~ynh2 to lastest version 2.414.1~ynh1. Here are my logs from today. Upgrade and restore failed. Here is the relevant log part

2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: java.io.IOException: Failed to start Jetty
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.<init>(Launcher.java:209)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.main(Launcher.java:496)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2023-08-30 10:41:15,377: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at executable.Main.main(Main.java:347)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
2023-08-30 10:41:15,378: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.Server.doStart(Server.java:398)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.<init>(Launcher.java:205)
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         ... 6 more
2023-08-30 10:41:15,379: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: Caused by: java.net.BindException: Address already in use
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind0(Native Method)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind(Net.java:459)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind(Net.java:448)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         ... 21 more
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: 2023-08-30 10:41:15.358+0000 [id=1]        SEVERE        winstone.Logger#logInternal: Container startup failed
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: java.net.BindException: Address already in use
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind0(Native Method)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind(Net.java:459)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.Net.bind(Net.java:448)
2023-08-30 10:41:15,380: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: Caused: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
2023-08-30 10:41:15,381: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.server.Server.doStart(Server.java:398)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.<init>(Launcher.java:205)
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]: Caused: java.io.IOException: Failed to start Jetty
2023-08-30 10:41:15,382: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.<init>(Launcher.java:209)
2023-08-30 10:41:15,383: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at winstone.Launcher.main(Launcher.java:496)
2023-08-30 10:41:15,383: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-08-30 10:41:15,384: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2023-08-30 10:41:15,384: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-08-30 10:41:15,384: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2023-08-30 10:41:15,384: DEBUG - Aug 30 10:41:15 maindomain.tld jenkins[3203790]:         at executable.Main.main(Main.java:347)

And here are the full logs: https://paste.yunohost.org/raw/bakamuzopi

Does anybody have capacity to look into this? Every time I upgrade ynh Jenkins app I need to do a fresh install afterwards and restore everything. It's not really feasible in the long run. Wondering if anybody else encounters this issue.

csavelief commented 1 year ago

I believe you are right : my PR was all about the install script. I didn't know at the time about the upgrade script. I believe that this script should be updated too in a similar fashion around line 126. I will have a look at it.

CodeShakingSheep commented 1 year ago

I believe you are right : my PR was all about the install script. I didn't know at the time about the upgrade script. I believe that this script should be updated too in a similar fashion around line 126. I will have a look at it.

Thank you @csavelief for picking this up. Yes, I agree with you that a fix should be made in the upgrade script. Also, I believe that another fix should be made in the restore script around line 88. It's same logic and the current problem is that Jenkins app cannot be restored if another port than 8080 was used. Can you please apply your fix to the restore script too?

CodeShakingSheep commented 12 months ago

@csavelief Any updates on the fix? There is a new update for the app, but I cannot do it because my Jenkins runs on another port than 8080.