Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

[How to] Install Airsonic on FreeNAS iocage jail

Joined
Dec 25, 2016
Messages
3
Versions:

FreeNAS-11.2-BETA1
Airsonic 10.1.2 Stand-alone WAR (all platforms)
iocage jail (11.1-RELEASE-p6)

*** Create airsonic iocage ***

iocage create --name "airsonic" --release 11.1-RELEASE boot=on vnet=on ip4_addr="vnet0|192.168.1.217/24" defaultrouter="192.168.1.1" host_hostname="airsonic" allow_raw_sockets="1"


*** Add storage ***

iocage fstab --add airsonic /mnt/tank/media/Music /media nullfs rw 0 0


*** Some troubleshooting commands ***

#iocage start airsonic
#iocage stop airsonic
#iocage set boot=off airsonic
#iocage set ip4_addr="vnet0|192.168.1.217/24" airsonic
#setenv EDITOR /usr/local/bin/nano
#iocage fstab -e airsonic


*** Enter airsonic jail ***

iocage console airsonic


*** Install packages ***

pkg update
pkg upgrade
pkg install nano wget
pkg install java/openjdk8

mkdir /var/airsonic/
mkdir /usr/local/airsonic
cd /usr/local/airsonic
wget https://github.com/airsonic/airsonic/releases/download/v10.1.2/airsonic.war --no-check-certificate


*** OPTIONAL - Copy configuration from old warden jail to new iocage jail ***

exit
cp -Raf "/mnt/pool/jails/airsonic/var/airsonic" "/mnt/iocage/jails/airsonic/root/var" # database and config
cp "/mnt/pool/jails/airsonic/etc/rc.d/airsonic" "/mnt/iocage/jails/airsonic/root/etc/rc.d/" # rc script
iocage console airsonic
chown -R ${USER}:${GROUP} /var/airsonic # root:wheel


*** Install ffmpeg dependencies and Ports Tree with MP3 (lame) support ***
Install the dependencies required to build and use ffmpeg:

pkg install yasm binutils texi2html frei0r v4l_compat gmake pkgconf perl5 fontconfig freetype2 opencv-core schroedinger libtheora libv4l libva libvdpau libvorbis libvpx libx264 xvid gnutls libiconv


Now install the FreeBSD Ports Tree

portsnap fetch
portsnap extract


Build ffmpeg
Navigate to the ffmpeg port directory

cd /usr/ports/multimedia/ffmpeg


Configure ffmpeg build

make configure


This will bring up a menu. Scroll down using arrow keys to “LAME” and hit the spacebar to enable it. Press enter to continue.
The ffmpeg source files will automatically be downloaded then you will be presented with an additional prompt to install documentation. I uncheck with spacebar then press enter to continue.
Start build and installation of ffmpeg

make install clean


Building ffmpeg will take some time depending on the capabilities of your machine, please be patient.
Symlink ffmpeg to where Airsonic expects the transcoder to be.

ln -s /usr/local/bin/ffmpeg /var/airsonic/transcode/ffmpeg


*** Test airsonic (command line start) ***

#java -jar airsonic.war
/usr/local/bin/java -jar /usr/local/airsonic/airsonic.war


*** Create rc autostart script ***

nano /etc/rc.d/airsonic # ...and paste text from the bottom
chmod +x /etc/rc.d/airsonic
sysrc "airsonic_enable=YES" # make service start at jail startup (changes /etc/rc.conf)
service airsonic start # start service


*** Some troubleshooting commands ***

service airsonic stop
service airsonic start
netstat -an | grep 8080 # Check if listening at port 8080
cat -v airsonic # Check if script file have any CR at line end (shows: ^M)
tr -d '\r' < infile > outfile # Eliminate CRs


*** Navigate to Airsonic in a browser ***
Default context and port (command line test start):
Configured context and port (automatic service start):

*** Path to update spanish translate ***

airsonic.war\WEB-INF\classes\org\airsonic\player\i18n\ResourceBundle_es.properties

document:
ResourceBundle_es.properties
Old translation web:
New translation web:

**** Content of airsonic rc script file (/etc/rc.d/airsonic) ***
/etc/rc.d/airsonic


#!/bin/sh
#
# $FreeBSD: airsonic $
#
# PROVIDE: airsonic REQUIRE: LOGIN KEYWORD: shutdown
#
# Configuration settings for airsonic in /etc/rc.conf:
#
# airsonic_enable (bool):
# Set to "NO" by default. Set it to "YES" to enable airsonic.
#
# airsonic_home (str):
# Set to "/var/airsonic" by default.
#
# airsonic_host (str):
# Set to "0.0.0.0" by default. Specify which IP address to listen to.
#
# airsonic_port (int):
# Set to "4040" by default. Specify which port to listen on for HTTP(S).
#
# airsonic_context_path (str):
# Set to "/" by default. Specify the last part of the airsonic URL, typically "/" or "/airsonic".
#
# airsonic_init_memory (int):
# Set to "192" by default. Specify the memory initial size (Java heap size) in megabytes.
#
# airsonic_max_memory (int):
# Set to "384" by default. Specify the memory limit (Java heap size) in megabytes.
#

