Fresh Airsonic install fails to start

Hi,

I installed the lastest DietPi (DietPi_RPi-ARMv8-Bullseye) and selected Airsonic and a few other things. Unfortunately, Airsonic fails to start up and I can’t understand why from the logs. Any help is appreciated.

Oct 04 04:28:07 DietPi systemd[1]: Started Airsonic Media Server (DietPi).
Oct 04 04:28:13 DietPi Airsonic[1839]:            _                       _
Oct 04 04:28:13 DietPi Airsonic[1839]:      /\   (_)                     (_)
Oct 04 04:28:13 DietPi Airsonic[1839]:     /  \   _ _ __  ___  ___  _ __  _  ___
Oct 04 04:28:13 DietPi Airsonic[1839]:    / /\ \ | | '__|/ __|/ _ \| '_ \| |/ __|
Oct 04 04:28:13 DietPi Airsonic[1839]:   / ____ \| | |   \__ \ (_) | | | | | (__
Oct 04 04:28:13 DietPi Airsonic[1839]:  /_/    \_\_|_|   |___/\___/|_| |_|_|\___|
Oct 04 04:28:13 DietPi Airsonic[1839]:
Oct 04 04:28:13 DietPi Airsonic[1839]:                         10.6.2-RELEASE
Oct 04 04:28:15 DietPi Airsonic[1839]: 2021-10-04 04:28:15.245  INFO --- org.airsonic.player.Application          : Starting Application v10.6.2-RELEASE on DietPi with PID 1839 (/mnt/dietpi_userdata/airsonic/airsonic.war started by airsonic in          /mnt/dietpi_userdata/airsonic)
Oct 04 04:28:15 DietPi Airsonic[1839]: 2021-10-04 04:28:15.262  INFO --- org.airsonic.player.Application          : The following profiles are active: legacy
Oct 04 04:28:22 DietPi Airsonic[1839]: 2021-10-04 04:28:22.596 ERROR --- o.s.boot.SpringApplication               : Application startup failed
Oct 04 04:28:22 DietPi Airsonic[1839]: java.lang.IllegalStateException: Cannot load configuration class: org.airsonic.player.Application
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:404) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:249) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.REL         EASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:127) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.REL         EASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.airsonic.player.Application.main(Application.java:207) ~[classes!/:10.6.2-RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[airsonic.war:10.6.2-RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[airsonic.war:10.6.2-RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[airsonic.war:10.6.2-RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) ~[airsonic.war:10.6.2-RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]: Caused by: java.lang.ExceptionInInitializerError: null
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:394) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         ... 19 common frames omitted
Oct 04 04:28:22 DietPi Airsonic[1839]: Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang         .String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @449b2d27
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         ... 22 common frames omitted
Oct 04 04:28:22 DietPi Airsonic[1839]: Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) th         rows java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @449b2d27
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.lang.reflect.Method.setAccessible(Method.java:193) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at java.base/java.security.AccessController.doPrivileged(AccessController.java:554) ~[na:na]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329) ~[spring-core-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
Oct 04 04:28:22 DietPi Airsonic[1839]:         ... 34 common frames omitted
Oct 04 04:28:22 DietPi systemd[1]: airsonic.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 04:28:22 DietPi systemd[1]: airsonic.service: Failed with result 'exit-code'.
Oct 04 04:28:22 DietPi systemd[1]: airsonic.service: Consumed 45.352s CPU time.

java version:

openjdk 17-ea 2021-09-14
OpenJDK Runtime Environment (build 17-ea+19-Debian-1)
OpenJDK 64-Bit Server VM (build 17-ea+19-Debian-1, mixed mode, sharing)

Could this be something incompatible with the java version installed? I think Airsonic might be picky about that. Should I be installing DietPi 32bit to be most compatible with all software? If I do, does that mean my 8gb Pi can’t take advantage of all the RAM?

There is no real difference between 32bit or 64bit. Just a couple of software title which are not able to install on one or the other architecture. However Debian is able to handle full 8GB even on 32bit. The limitation is that a single process can’t allocate more than 3GB memory on 32bit. But personally, I never have seen such process on a SBC :wink:

I guess Airsonic did not support these new JAVA version on Bullseye. As well it seems the repository has been archived and will not developed further.

https://github.com/airsonic/airsonic/

MichaIng
for your information. Airsonic development stopped and repository has been archived. Maybe we need to limit usage to ARMv6?

I solved the issue by removing the jre v17

apt remove openjdk-17-jre-headless

this resulted in jre v11 being automatically installed somehow. I then rebooted (restarting serivce didn’t help) and now airsonic is running. But it’s running on port 8080, not 4040 as it says in the dietpi documentation.

I will try to find a substitute, maybe Libresonic or something. I mainly want subsonic because there are some android clients for it.

Thank you for the info on 64bit vs 32bit. I guess i’ll stick with what I am on, but in the future I would choose 32bit for maximum compatibility.

yeah there is no real benefit of 64bit over 32bit, except you have a software which require it. Personally I prefer the ARMv7 image.

BTW we define Airsonic to run on port 8080 via service file. But docs are correct https://dietpi.com/docs/software/media/#airsonic

-Dserver.port=8080

Good to know. We can drop it together with Subsonic (which is dead as well). The repo links an alternative project, which indeed seems pretty active: https://github.com/airsonic-advanced/airsonic-advanced
Probably it can be used as drop-in replacement?

curl -sSfL 'https://github.com/airsonic-advanced/airsonic-advanced/releases/download/v10.6.0/airsonic.war' -o /mnt/dietpi_userdata/airsonic/airsonic.war
systemctl restart airsonic

This release is even later than the latest original Airsonic one, so likely it also does not support Java 17 then (which is strange, as I’m pretty sure that I tested it).

v11 is WIP with regular snapshot releases:

curl -sSfL 'https://github.com/airsonic-advanced/airsonic-advanced/releases/download/11.0.0-SNAPSHOT.20211001065822/airsonic.war' -o /mnt/dietpi_userdata/airsonic/airsonic.war
systemctl restart airsonic