Request: syncthing-inotify

Suggestions for features and software you would like to see in DietPi, goes here.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Request: syncthing-inotify

Post by johnvick »

Syncthing is working here so I'll leave it as is, as I have been burned yesterday and today by trying to update pihole (on XU4). If I can't fix this I'll start a new thread or else wait until v141 comes out. In the meantime a fresh install of pihole on a Pi3 is working fine.

John
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Request: syncthing-inotify

Post by Sciamano »

I have updated my dietpi installation to v140, so I uninstalled syncthing and reinstalled it, in order to make it install syncthing-inotify too.

I have a few issues, though:

1) should syncthing-inotify be visible in htop? I can't see any mention of it there
2) maybe because of this, syncthing-inotify is not currently working on my installation: no propagation of modified files or folders happens.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Request: syncthing-inotify

Post by johnvick »

If you follow the instructions in my last message above it should work - I am not sure if the minor edit I had to do to get it working slipped under Fourdee's radar...
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Request: syncthing-inotify

Post by Sciamano »

I'm sure it would work, but since Fourdee has added syncthing-inotify to DietPi, I think the least I can do is to provide information/feedback about it.
I can confirm, after reinstalling everything from scratch, that syncthing installs syncthing-inotify correctly, and both are visible as running in htop, but syncthing-inotify does not correctly detect file changes and therefore it does not propagate them to the other syncthing nodes.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Request: syncthing-inotify

Post by johnvick »

Just for interest can you post the contents of /etc/systemd/system/syncthing-inotify@.service

and /etc/systemd/system/syncthing.service?
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Request: syncthing-inotify

Post by Sciamano »

Code: Select all

root@DietRasPi:~# cat /etc/systemd/system/syncthing-inotify.service
[Unit]
Description=Syncthing Inotify File Watcher
After=network.target syncthing.service
Requires=syncthing.service

[Service]
User=root
ExecStart=/usr/bin/syncthing-inotify -logfile=/var/log/syncthing-inotify.log -logflags=3
SuccessExitStatus=2
RestartForceExitStatus=3
Restart=on-failure
ProtectSystem=full
ProtectHome=read-only

[Install]
WantedBy=multi-user.target

Code: Select all

root@DietRasPi:~# cat /etc/systemd/system/syncthing.service
[Unit]
Description=Syncthing
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/syncthing -logfile=/var/log/syncthing.log -logflags=3
User=root

[Install]
WantedBy=multi-user.target
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Request: syncthing-inotify

Post by johnvick »

The main difference between these and my working versions is that syncthing.service does not have

[unit]
Wants=syncthing-inotify@.service

(Not sure if the "@" symbol is needed - I see it isn't used in your version - but as long as the correct file name is referred to it should be OK).

John
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Request: syncthing-inotify

Post by Sciamano »

I don't have any syncthing-inotify@.service, just the one without the @ symbol.
I will try your version later and see if it starts working properly.
I have noticed that currently syncthing won't detect the file changes even during the scheduled rescans. I need to scan manually in order for it to detect the changes properly and propagate them to the other syncthing nodes. There's definitely something wrong with the default installation.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Request: syncthing-inotify

Post by Fourdee »

Sciamano wrote:I can confirm, after reinstalling everything from scratch, that syncthing installs syncthing-inotify correctly, and both are visible as running in htop, but syncthing-inotify does not correctly detect file changes and therefore it does not propagate them to the other syncthing nodes.
Strange, during testing this was working for me on C2.

Check for any errors in service:

Code: Select all

systemctl status syncthing-inotify.service -l
And also, check log for any errors:

Code: Select all

cat /var/log/syncthing-inotify.log
Paste results here and i'll take a look.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Request: syncthing-inotify

Post by Sciamano »

I can't see any errors (sorry I can't copy and paste, I hope the attachment is fine anyway).
Attachments
Screenshot_2016-12-31-15-28-15-392_org.connectbot.png
Post Reply