. /etc/rc.subr

name=airsonic
desc="Airsonic is a free, web-based media streamer, providing ubiquitous access to your music"
rcvar=${name}_enable
pidfile="/var/run/${name}.pid"

load_rc_config "${name}"

: ${airsonic_enable:="NO"}
: ${airsonic_user:="root"} #: ${airsonic_user:="media"}
: ${airsonic_group:="wheel"} #: ${airsonic_group:="media"}
: ${airsonic_home:="/var/airsonic"}
: ${airsonic_address:="0.0.0.0"}
: ${airsonic_port:="4040"}
: ${airsonic_ssl:="NO"}
: ${airsonic_context_path:="/airsonic"}
: ${airsonic_init_memory:="192"}
: ${airsonic_max_memory:="512"}
: ${airsonic_chdir:="/usr/local/airsonic"}

start_cmd=airsonic_start
stop_cmd=airsonic_stop
restart_cmd=airsonic_restart
status_cmd=airsonic_status
start_precmd="export LC_CTYPE='en_US.UTF-8'"

# -Dairsonic.defaultMusicFolder=${airsonic_home}/artists \
# -Dairsonic.defaultUploadFolder=${airsonic_home}/incoming \
# -Dairsonic.defaultPodcastFolder=${airsonic_home}/podcasts \
# -Dairsonic.defaultPlaylistImportFolder=${airsonic_home}/playlists/import \
# -Dairsonic.defaultPlaylistExportFolder=${airsonic_home}/playlists/export \
# -Dairsonic.defaultPlaylistBackupFolder=${airsonic_home}/playlists/backup \

command="/usr/sbin/daemon -p ${pidfile} -f -u ${airsonic_user}"
procname="/usr/local/bin/java"
command_args="-Dairsonic.home=${airsonic_home} -Dserver.address=${airsonic_address} -Dserver.port=${airsonic_port} -Dserver.context-path=${airsonic_context_path} -Xms${airsonic_init_memory}m -Xmx${airsonic_max_memory}m -Djava.awt.headless=true -jar ${airsonic_chdir}/airsonic.war"
command_args1="-Dairsonic.home=${airsonic_home} -Dserver.port=${airsonic_port} -jar ${airsonic_chdir}/airsonic.war"

airsonic_start() {
echo "Starting Airsonic"
echo "${command} ${procname} ${command_args}"
cd ${airsonic_chdir}
${command} ${procname} ${command_args}
}

airsonic_stop() {
echo "Stopping Airsonic"
kill `cat ${pidfile}`
rm ${pidfile}
}

airsonic_restart() {
airsonic_stop
sleep 1
airsonic_start
}

airsonic_status() {
if airsonic_check; then
echo "Airsonic running"
return 1
else
echo "Airsonic not running"
return 0
fi
}

airsonic_check() {
if [ -f ${pidfile} ]; then
return 0
else
return 1
fi
}

run_rc_command "$1"


Regards
 
Joined
Jan 15, 2018
Messages
1
Luis Miguel, thank you for solution.

When I was try to install Airsonic, I've error on stage ffmpeg configuring.
env: /usr/local/bin/perl5.26.3: No such file or directory
I was solved it by command
ln -s /usr/local/bin/perl5.26.2 /usr/local/bin/perl5.26.3
 
Last edited:

di0de

Newbie
Joined
Oct 19, 2013
Messages
48
Joined
Dec 1, 2018
Messages
25
Hey man, great tutorial for a beginner like me!

I'm having a bit of trouble at the last part though. Whenever i start airsonic as a service when i go to IP:4040, it connects but only shows a fully blank page (no error or anything). If it start it in commandline, it works perfectly at port 8080.

I haven't been able to debug it since I'm very new to this. Any idea ?
 
Joined
Dec 25, 2016
Messages
3

diedrichg

FreeNAS Expert
Joined
Dec 4, 2012
Messages
1,239
Upgrading Airsonic
Code:
service airsonic stop
cd /usr/local/airsonic/
wget https://github.com/airsonic/airsonic/releases/download/v10.5.0/airsonic.war --no-check-certificate

This will create a copy labeled airsonic.war.1, we did this on purpose in case the download corrputed.

Code:
rm airsonic.war
mv airsonic.war.1 airsonic.war
service airsonic start
 

Bmck26

Newbie
Joined
Dec 9, 2013
Messages
43
I just tried for several hours to get this to work with airsonic v10.5.0 in a 11.3-RELEASE iocage but I have had no luck. I still had to create a link for the mismatched perl versions for ffmpeg, perl5.30.1 >> perl5.30.2. I also had to create the transcode directory manually before I could do this step ln -s /usr/local/bin/ffmpeg /var/airsonic/transcode/ffmpeg .

When I got to the "Test airsonic (command line start)" and tried to run #java -jar airsonic.war , I got Error: Unable to access jarfile airsonic.war. Airsonic still started when I ran /usr/local/bin/java -jar /usr/local/airsonic/airsonic.war but it failed to restart after configuring the rc autostart script. This is what I got when I tried to start it manually again.

Code:
2020-03-25 22:22:57.900  INFO --- org.airsonic.player.Application          : Starting Application v10.5.0-RELEASE on airsonic with PID 64278 (/usr/local/airsonic/airsonic.war started by root in /root)
2020-03-25 22:22:57.903  INFO --- org.airsonic.player.Application          : The following profiles are active: legacy
2020-03-25 22:23:00.532  INFO --- o.a.p.service.SettingsService            : Java: 1.8.0_232, OS: FreeBSD
2020-03-25 22:23:00.757  INFO --- org.airsonic.player.Application          : Detected Tomcat web server
2020-03-25 22:23:06.104 ERROR --- o.a.p.spring.SpringLiquibase             : ===============================================
2020-03-25 22:23:06.104 ERROR --- o.a.p.spring.SpringLiquibase             : An exception occurred during database migration
2020-03-25 22:23:06.104 ERROR --- o.a.p.spring.SpringLiquibase             : A rollback file has been generated at /var/airsonic/rollback.sql
2020-03-25 22:23:06.104 ERROR --- o.a.p.spring.SpringLiquibase             : Execute it within your database to rollback any changes
2020-03-25 22:23:06.110 ERROR --- o.a.p.spring.SpringLiquibase             : The exception is as follows


liquibase.exception.DatabaseException: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:307) ~[liquibase-core-3.6.3.jar!/:na]
        at org.airsonic.player.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:25) ~[classes!/:10.5.0-RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756) [spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) [spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) [spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.airsonic.player.Application.main(Application.java:221) [classes!/:10.5.0-RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) [airsonic.war:10.5.0-RELEASE]
Caused by: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbcDriver.getConnection(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbcDriver.connect(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[na:1.8.0_232]
        at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[na:1.8.0_232]
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:196) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:159) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:302) ~[liquibase-core-3.6.3.jar!/:na]
        ... 41 common frames omitted

2020-03-25 22:23:06.110 ERROR --- o.a.p.spring.SpringLiquibase             : ===============================================
2020-03-25 22:23:06.111  WARN --- ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'randomPlayQueueController': Unsatisfied dependency expressed through field 'playerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [applicationContext-db.xml]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
2020-03-25 22:23:06.120  WARN --- .s.c.a.CommonAnnotationBeanPostProcessor : Invocation of destroy method failed on bean with name 'daoHelper': org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
2020-03-25 22:23:06.149 ERROR --- o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'randomPlayQueueController': Unsatisfied dependency expressed through field 'playerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [applicationContext-db.xml]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) ~[spring-context-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:123) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:666) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:353) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:300) ~[spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:135) [spring-boot-1.5.22.RELEASE.jar!/:1.5.22.RELEASE]
        at org.airsonic.player.Application.main(Application.java:221) [classes!/:10.5.0-RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [airsonic.war:10.5.0-RELEASE]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59) [airsonic.war:10.5.0-RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [applicationContext-db.xml]: Invocation of init method failed; nested exception is liquibase.exception.DatabaseException: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:211) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        ... 26 common frames omitted
Caused by: liquibase.exception.DatabaseException: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:307) ~[liquibase-core-3.6.3.jar!/:na]
        at org.airsonic.player.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:25) ~[classes!/:10.5.0-RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626) ~[spring-beans-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        ... 38 common frames omitted
Caused by: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@22d6d632[file =/var/airsonic/db/airsonic.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: checkHeartbeat(): lock file [/var/airsonic/db/airsonic.lck] is presumably locked by another process.
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbcDriver.getConnection(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at org.hsqldb.jdbcDriver.connect(Unknown Source) ~[hsqldb-1.8.0.7.jar!/:private-2006/09/24-10:30:15]
        at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[na:1.8.0_232]
        at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[na:1.8.0_232]
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:196) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:159) ~[spring-jdbc-4.3.25.RELEASE.jar!/:4.3.25.RELEASE]
        at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:302) ~[liquibase-core-3.6.3.jar!/:na]
        ... 41 common frames omitted

I don't why we don't have a plugin for this instead of a 4-year old version of Subsonic. I would appreciate it if anyone has any ideas about what's happening here.

Thanks,
 
Last edited:
Top