[FreeNAS 9 Plugin] - Syncthing

Status
Not open for further replies.

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
Thanks for making the plugin a reality - I have it installed and configured. Now just need to set it up on my remote machine as well.
 

kaseg

Dabbler
Joined
Feb 23, 2015
Messages
15
I just installed syncthing, and the plugin doesn't want to start -- when I click the service status toggle it has a progress bar, but fails to turn on after a minute or so.

The jail is running, and I added storage to it. I logged into the shell for the jail and edited the config to use the shared storage mount for the default folder. Syncthing is running in the jail, and it creates a .stfolder file in the mounted storage. I dont see any log files in /var/db/syncthing and nothing relevant seems to be in /var/log. Running 'service syncthing restart' doesnt show any problems.

I'm new to FreeNAS, is there somewhere else I might be able to find a relevant logfile?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I just installed syncthing, and the plugin doesn't want to start -- when I click the service status toggle it has a progress bar, but fails to turn on after a minute or so.

The jail is running, and I added storage to it. I logged into the shell for the jail and edited the config to use the shared storage mount for the default folder. Syncthing is running in the jail, and it creates a .stfolder file in the mounted storage. I dont see any log files in /var/db/syncthing and nothing relevant seems to be in /var/log. Running 'service syncthing restart' doesnt show any problems.

I'm new to FreeNAS, is there somewhere else I might be able to find a relevant logfile?
what your trying seems to be correct.

can you try running 'service syncthing status' to check if the process is running.
also can you ping the ST jail?
 

kaseg

Dabbler
Joined
Feb 23, 2015
Messages
15
what your trying seems to be correct.

can you try running 'service syncthing status' to check if the process is running.
also can you ping the ST jail?

I fixed this. I had changed the IP on the jail, and I thought I restarted the jail, but the original IP was still there when I checked. FreeNAS must have been trying to access it via the new IP, while it was actually running at its original (default) IP. Thanks for the thought.
 

fmdx

Explorer
Joined
Jan 24, 2015
Messages
50
I've been getting this error pretty much non-stop, my files will sync for awhile, then poof I will get flooded with errors:

"23:52:04: Folder "Personal" isn't making progress - check logs for possible root cause. Pausing puller for 1m0s."

Where are these logs stored?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've been getting this error pretty much non-stop, my files will sync for awhile, then poof I will get flooded with errors:

"23:52:04: Folder "Personal" isn't making progress - check logs for possible root cause. Pausing puller for 1m0s."

Where are these logs stored?
I'm guessing in /var/db/syncthing
 

fmdx

Explorer
Joined
Jan 24, 2015
Messages
50
ls of the syncthing directory:
Code:
root@syncthing_1:/var/db/syncthing # ls
cert.pem
config.xml.v7
https-cert.pem
index
config.xml
csrftokens.txt
https-key.pem
key.pem


In the index folder I have these files:
Code:
034242.ldb      110395.ldb      111657.ldb      115722.ldb      115751.ldb
034243.ldb      110396.ldb      111658.ldb      115725.ldb      115752.ldb
038855.ldb      110397.ldb      111659.ldb      115726.ldb      115753.ldb
102343.ldb      110398.ldb      111660.ldb      115727.ldb      115756.ldb
102344.ldb      110399.ldb      111661.ldb      115730.ldb      115758.ldb
102345.ldb      110400.ldb      115285.ldb      115731.ldb      115759.ldb
102346.ldb      110401.ldb      115286.ldb      115732.ldb      115760.ldb
102347.ldb      110402.ldb      115708.ldb      115736.ldb      115761.ldb
102348.ldb      111011.ldb      115711.ldb      115737.ldb      CURRENT
102349.ldb      111012.ldb      115712.ldb      115738.ldb      LOCK
102350.ldb      111652.ldb      115715.ldb      115739.ldb      LOG
102351.ldb      111653.ldb      115716.ldb      115742.ldb      LOG.old
102352.ldb      111654.ldb      115717.ldb      115747.log      MANIFEST-115672
109766.ldb      111655.ldb      115720.ldb      115749.ldb
109857.ldb      111656.ldb      115721.ldb      115750.ldb


I've tried opening up those log files but to no avail :\
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Code:
root@syncthing_1:/var/db/syncthing # ls
cert.pem
config.xml.v7
https-cert.pem
index
config.xml
csrftokens.txt
https-key.pem
key.pem


