Schaka / janitorr

Cleans your Radarr, Sonarr, Jellyseerr and Jellyfin before you run out of space
GNU General Public License v3.0
353 stars 7 forks source link

Unable to start after recent update #83

Closed CitizenElf closed 1 month ago

CitizenElf commented 1 month ago

I have a feeling this is likely just user error on my behalf, coupled with a crippling attachment to portainer, but recent updates are causing me to experience an error when attempting to start the application, and even reverting back to older images from when I last verified the application as working seem to now produce the same issue. I'm getting the following from the logs:

. _

/\ / ' () _ \ \ \ \

( ( )__ | ' | '| | ' \/ _` | \ \ \ \

\/ __)| |)| | | | | || (_| | ) ) ) )

' |__| .|| ||| |__, | / / / /

=========|_|==============|__/=////

:: Spring Boot :: (v3.4.0-M3)

2024-10-07T01:47:07.160Z INFO 1 --- [ main] c.g.s.janitorr.JanitorrApplicationKt : Starting JanitorrApplicationKt using Java 23 with PID 1 (/app/classes started by ? in /workspace)

2024-10-07T01:47:07.165Z INFO 1 --- [ main] c.g.s.janitorr.JanitorrApplicationKt : No active profile set, falling back to 1 default profile: "default"

2024-10-07T01:47:11.005Z INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)

2024-10-07T01:47:11.056Z INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2024-10-07T01:47:11.057Z INFO 1 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.30]

2024-10-07T01:47:11.163Z INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2024-10-07T01:47:11.168Z INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3762 ms

2024-10-07T01:47:11.884Z WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mediaCleanupSchedule' defined in file [/app/classes/com/github/schaka/janitorr/cleanup/MediaCleanupSchedule.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'mediaServer' defined in class path resource [com/github/schaka/janitorr/mediaserver/config/MediaServerConfig.class]: Unsatisfied dependency expressed through method 'mediaServer' parameter 2: Error creating bean with name 'bazarrService' defined in class path resource [com/github/schaka/janitorr/servarr/bazarr/BazarrConfig.class]: Unsatisfied dependency expressed through method 'bazarrService' parameter 0: Error creating bean with name 'clients.bazarr-com.github.schaka.janitorr.servarr.bazarr.BazarrProperties': Could not bind properties to 'BazarrProperties' : prefix=clients.bazarr, ignoreInvalidFields=false, ignoreUnknownFields=true

2024-10-07T01:47:11.890Z INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]

2024-10-07T01:47:11.921Z INFO 1 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

2024-10-07T01:47:11.950Z ERROR 1 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


 Description:

Failed to bind properties under 'clients.bazarr' to com.github.schaka.janitorr.servarr.bazarr.BazarrProperties:

Reason: java.lang.NullPointerException: Cannot invoke "java.lang.Number.intValue()" because the return value of "sun.invoke.util.ValueConversions.primitiveConversion(sun.invoke.util.Wrapper, Object, boolean)" is null

Action:

Update your application's configuration

For full context, I am attempting to run the application through Portainer 2.22.0 on a QNAP system running QTS 5.1.7.2770.

I've been tinkering with things for a while now trying to get it back up and running but I just can't seem to figure it out. Tried updating portainer, recreating application.yml from scratch, etc.

I thought that it might be that the application.yml binding had been changed back to a direct bind compared to previous versions, as attempting to mirror that in Portainer causes a 404 error, but even so, when attempting to rebuild from scratch as a stack using the example docker-compose provided on the main page the container will build without error but then still experience the same issue outlined above.

I feel like I'm possibly missing something incredibly obvious and simple, but I'm simply at a loss right now. Any insight on how to resolve this would be greatly appreciated.

Schaka commented 1 month ago

You're trying to use the wrong image. In fact, you're trying to use a build that's only a pull request right now and completely unfinished.

The tag you're supposed to use is either stable or native-stable. Please check the readme.

I'm willing to bet you're on a tag like :latest

CitizenElf commented 1 month ago

Yep, you were correct there. I just changed over to the stable tag and now get a different error that starts with

Failed to bind properties under 'application'

Which I'm assuming is related to the application.yml change as portainer doesn't seem to be able to correctly bind to a file rather than a folder. I will re-try using compose when I get home later.

Schaka commented 1 month ago

How are you using portainer? You should be able to just paste the compose file into a stack and spin it up

CitizenElf commented 1 month ago

I had previously just been creating the containers directly in Portainer. I've since started spinning up stacks to have more control but hadn't gotten around to moving the old stuff I'd already run up over.

Spinning up a stack using the example compose for stable is still unfortunately bringing the following error after only adjusting the volume binds:

:: Spring Boot :: (v3.4.0-M3)

2024-10-08T07:50:32.565Z INFO 1 --- [ main] c.g.s.janitorr.JanitorrApplicationKt : Starting JanitorrApplicationKt using Java 22.0.2 with PID 1 (/app/classes started by ? in /)

2024-10-08T07:50:32.570Z INFO 1 --- [ main] c.g.s.janitorr.JanitorrApplicationKt : No active profile set, falling back to 1 default profile: "default"

2024-10-08T07:50:36.314Z INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)

2024-10-08T07:50:36.351Z INFO 1 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2024-10-08T07:50:36.351Z INFO 1 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.30]

2024-10-08T07:50:36.481Z INFO 1 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2024-10-08T07:50:36.486Z INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3738 ms

2024-10-08T07:50:37.987Z WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mediaCleanupSchedule' defined in file [/app/classes/com/github/schaka/janitorr/cleanup/MediaCleanupSchedule.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'mediaServer' defined in class path resource [com/github/schaka/janitorr/mediaserver/config/MediaServerConfig.class]: Unsatisfied dependency expressed through method 'mediaServer' parameter 2: Error creating bean with name 'application-com.github.schaka.janitorr.config.ApplicationProperties': Could not bind properties to 'ApplicationProperties' : prefix=application, ignoreInvalidFields=false, ignoreUnknownFields=true

2024-10-08T07:50:38.000Z INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]

2024-10-08T07:50:38.055Z INFO 1 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.

2024-10-08T07:50:38.137Z ERROR 1 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


 Description:

Failed to bind properties under 'application' to com.github.schaka.janitorr.config.ApplicationProperties:

Reason: java.lang.NullPointerException: Parameter specified as non-null is null: method com.github.schaka.janitorr.config.ApplicationProperties., parameter mediaDeletion

Action:

Update your application's configuration

Is it an issue with the container accessing the application.yml? I have triple checked permissions and tried assigning user variables to the container but I still keep getting the above error each time.

Schaka commented 1 month ago

Either you didn't map correctly to /workspace/application.yml inside the image or it can't read the file (i.e. the container can't. All I can see from the error is that properties that should be in your config are missing on startup.

CitizenElf commented 1 month ago

I've managed to solve this issue. It's possible that it is caused by QNAPs QTS OS, as no amount of permissions alterations seemed to be making a difference. However, I added a volume bind for '/config' that matched the directory that application.yml is in (while keeping the direct bind to application.yml itself), and I was able to start the container without issue.

Thank you very much for your help & nudging me in the right direction.