Closed Fourdee closed 7 years ago
Prereqs:
apt-get install tomcat8
http://example.com:8080/
http://example.com:8080/libresonic
/var/lib/tomcat8/conf
/var/lib/tomcat8/conf/tomcat-users.xml
systemctl status tomcat8
Tomcat: When using Oracle JDK:
root@DietPi:~# systemctl status tomcat8.service -l
● tomcat8.service - LSB: Start Tomcat.
Loaded: loaded (/etc/init.d/tomcat8)
Active: failed (Result: exit-code) since Tue 2016-12-13 14:51:03 GMT; 10s ago
Dec 13 14:51:03 DietPi systemd[1]: Starting LSB: Start Tomcat....
Dec 13 14:51:03 DietPi tomcat8[4151]: no JDK or JRE found - please set JAVA_HOME ... failed!
Dec 13 14:51:03 DietPi systemd[1]: tomcat8.service: control process exited, code=exited status=1
Dec 13 14:51:03 DietPi systemd[1]: Failed to start LSB: Start Tomcat..
Dec 13 14:51:03 DietPi systemd[1]: Unit tomcat8.service entered failed state.
sed -i '/JAVA_HOME=/c\JAVA_HOME=\/usr\/lib\/jvm\/java-8-oracle' /etc/default/tomcat8
wget https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/libresonic-main/target/libresonic.war -O /var/lib/tomcat8/webapps/libresonic.war
mkdir /var/libresonic
chown tomcat8:tomcat8 /var/libresonic/
root@DietPi:~# cat /var/log/tomcat8/catalina.out | grep sonic
INFO: Deploying web application archive /var/lib/tomcat8/webapps/libresonic.war
SEVERE: Context [/libresonic] startup failed due to previous errors
INFO: Deployment of web application archive /var/lib/tomcat8/webapps/libresonic.war has finished in 48,768 ms
INFO: Deploying web application archive /var/lib/tomcat8/webapps/libresonic.war
[2016-12-13 15:08:35,984] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Hmm, fresh test installs on ARMv7/64:
Notice: Transcoders does not appear to be installed. Click Help button for more information.
root@DietPi:~# ls -lha /var/libresonic/
total 32K
drwxr-xr-x 5 tomcat8 tomcat8 4.0K Dec 13 17:11 .
drwxr-xr-x 12 root root 4.0K Dec 13 16:49 ..
drwxr-xr-x 2 tomcat8 tomcat8 4.0K Dec 13 17:12 db
-rw-r--r-- 1 tomcat8 tomcat8 7.0K Dec 13 17:11 libresonic.log
-rw-r--r-- 1 tomcat8 tomcat8 395 Dec 13 17:06 libresonic.properties
drwxr-xr-x 7 tomcat8 tomcat8 4.0K Dec 13 16:50 lucene2
drwxr-xr-x 3 tomcat8 tomcat8 4.0K Dec 13 16:59 thumbs
lrwxrwxrwx 1 root root 15 Dec 13 17:11 transcode -> /usr/bin/ffmpeg
Not a permissions issue, test launched tomcat8 as root.
Well, i'am stumped. Trans-coding no longer works:
root@DietPi:~# ls -lha /var/libresonic/transcode
lrwxrwxrwx 1 tomcat8 tomcat8 15 Dec 14 17:56 /var/libresonic/transcode -> /usr/bin/ffmpeg
root@DietPi:~# /usr/bin/ffmpeg
ffmpeg version 3.2-2~bpo8+2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian/Linaro 4.9.2-10)
#Lets try permissions...
root@DietPi:~# chown tomcat8:tomcat8 /usr/bin/ffmpeg
root@DietPi:~# ls -lha /usr/bin/ffmpeg
-rwxr-xr-x 1 tomcat8 tomcat8 247K Nov 11 15:39 /usr/bin/ffmpeg
Libresonic now failing to start with lastStableBuild
: https://jenkins.zifnab.net/job/libresonic/lastStableBuild/artifact/libresonic-main/target/libresonic.war
INFO: Deploying web application archive /var/lib/tomcat8/webapps/libresonic.war
[2016-12-21 12:51:58,498] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]
Yet works fine with lastSuccessfulBuild
:
https://jenkins.zifnab.net/job/libresonic/lastSuccessfulBuild/artifact/libresonic-main/target/libresonic.war
Transcoding still broken.
Dropping this from dietpi-software
as the LastStableBuild
and lastSuccessfulBuild
are too unstable, unreliable.
Recommend SubSonic as an alternative (pretty much exactly the same program): https://dietpi.com/phpbb/viewtopic.php?p=213#p213
I'll convert the current installation to tomcat8
Completed.
Dont know if this can help you, but i followed this tutorial to achieve the installation of libresonic http://dsync.blogspot.ca/2016/10/tutorial-complete-tutorial-on.html :) thanks, Gab