I suggest ...

A version of Bliss that will run on a Synology Diskstation NAS.

I have Squeezebox Server running on my Synology NAS, and it would be fantastic if Bliss would as well, so I wouldn't have to use my PC laptop to maintain the artwork files. Putting Bliss on the NAS would create a true "set and forget" situation.

13 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    AlanBobAlanBob shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    completed  ·  Dan GravellAdminDan Gravell (Founder and programmer, bliss) responded  · 

    Build 20111221 ( http://www.blisshq.com/music-library-management-blog/2012/01/03/new-release-20111221-clear-rescan/index.html ) contains a change to the Linux script to allow choice of java by altering JAVA_HOME.

    JAVA_EXEC=java
    if [ -e “${JAVA_HOME}” ]
    then
    JAVA_EXEC=${JAVA_HOME}/bin/java
    fi

    exec ${JAVA_EXEC} ${VMARGS} […]

    So, override JAVA_HOME before you call the script if you want to control the java exe, e.g.

    export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/; ./bliss.sh

    I’m aware that this manual installation is not the nicest-possible solution, however without solid evidence that a fully packaged Diskstation add-on would be worth my time I am not working on that for now. Please open a new idea for a full packaged version if that’s what you want.

    22 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        If the @eaDir directories were moved with the album directories, that might be alright, but I'm not sure what lems / difficulties it cause with the other Synology music apps. I really wouldn't like it if the @eaDir got left behind in otherwise empty directories though.. The really nice thing about bliss is that it cleans up after itself :)

        The BLISS_JAVA_EXEC thing sounds good. Then I would just need to export the symbol in the startup script (S99bliss.sh). I have Subsonic installed on the NAS as well, and they do something similar. They check if a symbol has been exported, and if not, it just uses a default path. From subsonic.h:

        # Use JAVA_HOME if set, otherwise assume java is in the path.
        JAVA=/usr/java/jre1.6.0_26/bin/java
        if [ -e "${JAVA_HOME}" ]
        then
        JAVA=${JAVA_HOME}/bin/java
        fi

        In regards to "ps", -f does not show up as a valid option on the NAS. -w is the only option available for ps on my system.

      • Dan GravellAdminDan Gravell (Founder and programmer, bliss) commented  ·   ·  Flag as inappropriate

        > I assume the presence of this folder [@eaDir] also wouldn't cause issues with deleting the "empty" folder after renaming/moving?

        Hmmm... probably would cause a problem because it's a separate sub directory. It just wouldn't be moved. Does that make this unusable?

        >I'm not sure how the parameterization would work

        It would be something like setting a variable before you run the script, e.g.

        export BLISS_JAVA_EXEC=/usr/....[whatever]

        >In regards to Nigel's comment, "else it is hard to find its pid", I think this refers to the problems I was having with "ps | grep". If ${INSTALL_HOME} is not near the start of the "exec java" command, the /usr/bliss/bin/ doesn't not show up when you call "ps" (it gets truncated), so the code to kill all the bliss processes fails.

        Yes, or -f I think.

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        Hi Dan,

        Thanks for the response. I'm glad to hear that "@eaDir" will be added to the list. I assume the presence of this folder also wouldn't cause issues with deleting the "empty" folder after renaming/moving?

        I'm not sure how the parameterization would work, but I'd be happy to help you test things out if you have some ideas on how it would be implemented. Just send me an email :)

        In regards to Nigel's comment, "else it is hard to find its pid", I think this refers to the problems I was having with "ps | grep". If ${INSTALL_HOME} is not near the start of the "exec java" command, the /usr/bliss/bin/ doesn't not show up when you call "ps" (it gets truncated), so the code to kill all the bliss processes fails. Using "ps w | grep" should solve this though, so you shouldn't need to make that modification to bliss.sh. The only thing currently necessary would be to change the path to java.

      • Dan GravellAdminDan Gravell (Founder and programmer, bliss) commented  ·   ·  Flag as inappropriate

        Thanks Devin...

        >It's a bit of an inconvenience to manually edit the shell file to point to the JRE every time you upgrade to a new version of bliss

        I could probably make this easier by making the start script more parameter-isable, and using default values where parameters are not supplied. e.g. separate ${JAVA_EXE} as the start of the Java command. That said I don't understand Nigel's point "else it is hard to find its pid" as the rationale for putting the classpath toward the start of the line.

        >I still see the problem where Firefox refreshes every ~3 seconds.

        Thanks for letting me know you resolved this. I'm doing some work on corruption in the data/ folder for the next week - making it less likely and also recovering better when corruption occurs.

        >Did you add "@eaDir" to the list of ignored directories in the current version of bliss?

        Afraid not... I've added this to things to do for the next build. Should be fairly quick, there's already code to ignore certain iTunes folders.

        Thanks for the extra info about the ps command. I'm beginning to wonder if we should gather this information together into a more canonical document/article. Maybe Nigel can edit his HOWTO...? (Nigel?)

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        To address my own question #2 below, I was able to get this to stop happening by deleting /root/.bliss/data directory. I think something must have gotten corrupted in there in my previous install.

        I'm still curious #3 though. It seems to be behaving, but I'd like to get confirmation from Dan :)

        One other thing I should mention with Nigel's HOWTO, in case anyone encounters the same problem. When I used his method of running bliss, my DiskStation would not shut down or restart properly. If I tried to restart, it would just hang, forcing me to kill it with the power button (not something I ever want to do).

        The problem was that the stop() method in /etc/init.d/bliss was not finding all the running bliss processes with "ps | grep [/]usr/bliss/bin/". When you type the "ps" command, the output is limited by the width of the console screen, so if it is not wide enough, it will not find the necessary text. I'm not sure how the default width is set when the shutdown script is run (maybe it varies between DistStation models?), but on my system it was truncating before /bin/ so the processes weren't being found.

        The fix is to change "ps | grep" to "ps w | grep". This forces a "wide", untruncated, output of ps, which allows grep to find the relevant text.

        Anyway, besides those few issues, bliss has been running well!

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        I agree that an official Synology package is not needed, so you can probably close out this request. It's a bit of an inconvenience to manually edit the shell file to point to the JRE every time you upgrade to a new version of bliss, but I guess it's not too bad.

        Nigel's instructions are pretty much what I did before to get bliss running. However, there are a few lingering things:

        1) There is a mistake in Nigel's post where he posts the text for /etc/init.d/bliss. There is the following line in there:
        echo "bliss (pid `ps | grep [/]usr/bliss/bin/ | cut -c0-5`) is running$
        The line needs to be modified to have a quotation mark (") instead of $ on the end of it or the script will fail to run.

        2) I still see the problem where Firefox refreshes every ~3 seconds. When I look at Firebug, I see two "comet_request" GETs and two "ajax_request" POSTs. The first GET works fine, but the second GET does not. When it eventually fails/timeouts, the page is reloaded.

        3) Just checking... Did you add "@eaDir" to the list of ignored directories in the current version of bliss? I ran into a problem with that before, but I'm not sure whether it got fixed in the current version.

        Thanks again!

      • Dan GravellAdminDan Gravell (Founder and programmer, bliss) commented  ·   ·  Flag as inappropriate

        With Nigel's HOWTO, I think I'll close this idea. I don't have the time to dedicate to creating a full Synology Diskstation build of bliss, demand will probably not be high enough to dedicate the effort.

        Any objections? I'll give it a week or two.

      • Dan GravellAdminDan Gravell (Founder and programmer, bliss) commented  ·   ·  Flag as inappropriate

        Thanks for that!

        I should say: just yesterday I heard from someone else who has successfully installed bliss on a Diskstation and also written up the instructions. He is in the process of getting them approved for posting on the Synology forums.

        I'll post the link when the instructions are approved.

      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        just stumbled across this, looks very interesting!

        in terms of JRE, a chap named patters has done a lot of work in terms of getting Serviio running on the synology boxes, which in turn involves geting the JRE working. he's managed to reverse engineer the system for making a nice user friendly install using the builtin package manager, might be useful:

        http://pcloadletter.co.uk/2011/08/23/java-package-for-synology/
        http://pcloadletter.co.uk/2011/09/23/serviio-synology-package/
        also
        http://forum.serviio.org/viewtopic.php?f=14&t=3311

      • Dan GravellAdminDan Gravell (Founder and programmer, bliss) commented  ·   ·  Flag as inappropriate

        Well, if it helps I can add @eaDir as directories that are ignored, or I could externalise what directories are ignored and you could add @eaDir into a config file.

        I suspect there may be a database problem. Could you get the log file to me, and I'll take a look? Try clearing out $HOME/.bliss/data and trying again.

        Also look for any .hprof files in /tmp.

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        I'm using Firefox 7.0.1 on Windows. I haven't run many tests yet, because I'm seeing other problems now. Within a minute or two of starting bliss.sh it crashes. I'll try to get you a log in case that would help. I have a few things I want to look into, but I haven't had time:

        1) Memory limit? How much RAM should bliss use? I see there are 128MB allocated Java in bliss.sh...perhaps I should increase it? I tried bumping it to 350MB, but it still crashed (and there's still plenty of RAM left on the server). I'm curious because the last line of the bliss.log says:
        Maximum memory usage (bytes) = 129761280 (?:?)

        2) Possible conflict with another Java service? I also have Subsonic running. I wouldn't think they would interfere, but I'd like to test with bliss separately.

        3) Synology has a bad habit of creating directories called "@eaDir". These directories apparently are used to store thumbnail images for picture / videos, and I assume something similar for .mp3s. Unfortunately the files in these "@eaDir" folders are named the same as their respective files (ex. 01.Song.mp3). Since bliss does not skips these folders, I think these extra files are giving it a hard time.

        I tried recursively getting rid of all of the "@eaDir" folders, but bliss still crashed, so I guess this isn't the whole issue. It is something that's going to need to be worked around though for proper functionality...

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        Hi Dan,

        Just an update on this. I tried installing bliss on my Synology Diskstation 1010+ tonight, and I was able to get it working. I did first have to manually get java, and update the bliss.sh to point to the correct java path. After that though, it seems to be working.

        One odd thing though is that if I open the GUI from a remote machine in Firefox, the web page automatically refreshes every 5-10 seconds. This makes it really difficult to actually change/apply rules. However, using Internet Explorer seems to fix the issue. Not sure if this problem is related to the Synology box or not, but I didn't see this behavior in Firefox when running a local Windows bliss installation.

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        Yes, the Synology operating system is based on a Linux kernel. It does provide a framework for 3rd party applications which allows you to install the software to the NAS. Some relevant links for properly compiling and packaging the software are:

        http://www.synology.com/apps/3rd_party_app_int.php
        http://forum.synology.com/wiki/index.php/Synology_package_files

        It may also be possible to bypass the package framework and do a direct install using a Telnet/ssh client, but this is not something I have experience with. An example of this might be the "Squeezebox Server on Diskstation" (SSODS) software described in the link below (although Synology now provides their own official up-to-date Squeezebox Server package).

        http://oinkzwurgl.org/ssods_installation

        I don't have much Linux experience, but if there's something I can do to help, let me know.

      • Devin KoopmansDevin Koopmans commented  ·   ·  Flag as inappropriate

        Agreed! I have a DS-1010+ (Intel Atom processor), and I'd love to see this natively running on my server.

      • SimonSimon commented  ·   ·  Flag as inappropriate

        Put me down for this one as well! Would be AMAZING if bliss could run on my Synology.

      ← Previous 1

      Feedback and Knowledge Base