Debian: environment variables for config are being ignored

Need help? Post your questions here.

Moderator: moderators

Debian: environment variables for config are being ignored

Postby tovine » Mon Aug 07, 2017 10:29 am

<-------------------------Subsonic Help Request---------------------->
Problem Description: When configuring the Subsonic server using the config file /etc/default/subsonic, none of the environment variables SUBSONIC_HOME, SUBSONIC_HOST, SUBSONIC_PORT etc. that are supposed to be used are honored - it just falls back to the default values set in subsonic.sh. The only variable that seems to make it from that config file to the actual execution is SUBSONIC_ARGS.
Troubleshooting Steps: I set these variables in an attempt to configure my server in a way that wouldn't be overwritten by an upgrade.
Contents of /etc/default/subsonic (comments removed) below:
Code: Select all
SUBSONIC_ARGS="--max-memory=150"
SUBSONIC_CONTEXT_PATH=/music
SUBSONIC_HOST=localhost

This resulted in a command line like the following, clearly not honoring my SUBSONIC_HOST and SUBSONIC_CONTEXT_PATH settings:
Code: Select all
java -Xmx150m -Dsubsonic.home=/var/subsonic -Dsubsonic.host=0.0.0.0 -Dsubsonic.port=4040 -Dsubsonic.httpsPort=0 -Dsubsonic.contextPath=/ -Dsubsonic.db= -Dsubsonic.defaultMusicFolder=/var/music -Dsubsonic.defaultPodcastFolder=/var/music/Podcast -Dsubsonic.defaultPlaylistFolder=/var/playlists -Djava.awt.headless=true -verbose:gc -jar subsonic-booter-jar-with-dependencies.jar

However, if I put the configuration parameters into the SUBSONIC_ARGS string to be parsed as command line arguments (SUBSONIC_ARGS="--max-memory=150 --host=localhost --context-path=/music") everything works like it should:
Code: Select all
java -Xmx150m -Dsubsonic.home=/var/subsonic -Dsubsonic.host=localhost -Dsubsonic.port=4040 -Dsubsonic.httpsPort=0 -Dsubsonic.contextPath=/music -Dsubsonic.db= -Dsubsonic.defaultMusicFolder=/var/music -Dsubsonic.defaultPodcastFolder=/var/music/Podcast -Dsubsonic.defaultPlaylistFolder=/var/playlists -Djava.awt.headless=true -verbose:gc -jar subsonic-booter-jar-with-dependencies.jar

Playback Application and version: Mozilla Firefox 54.0.1
Subsonic Version: 6.1.1 (build fc853b) – May 31, 2017
Server Version: jetty-6.1.x, java 1.8.0_141, HSQLDB, Linux (54.2 MB / 130.0 MB)
Hardware Platform: Debian 9 "Stretch", Linux 4.9.0-3-amd64 x86_64
Java Memory Limit: N/A
Problem Filename: subsonic.sh
Output from ffmpeg -i: N/A
Last ten log file lines: N/A (see execution command line under Troubleshooting Steps:)
<-------------------------Subsonic Help Request---------------------->
I might add that the same config file (/etc/default/subsonic) worked with subsonic server 6.0 but has been broken with every 6.1.* version.
The install was done using the debian package and I'm using Apache 2.4 as a frontend proxy with subsonic listening on localhost only, so this bug broke my setup as it immediately redirected me to localhost:4040 when attempting to log in via the browser.
tovine
 
Posts: 3
Joined: Fri Oct 17, 2014 1:01 am

Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests