Post Reply 
 
Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Rescan package for Synology users (formerly known as Auto Restart package)
15-01-2015, 18:17
Post: #141
RE: Auto Restart package for Synology users
Hi,

I just tried to install the Auto Restart package (0.9 as well as 0.9b) on a Synology DS409slim (DSM 4.2) with a running MinimServer (0.8.3) on it.
ipkg, gcc and make are installed already.
Unfortunately, all I get is a message saying "inotify-tools download failed."
There is no folder "/volume1/homes/minimautorestart" being created on the box and I can't see a logfile anywhere.

Where may I start looking to resolve the issue?

Any input is appreciated.

Code:
409slim> gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: ../gcc-4.2/configure --build=i386-pc-linux-gnu --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --prefix=/opt --disable-nls --disable-static --with-as=/home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-as --with-ld=/home/slug/optware/cs08q1armel/toolchain/arm-2008q1/bin/arm-none-linux-gnueabi-ld --enable-languages=c,c++ --disable-multilib --enable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --enable-shared --enable-symvers=gnu --enable-__cxa_atexit
Thread model: posix
gcc version 4.2.3

409slim> make -v
GNU Make 3.82
Built for arm-none-linux-gnueabi
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
409slim>
Find all posts by this user
Quote this message in a reply
16-01-2015, 21:31 (This post was last modified: 22-11-2019 17:44 by DLNABubble.)
Post: #142
RE: Auto Restart package for Synology users
[edit] See update at the end of this post:

I've got the auto-restart package installed after cross-compiling the inotify-tools for my DS409slim myself using spksrc. (https://github.com/SynoCommunity/spksrc)

Since I slapped together this package rather quickly, it is far from installable.
Anyway, all I was interested in at the moment are the binaries which I copied manually to my disc station:
inotifywait and inotifywatch to /usr/bin/
libinotifytools.so.0.4.1 to /usr/lib/ (plus created the symbolic link libinotifytools.so.0 referencing it).

A quick test proofed the auto start package to be working.

Looking at /etc/passwd I found the home directory for the user "minimautorestart" to be living at "/var/services/homes/minimautorestart"

This is where the log files on my box are to be found too.
The reason for the failed installation is a SSL issue preventing the inotify-tools source from beeing downloaded:
Code:
Location: https://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz [following]
--17:55:28--  https://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
           => `inotify-tools-3.14.tar.gz'
Connecting to github.com|192.30.252.130|:443... connected.
WARNING: Certificate verification error for github.com: unable to get local issuer certificate
HTTP request sent, awaiting response... 302 Found
Location: https://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz [following]
--17:55:29--  https://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
           => `inotify-tools-3.14.tar.gz'
Resolving cloud.github.com... 54.192.46.184, 54.230.47.233, 54.192.46.204, ...
Connecting to cloud.github.com|54.192.46.184|:443... connected.
OpenSSL: error:14077410:lib(20):func(119):reason(1040)
Unable to establish SSL connection
A slightly newer version for DSM 4.2 for my disc station model is available which could possibly solve this issue - maybe (my model is EOL what newer DSM version is concerned).

Having created the spksrc module, I might as well share it with others.
Out of curiosity and since some others where asking for it on this thread, I just compiled it for the x86 architecture and the DSM 5.0 toolchain.
Good news first: It did compile!
In case anyone wants to have a go:

Code:
git clone https://github.com/cyc1ingsir/spksrc.git
git checkout inotify-tools

# this is needed only once
docker pull synocommunity/spksrc

# assuming you have cloned the source directly to your home directory
docker run -it -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash
cd spk/inotify-tools/
make arch-x64-6.1 # <- insert the arch for your disk station here (https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model)
You'll will then find the binaries at the subfolder "work-x64-6.1/install/usr/local/inotify-tools"

The installable package can be found at spksrc/packages/inotify-tools_x64-6.1_1.0.0-1.spk

So a really big thankyou to @winxi for creating the minimautorestart package!

Previously I used a miniDLNA and really would have missed new recordings beeing added automatically to the library.
Having had some problems with miniDLNA (having to rescan the my library every now and then and sometimes the service not responding as well as preventing the HDDs in the disc station from going to sleep as I noticed just the other day), I'm currently evaluating MinimServer.
Combined with the auto restart package it is looking quite nicely so far.
However, something I always wanted to look at for miniDLNA was to try to add a feature that I could rescan subfolder of my audio library only.

Why in my opinion the restart may be quite annoying from time to time I will elaborate in another post.
At the moment I just want to ask: Wouldn't it be nice if the autorestart package was able to tell MinimServer that a change had ocured in a specific subfolder of the audio library being served and hence MinumServer would rescan this part of the library only?

[edit - November 2019]
I just updated the above instructions within the code section - 4.8 years after initially posting it.
I need to upgrade our old disk station shortly. So I'd rather get this going.
What have I achieved so far:

I was able to install the created inotify-tools package. With this in place, i was able to install winxi's auto restart package.

However, I was only able to test it on a disk station with DSM 6.2.2 installed. Your results may vary. Also I haven't tested if the auto restart package still restarts the MinimServer.
So please use it with caution!
It would be nice if someone else could test it too.
The placement of the binaries (tools and library) on the disk station's file system needs to be verified.
I hopefully find the time to make a PR against the SynoCommunity project this time round. This would enable us to install the package from the SynoCommunity package repository.

