[FreeNAS 9 Plugin] - Syncthing

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The 192.168.1.22 is my syncthing adress from router, and jail DHCP adress.

service syncthing onestatus
syncthing is running as pid 64268.

Ah.. from the jail log, sorry, i have looked on the root folder... my fault, there i have for example, on the newest panic log:
.....
goroutine 65 [select]:
github.com/syncthing/syncthing/lib/ignore.(*Matcher).clean(0xc208fa07d0, 0x68c61714000)
/go/src/github.com/syncthing/syncthing/lib/ignore/ignore.go:161 +0x1c9
created by github.com/syncthing/syncthing/lib/ignore.New
/go/src/github.com/syncthing/syncthing/lib/ignore/ignore.go:53 +0x170

goroutine 67 [select]:
github.com/syncthing/syncthing/lib/ignore.(*Matcher).clean(0xc208659ae0, 0x68c61714000)
/go/src/github.com/syncthing/syncthing/lib/ignore/ignore.go:161 +0x1c9
created by github.com/syncthing/syncthing/lib/ignore.New
/go/src/github.com/syncthing/syncthing/lib/ignore/ignore.go:53 +0x170

Bounch of such infos
OK, so syncthing is being started successfully so the plugin middleware works fine. but either the freebsd build syncthing autoupdated to, or your specific data is causing it not to bind to a network socket.

this is application specific so I suggest you create a bug on syncthing's github page. you should post the syncthing log there and tell them this happened after an autoupdate.

you can also further try to isolate the issue by installing a second instance of syncthing and updating to the latest version. that will show if it's your specific data or the build they are pushing out.
 

Silwanyx

Dabbler
Joined
Oct 18, 2014
Messages
19
Found the problem:

The update of FreeNAS has damaged the Syncthing database! Maybe on restarting.

I have completly deleted the "index-v0.11.0.db" folder from:

mnt/.../jails/syncthing_1/var/db/syncthing

Restarted the Syncthing plugin from FreeNAS GUI, and, voila, the Syncthing GUI started, and rebuild the database again.

All works ok now. Again, happy.

Thank you, Joshua, for spending your time to help me.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
no problem. glad you got it figured out
 

Silwanyx

Dabbler
Joined
Oct 18, 2014
Messages
19
Today, i have my Syncthing plugin see offline. It has automaticaly go offline. There was no update, nothing. I restarted the server, and now, is working, but, i noticed, if i look at ps aux on the snycthing plugin shell, i have 3 syncthing instance started, one is daemon, 1 is showing a CPU is used, but the 3rd is do nothing, it is just there.

I tryed to kill -9 this one who do nothing, but, all 3 instances are gone. I have restarted the plugin with service syncthing start, and there are one more time, all 3 instances there. The GUI is working, but, i'm not sure, is this normal to have 3 PID? look at my ps aux:

root@syncthing_1:/ # ps aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
syncthing 79058 112.9 0.5 185772 181016 ?? SJ 9:54PM 1:11.74 /usr/pbi/syncthing-amd64/bin/syncthing/syncthing -home=/var/db/syn
root 13037 0.0 0.0 12088 1920 ?? IsJ 9:49PM 0:00.00 dhclient: epair6b [priv] (dhclient)
_dhcp 13099 0.0 0.0 12088 1992 ?? IsJ 9:49PM 0:00.00 dhclient: epair6b (dhclient)
root 13492 0.0 0.0 12092 1872 ?? SsJ 9:49PM 0:00.00 /usr/sbin/syslogd -s
root 13552 0.0 0.0 14188 1864 ?? IsJ 9:49PM 0:00.00 /usr/sbin/cron -s
root 13858 0.0 0.1 166856 49164 ?? IJ 9:49PM 0:01.92 /usr/pbi/syncthing-amd64/bin/python2.7 /usr/pbi/syncthing-amd64/co
syncthing 79056 0.0 0.0 12092 1628 ?? IsJ 9:54PM 0:00.00 daemon: /usr/pbi/syncthing-amd64/bin/syncthing/syncthing[79057] (d
syncthing 79057 0.0 0.0 15368 11772 ?? SJ 9:54PM 0:00.01 /usr/pbi/syncthing-amd64/bin/syncthing/syncthing -home=/var/db/syn
root 79029 0.0 0.0 17572 3404 1 Is+J 9:54PM 0:00.02 /bin/csh
root 7924 0.0 0.0 17572 3536 2 SsJ 9:55PM 0:00.01 /bin/csh
root 7947 0.0 0.0 16300 2136 2 R+J 9:55PM 0:00.00 ps aux

it look like PID 79058 and 79057 are identicaly.

Is there somthing wrong? Maybe the syncthing is started now 2 times? I have early installed from FreeNAS the plugin, but now, i have updated it from GUI. Myybe is there some problem? Where should i look, if there are 2 instances of same plugin started, or not?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Today, i have my Syncthing plugin see offline. It has automaticaly go offline. There was no update, nothing. I restarted the server, and now, is working, but, i noticed, if i look at ps aux on the snycthing plugin shell, i have 3 syncthing instance started, one is daemon, 1 is showing a CPU is used, but the 3rd is do nothing, it is just there.

I tryed to kill -9 this one who do nothing, but, all 3 instances are gone. I have restarted the plugin with service syncthing start, and there are one more time, all 3 instances there. The GUI is working, but, i'm not sure, is this normal to have 3 PID? look at my ps aux:

root@syncthing_1:/ # ps aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
syncthing 79058 112.9 0.5 185772 181016 ?? SJ 9:54PM 1:11.74 /usr/pbi/syncthing-amd64/bin/syncthing/syncthing -home=/var/db/syn
root 13037 0.0 0.0 12088 1920 ?? IsJ 9:49PM 0:00.00 dhclient: epair6b [priv] (dhclient)
_dhcp 13099 0.0 0.0 12088 1992 ?? IsJ 9:49PM 0:00.00 dhclient: epair6b (dhclient)
root 13492 0.0 0.0 12092 1872 ?? SsJ 9:49PM 0:00.00 /usr/sbin/syslogd -s
root 13552 0.0 0.0 14188 1864 ?? IsJ 9:49PM 0:00.00 /usr/sbin/cron -s
root 13858 0.0 0.1 166856 49164 ?? IJ 9:49PM 0:01.92 /usr/pbi/syncthing-amd64/bin/python2.7 /usr/pbi/syncthing-amd64/co
syncthing 79056 0.0 0.0 12092 1628 ?? IsJ 9:54PM 0:00.00 daemon: /usr/pbi/syncthing-amd64/bin/syncthing/syncthing[79057] (d
syncthing 79057 0.0 0.0 15368 11772 ?? SJ 9:54PM 0:00.01 /usr/pbi/syncthing-amd64/bin/syncthing/syncthing -home=/var/db/syn
root 79029 0.0 0.0 17572 3404 1 Is+J 9:54PM 0:00.02 /bin/csh
root 7924 0.0 0.0 17572 3536 2 SsJ 9:55PM 0:00.01 /bin/csh
root 7947 0.0 0.0 16300 2136 2 R+J 9:55PM 0:00.00 ps aux

it look like PID 79058 and 79057 are identicaly.

Is there somthing wrong? Maybe the syncthing is started now 2 times? I have early installed from FreeNAS the plugin, but now, i have updated it from GUI. Myybe is there some problem? Where should i look, if there are 2 instances of same plugin started, or not?
i don't know the specifics of syncthing but many daemons use multiple processes at once.
 

kknas

Cadet
Joined
Feb 12, 2015
Messages
8
Hi!
I run the latest upgrade of FreeNAS-9.3-STABLE. I upgraded to the latest version of the Syncthing plugin today, and I could not get it to run since then. A jail and a system restart did not help.
After trying service syncthing start, I see this line in the syncthing log:
/usr/pbi/syncthing-amd64/bin/syncthing: Permission denied
The permissions are:
root@syncthing_1:/ # ls -la /usr/pbi/syncthing-amd64/bin/syncthing/
drwxr-xr-x 2 syncthing wheel 2 Sep 28 00:53 .
So to my knowledge, synthing should be able to run.

Can someone point me to where I should look at? Any help is greatly appreciated.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi!
I run the latest upgrade of FreeNAS-9.3-STABLE. I upgraded to the latest version of the Syncthing plugin today, and I could not get it to run since then. A jail and a system restart did not help.
After trying service syncthing start, I see this line in the syncthing log:

The permissions are:

So to my knowledge, synthing should be able to run.

Can someone point me to where I should look at? Any help is greatly appreciated.
When you say you upgraded to the latest syncthing, do you mean by clicking the "upgrade"Did you upgrade button on the FreeNAS WebUI > Plugins > Installed tab?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yes, exactly.
unfortunately, if you did this yesterday you probably didn't upgrade, but actually downgraded because one of the CDNs serving out plugin repos was out out of date.

if you see the upgrade option again today and can verify it will install version 0.11.9 then you could try that. or you could try backing up your datdirectory at /var/db/syncthing. I don't know if these will work wihiut additional steps because once running the sycnthing plugin also autoupdates to the latest available and version 0.11.9 may not be forward compatible with your data-directory. by the way, I haven't updated the syncthing version freenas ships since June when I enabled the autoupdate feature.
 

kknas

Cadet
Joined
Feb 12, 2015
Messages
8
unfortunately, if you did this yesterday you probably didn't upgrade, but actually downgraded because one of the CDNs serving out plugin repos was out out of date.

I really got an older version, 0.8.19. After updating again, I am back at 0.11.11. I have some sync problems, but I blame them on my syncthing config problems that I had before. So thanks for your help!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I really got an older version, 0.8.19. After updating again, I am back at 0.11.11. I have some sync problems, but I blame them on my syncthing config problems that I had before. So thanks for your help!
no prob, glad it's working-ish
 

Silwanyx

Dabbler
Joined
Oct 18, 2014
Messages
19
Hi Joshua

Just to remaind you, it would be great if you could now add the new syncthing 0.12.2 (at this time) to standard installation of FreeNAS available plugin, because, it is not backward compatible with 0.11 or any other old versions, and it has great improvments on this Version, speed to, and Pausing Devices, and much more.

Here you have Infos about this new 0.12.x Version:

https://forum.syncthing.net/t/syncthing-v0-12-0-beryllium-bedbug/6026

Would great, if you can change the old 0.11.11 to the new one.

Thanks

Regards
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua

Just to remaind you, it would be great if you could now add the new syncthing 0.12.2 (at this time) to standard installation of FreeNAS available plugin, because, it is not backward compatible with 0.11 or any other old versions, and it has great improvments on this Version, speed to, and Pausing Devices, and much more.

Here you have Infos about this new 0.12.x Version:

https://forum.syncthing.net/t/syncthing-v0-12-0-beryllium-bedbug/6026

Would great, if you can change the old 0.11.11 to the new one.

Thanks

Regards
thanks, I'll take a look at this when I have some time. so 0.11 installs won't autoupdate to 0.12?
 

Silwanyx

Dabbler
Joined
Oct 18, 2014
Messages
19
Yes, it update, but, "must" manually update. It won't automaticaly update, but, it would be great for new users, or installations of FreeNAS, to have the newest one plugin.

The Trick is, that it has new protocol, and many other things, so it would be better to install from start up the new branch of Syncthing.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yes, it update, but, "must" manually update. It won't automaticaly update, but, it would be great for new users, or installations of FreeNAS, to have the newest one plugin.

The Trick is, that it has new protocol, and many other things, so it would be better to install from start up the new branch of Syncthing.
got it. I'll try getting this out this week
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@Silwanyx
Ok, this was alot more work then I thought updating the port and making sure autoupdating works. But I got it done and it'll be available tomorrow.
Hope I don't need to do that again for a bit
 

Gessi

Dabbler
Joined
Feb 1, 2016
Messages
35
Did anyone manage to get the self-signed SSL certificates to be replaced?

I am trying to understand which files in which directory need to be replaced but I am not really confident about this. The Synchting Doc speaks about a directory like "~/.config" etc. but this one does not exist in my FreeNAS plugin!?

Code:
# find / -iname "*.pem"
/etc/ssl/cert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert3.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert4.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nullbytecert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/selfsigned_pythontestdotnet.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert2.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nullcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert.passwd.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_key.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/sha256.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nokia.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/wrongcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/badkey.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/pycacert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_key.passwd.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_cert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/dh512.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/badcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/https_svn_python_org_root.pem
/usr/local/etc/ssl/cert.pem
/usr/local/openssl/cert.pem
/usr/local/lib/python2.7/test/ssl_key.passwd.pem
/usr/local/lib/python2.7/test/badcert.pem
/usr/local/lib/python2.7/test/keycert3.pem
/usr/local/lib/python2.7/test/keycert4.pem
/usr/local/lib/python2.7/test/selfsigned_pythontestdotnet.pem
/usr/local/lib/python2.7/test/sha256.pem
/usr/local/lib/python2.7/test/https_svn_python_org_root.pem
/usr/local/lib/python2.7/test/keycert2.pem
/usr/local/lib/python2.7/test/nullcert.pem
/usr/local/lib/python2.7/test/keycert.passwd.pem
/usr/local/lib/python2.7/test/ssl_key.pem
/usr/local/lib/python2.7/test/nokia.pem
/usr/local/lib/python2.7/test/nullbytecert.pem
/usr/local/lib/python2.7/test/badkey.pem
/usr/local/lib/python2.7/test/ssl_cert.pem
/usr/local/lib/python2.7/test/keycert.pem
/usr/local/lib/python2.7/test/wrongcert.pem
/usr/local/lib/python2.7/test/pycacert.pem
/usr/local/lib/python2.7/test/dh1024.pem
/var/db/syncthing/https-cert.pem
/var/db/syncthing/key.pem
/var/db/syncthing/cert.pem
/var/db/syncthing/https-key.pem
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Did anyone manage to get the self-signed SSL certificates to be replaced?

I am trying to understand which files in which directory need to be replaced but I am not really confident about this. The Synchting Doc speaks about a directory like "~/.config" etc. but this one does not exist in my FreeNAS plugin!?

Code:
# find / -iname "*.pem"
/etc/ssl/cert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert3.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert4.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nullbytecert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/selfsigned_pythontestdotnet.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert2.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nullcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/keycert.passwd.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_key.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/sha256.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/nokia.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/wrongcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/badkey.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/pycacert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_key.passwd.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/ssl_cert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/dh512.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/badcert.pem
/usr/pbi/syncthing-amd64/lib/python2.7/test/https_svn_python_org_root.pem
/usr/local/etc/ssl/cert.pem
/usr/local/openssl/cert.pem
/usr/local/lib/python2.7/test/ssl_key.passwd.pem
/usr/local/lib/python2.7/test/badcert.pem
/usr/local/lib/python2.7/test/keycert3.pem
/usr/local/lib/python2.7/test/keycert4.pem
/usr/local/lib/python2.7/test/selfsigned_pythontestdotnet.pem
/usr/local/lib/python2.7/test/sha256.pem
/usr/local/lib/python2.7/test/https_svn_python_org_root.pem
/usr/local/lib/python2.7/test/keycert2.pem
/usr/local/lib/python2.7/test/nullcert.pem
/usr/local/lib/python2.7/test/keycert.passwd.pem
/usr/local/lib/python2.7/test/ssl_key.pem
/usr/local/lib/python2.7/test/nokia.pem
/usr/local/lib/python2.7/test/nullbytecert.pem
/usr/local/lib/python2.7/test/badkey.pem
/usr/local/lib/python2.7/test/ssl_cert.pem
/usr/local/lib/python2.7/test/keycert.pem
/usr/local/lib/python2.7/test/wrongcert.pem
/usr/local/lib/python2.7/test/pycacert.pem
/usr/local/lib/python2.7/test/dh1024.pem
/var/db/syncthing/https-cert.pem
/var/db/syncthing/key.pem
/var/db/syncthing/cert.pem
/var/db/syncthing/https-key.pem
check in /var/db/syncthing
 

NYPD

Dabbler
Joined
Jan 9, 2014
Messages
10
By any chance anyone get syncthing 0.13.1 to work via auto update? I keep getting:
Code:
2016-05-18 18:43:40: upgrading: Get https://api.github.com/repos/syncthing/syncthing/releases/assets/1703094: dial tcp: lookup api.github.com on 192.168.0.1:53: read udp 192.168.0.103:34795->192.168.0.1:53: i/o timeout


Which is strange since the previous auto updates worked for me
 

NYPD

Dabbler
Joined
Jan 9, 2014
Messages
10
Nevermind now it is working. I get I was having wonky internet or something
 
Status
Not open for further replies.
Top