In the index folder I have these files:
Code:
034242.ldb      110395.ldb      111657.ldb      115722.ldb      115751.ldb
034243.ldb      110396.ldb      111658.ldb      115725.ldb      115752.ldb
038855.ldb      110397.ldb      111659.ldb      115726.ldb      115753.ldb
102343.ldb      110398.ldb      111660.ldb      115727.ldb      115756.ldb
102344.ldb      110399.ldb      111661.ldb      115730.ldb      115758.ldb
102345.ldb      110400.ldb      115285.ldb      115731.ldb      115759.ldb
102346.ldb      110401.ldb      115286.ldb      115732.ldb      115760.ldb
102347.ldb      110402.ldb      115708.ldb      115736.ldb      115761.ldb
102348.ldb      111011.ldb      115711.ldb      115737.ldb      CURRENT
102349.ldb      111012.ldb      115712.ldb      115738.ldb      LOCK
102350.ldb      111652.ldb      115715.ldb      115739.ldb      LOG
102351.ldb      111653.ldb      115716.ldb      115742.ldb      LOG.old
102352.ldb      111654.ldb      115717.ldb      115747.log      MANIFEST-115672
109766.ldb      111655.ldb      115720.ldb      115749.ldb
109857.ldb      111656.ldb      115721.ldb      115750.ldb
Maybe the "LOG" file/folder?
 

fmdx

Explorer
Joined
Jan 24, 2015
Messages
50
The LOG/LOG.old/CURRENT/LOCK/MANIFEST entries are not folders, and I'm not exactly sure how to open them.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The LOG/LOG.old/CURRENT/LOCK/MANIFEST entries are not folders, and I'm not exactly sure how to open them.
I'd check the syncthing forums. I don't know much about this program.
 

fmdx

Explorer
Joined
Jan 24, 2015
Messages
50
I've seen it mentioned several times that the logs are in the STDout folder, but I'm not finding it. Hence why I thought I would post here :P

I've also bumped a forum post about a feature request to put a link or the locations of the log files somewhere so that people using the GUI can access them :S
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I've seen it mentioned several times that the logs are in the STDout folder, but I'm not finding it. Hence why I thought I would post here :p

I've also bumped a forum post about a feature request to put a link or the locations of the log files somewhere so that people using the GUI can access them :S
hmm, I think what they mean is syncthing doesn't actually log to a file. It just logs to the console that started it using STDout. We are starting syncthing using freebsd's daemon(8) utility and telling it to discard STDout & STDerr.

You could change how syncthing is started and make it log to a file by editing /usr/local/etc/rc.d/syncthing
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
Can anyone share a link on how to install syncthing into an existing jail?
I'm trying to put all my plugins into one jail.
 

Joshua Parker Ruehlig

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

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
damn, I suspected this. I'm a bit OCD, I NEED to name my jails personally and precisely but one can only do that with manually created ones and one can only create a plugin jail via the GUI when installing a plugin and those cannot be renamed (apparently) :-(
Ok, I guess I have to do it their way and crunch my teeth ever day when I see jail names like syncthing_1

Thanks for pointing me to the old doc. I knew there used to be an "upload" button but couldn't find it with my manually created jails (standard jail and virtualbox jail)
 

Dan Sherman

Cadet
Joined
Apr 28, 2014
Messages
5
You could change how syncthing is started and make it log to a file by editing /usr/local/etc/rc.d/syncthing

In the /usr/local/etc/rc.d/syncthing script I changed
Code:
command_args="-f -p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_args}"


to

Code:
command_args="-p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_args} > /tmp/syncthing.log 2>&1"


Now I can check the log output in /tmp/syncthing.log if syncthing has problems.
 

Norskie

Cadet
Joined
Aug 28, 2014
Messages
2
In the /usr/local/etc/rc.d/syncthing script I changed
Code:
command_args="-f -p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_args}"


to

Code:
command_args="-p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_args} > /tmp/syncthing.log 2>&1"


Now I can check the log output in /tmp/syncthing.log if syncthing has problems.

I did this, started/stopped syncthing, it creates the log, but then .... the log remains empty despite the gui telling me "check logs for possible root cause".

Ideas?
 

kknas

Cadet
Joined
Feb 12, 2015
Messages
8
I did this, started/stopped syncthing, it creates the log, but then .... the log remains empty despite the gui telling me "check logs for possible root cause".

Ideas?

If you created the log file manually, there could be a permission problem. My log file was created by syncthing and the permissions look like this (from within the jail):
root@syncthing_1:/ # ls -la /tmp/syncthing.log
-rw-r--r-- 1 syncthing wheel 2634 Apr 24 20:15 /tmp/syncthing.log


BTW: Thanks, @Dan Sherman, for the hint. I was wondering how I can get syncthing to log for quite some time, and your solution works fine.
 
Status
Not open for further replies.
Top