I must admit, I did hope not to need the tools and the restart package any longer. I still patiently waiting for:
Quote:In a future version of MinimServer, I am hoping to incorporate automatic detection of changes to the library without requiring a server restart.
Find all posts by this user
Quote this message in a reply
17-01-2015, 17:13
Post: #143
RE: Auto Restart package for Synology users
(16-01-2015 21:31)DLNABubble Wrote:  Why in my opinion the restart may be quite annoying from time to time I will elaborate in another post.
At the moment I just want to ask: Wouldn't it be nice if the autorestart package was able to tell MinimServer that a change had occured in a specific subfolder of the audio library being served and hence MinumServer would rescan this part of the library only?

In a future version of MinimServer, I am hoping to incorporate automatic detection of changes to the library without requiring a server restart. This capability would be built in to MinimServer and wouldn't require the Auto Restart package. It wouldn't rescan the whole library, just the files that have changed.

There are a number of difficult technical and design issues that need to be resolved to make this work and I can't give any time estimate for when it might be available.
Find all posts by this user
Quote this message in a reply
11-02-2016, 08:14
Post: #144
RE: Auto Restart package for Synology users
Hi Simon,
(17-01-2015 17:13)simoncn Wrote:  In a future version of MinimServer, I am hoping to incorporate automatic detection of changes to the library without requiring a server restart. This capability would be built in to MinimServer and wouldn't require the Auto Restart package. It wouldn't rescan the whole library, just the files that have changed.

I wonder if you had the chance to work on this. That would be a very very welcomed feature.
The startup delay increases as my libraries of music / recordings grows.
Find all posts by this user
Quote this message in a reply
11-02-2016, 23:19
Post: #145
RE: Auto Restart package for Synology users
(11-02-2016 08:14)DLNABubble Wrote:  I wonder if you had the chance to work on this. That would be a very very welcomed feature.
The startup delay increases as my libraries of music / recordings grows.

I have not yet had the chance to work on this. It would require major changes to MinimServer and would be a very large piece of work. I can't give any time estimate for when it might be available.
Find all posts by this user
Quote this message in a reply
25-04-2016, 18:46
Post: #146
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
I've updated the package to version 1.0 with a few major changes. The package now uses the scripting functionality introduced in MinimServer 0.8.4. Moreover, the installer doesn't attempt to install inotify-tools anymore - the user himself is now responsible to install inotify-tools (see the 'Installation' section in the first post of this thread).

In summary, the package has a much clearer design now and doesn't alter the system files of your Disk Station anymore.
Find all posts by this user
Quote this message in a reply
26-04-2016, 11:20
Post: #147
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(25-04-2016 18:46)winxi Wrote:  I've updated the package to version 1.0 with a few major changes. The package now uses the scripting functionality introduced in MinimServer 0.8.4. Moreover, the installer doesn't attempt to install inotify-tools anymore - the user himself is now responsible to install inotify-tools (see the 'Installation' section in the first post of this thread).

In summary, the package has a much clearer design now and doesn't alter the system files of your Disk Station anymore.

Installed AutoRescan but after the line: “Setting up watches!etc” there is the following line: ‘An notify error occurred see /volume1/@appstore/MinimServerAutoRescan/inotyfy-stderr.log”
/volume 1 is definitely my Sinology NAS, but i can’t find the error file, there is no @appstore directory. In the MinimServer directory also no error file. What ca I do?
Find all posts by this user
Quote this message in a reply
26-04-2016, 11:46
Post: #148
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(26-04-2016 11:20)tomfox Wrote:  Installed AutoRescan but after the line: “Setting up watches!etc” there is the following line: ‘An notify error occurred see /volume1/@appstore/MinimServerAutoRescan/inotyfy-stderr.log”
/volume 1 is definitely my Sinology NAS, but i can’t find the error file, there is no @appstore directory. In the MinimServer directory also no error file. What ca I do?

Hi, please install the version attached to this post and post a screenshot from the package center log file view.
How did you install inotify-tools?


Attached File(s)
.spk  AutoRescan-1.0b.spk (Size: 150 KB / Downloads: 4)
Find all posts by this user
Quote this message in a reply
26-04-2016, 14:00
Post: #149
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(26-04-2016 11:46)winxi Wrote:  
(26-04-2016 11:20)tomfox Wrote:  Installed AutoRescan but after the line: “Setting up watches!etc” there is the following line: ‘An notify error occurred see /volume1/@appstore/MinimServerAutoRescan/inotyfy-stderr.log”
/volume 1 is definitely my Sinology NAS, but i can’t find the error file, there is no @appstore directory. In the MinimServer directory also no error file. What ca I do?

Hi, please install the version attached to this post and post a screenshot from the package center log file view.
How did you install inotify-tools?

Hallo, thanks for the answer.
I installed inotify-tools by adding the http://synology.francis-besset.com. There is a notification that this is a Beta version but is version 314-2? See attached screenshot (upper limit inotify watches reached & err.log file is still unavailable in this 1b version). Hope you know a solution.
With regards,
Tom


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
26-04-2016, 14:10
Post: #150
RE: Auto Rescan package for Synology users (formerly known as Auto Restart package)
(26-04-2016 14:00)tomfox Wrote:  Hallo, thanks for the answer.
I installed inotify-tools by adding the http://synology.francis-besset.com. There is a notification that this is a Beta version but is version 314-2? See attached screenshot (upper limit inotify watches reached & err.log file is still unavailable in this 1b version). Hope you know a solution.
With regards,
Tom

Hello, many thanks for posting this. The log file says that the maximum amount of inotify watches per user is reached. How many files do you have in the directory /volume1/music?
On my disk station, this limit is 102400. You may increase this limit by logging in to your disk station via ssh and writing the new limit to /proc/sys/fs/inotify/max_user_watches
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)