Syncthing problem with DNS-323 C1 using Alt F 1.0

229 views
Skip to first unread message

Sámuel Földi

unread,
Mar 13, 2020, 5:33:58 PM3/13/20
to Alt-F
Hi,
Finally i decided to get the new version of Alt F, as I use the Alt-F-0.1RC4.1 frimware currently. Before flashing it I tried the new frimware out using the TryIt button. After that I installed and upgraded the Syncthing package to version 1.3.4. the program worked well, untill I realized that the syncthing default folder was created in the /root folder, so after uploading a few files, I got the error message int the ssh terminal that there is not enough space on the device. I thought Syncthing started to fill up the flash memory with files but I am not sure about that. I checked the root directory on ftp and  found the .config/syncthing folder, but that does not contain any files. Howewer I am not able to delete or replace the folder. my problem is that I can not start syncthing via the webUI or SSH, a just get the message above:
[root@dns323]# syncthing
[monitor] 21:01:36 INFO: Starting syncthing
[NNZJ5] 21:01:37 INFO: syncthing v0.13.9 "Copper Cockroach" (go1.6.2 linux-arm) unknow...@lx-buildslave.syncthing.net 2016-06-26 13:40:51 UTC
[NNZJ5] 21:01:37 INFO: My ID: NNZJ5XG-7ISRJEJ-EYMAAJK-76ASECK-KDDGTT3-K76D3VN-YDO7G5A-35RO3AY
[NNZJ5] 21:01:37 INFO: Single thread hash performance is ~2.8 MB/s
[NNZJ5] 21:01:37 INFO: Error loading config file; using defaults for now
[NNZJ5] 21:01:37 INFO: Default folder created and/or linked to new config
[NNZJ5] 21:01:37 INFO: Defaults saved. Edit /root/.config/syncthing/config.xml to taste or use the GUI
[NNZJ5] 21:01:37 FATAL: Cannot open database: readdirent: input/output error - Is another copy of Syncthing already running?
[monitor] 21:01:37 INFO: Syncthing exited: exit status 1
i tried uninstall and then reinstall the package several times, but nothing changed. Actually, it seems that the setup can not create its own config.xml and database file in that folder. Now I am be afraid of doing anything(especially flashing) with this as it can probably causes problems at flashing the new frimware. Could somebody help with this problem? I would be grateful for that!

Thanks
Sam

Joao Cardoso

unread,
Mar 13, 2020, 11:18:47 PM3/13/20
to Alt-F


On Friday, March 13, 2020 at 9:33:58 PM UTC, Sámuel Földi wrote:
Hi,
Finally i decided to get the new version of Alt F, as I use the Alt-F-0.1RC4.1 frimware currently. Before flashing it I tried the new frimware out using the TryIt button. After that I installed and upgraded the Syncthing package

Using the webUI?
 
to version 1.3.4. the program worked well,

How did you start it? Using the webUI?
 
untill I realized that the syncthing default folder was created in the /root folder,

So you started if from the command line. You should use the webUI or, from the command line use the 'rcsyncthing start|stop|status|...' command, that is a shortcut to the script /etc/init.d/S81syncthing that sets everything needed to properly run the program.
Once some files exists, it is assumed that it was the user who knows what he is doing that created them and they will not be re-created.
 
As the pkg is installed on disk, newly created files are not removed when uninstalling or reinstalling the pkg. The configuration file is created the first time the program runs, so it is on disk.

so after uploading a few files, I got the error message int the ssh terminal that there is not enough space on the device. I thought Syncthing started to fill up the flash memory with files but I am not sure about that. I checked the root directory on ftp and  found the .config/syncthing folder, but that does not contain any files. Howewer I am not able to delete or replace the folder. my problem is that I can not start syncthing via the webUI or SSH, a just get the message above:
[root@dns323]# syncthing

NO! [deleted as I was not being kind]

When I don't know what a program does or what options it needs or accepts, I use to invoke it using the --help or -h options, or even given a stupid argument to it so it does not recognize it and prints some help, e.g. 'ls -foobar'

stop the program, uninstall the pkg, then use the command

rm -rf /var/lib/syncthing

reinstall the pkg, configure it using the webUI, Services->User,syncthing,Configure

That will create the user syncthing and its home folder at /var/lib/syncthing, and the group sync, run syncthing in a special mode in order to generate its configuration file at /var/lib/syncthing/config.xml, create its cryptographic keys, etc, etc.
 
Hope that you don't have a folder named 'root' under the /Alt-F folder. Please read /Alt-F/README.txt
 
[monitor] 21:01:36 INFO: Starting syncthing
[NNZJ5] 21:01:37 INFO: syncthing v0.13.9 "Copper Cockroach" (go1.6.2 linux-arm) unknown-user@lx-buildslave.syncthing.net 2016-06-26 13:40:51 UTC
[NNZJ5] 21:01:37 INFO: My ID: NNZJ5XG-7ISRJEJ-EYMAAJK-76ASECK-KDDGTT3-K76D3VN-YDO7G5A-35RO3AY
[NNZJ5] 21:01:37 INFO: Single thread hash performance is ~2.8 MB/s
[NNZJ5] 21:01:37 INFO: Error loading config file; using defaults for now
[NNZJ5] 21:01:37 INFO: Default folder created and/or linked to new config
[NNZJ5] 21:01:37 INFO: Defaults saved. Edit /root/.config/syncthing/config.xml to taste or use the GUI
 
[NNZJ5] 21:01:37 FATAL: Cannot open database: readdirent: input/output error - Is another copy of Syncthing already running?
[monitor] 21:01:37 INFO: Syncthing exited: exit status 1
i tried uninstall and then reinstall the package several times, but nothing changed. Actually, it seems that the setup can not create its own config.xml and database file in that folder. Now I am be afraid of doing anything(especially flashing) with this as it can probably causes problems at flashing the new frimware.

I don't foresee issues except if the folder /Alt-F/root exists, but it wise to solve problems and have a stable environment before flashing. 

Sámuel Földi

unread,
Mar 14, 2020, 8:34:33 AM3/14/20
to Alt-F


2020. március 14., szombat 4:18:47 UTC+1 időpontban Joao Cardoso a következőt írta:


On Friday, March 13, 2020 at 9:33:58 PM UTC, Sámuel Földi wrote:
Hi,
Finally i decided to get the new version of Alt F, as I use the Alt-F-0.1RC4.1 frimware currently. Before flashing it I tried the new frimware out using the TryIt button. After that I installed and upgraded the Syncthing package

Using the webUI?
I installed the package using the webUI, but I can not configure the program using the GUI on the Alt F platform as every time I hit the "Configure button" there was a login window saying "my connection to the website is not private"  and asking for a username&password.
 
to version 1.3.4. the program worked well,

How did you start it? Using the webUI?
As couldnt open the syncthing webui from browser within the Alt-F,  I folowed the instructions written int his post: "[Solved] Syncthing fails to connect to relays after upgrading to v1.1.0" . After updating the newest version (from command line using syncthing -upgrade), and changing the config.xml file in order to acces the GUI from browser, I was able to work with the syncthing GUI as well.
 
untill I realized that the syncthing default folder was created in the /root folder,

So you started if from the command line. You should use the webUI or, from the command line use the 'rcsyncthing start|stop|status|...' command, that is a shortcut to the script /etc/init.d/S81syncthing that sets everything needed to properly run the program.
Once some files exists, it is assumed that it was the user who knows what he is doing that created them and they will not be re-created.
 
As the pkg is installed on disk, newly created files are not removed when uninstalling or reinstalling the pkg. The configuration file is created the first time the program runs, so it is on disk.

so after uploading a few files, I got the error message int the ssh terminal that there is not enough space on the device. I thought Syncthing started to fill up the flash memory with files but I am not sure about that. I checked the root directory on ftp and  found the .config/syncthing folder, but that does not contain any files. Howewer I am not able to delete or replace the folder. my problem is that I can not start syncthing via the webUI or SSH, a just get the message above:
[root@dns323]# syncthing

NO! [deleted as I was not being kind]

When I don't know what a program does or what options it needs or accepts, I use to invoke it using the --help or -h options, or even given a stupid argument to it so it does not recognize it and prints some help, e.g. 'ls -foobar'

stop the program, uninstall the pkg, then use the command

rm -rf /var/lib/syncthing

reinstall the pkg, configure it using the webUI, Services->User,syncthing,Configure

That will create the user syncthing and its home folder at /var/lib/syncthing, and the group sync, run syncthing in a special mode in order to generate its configuration file at /var/lib/syncthing/config.xml, create its cryptographic keys, etc, etc.
 
Hope that you don't have a folder named 'root' under the /Alt-F folder. Please read /Alt-F/README.txt
 
[monitor] 21:01:36 INFO: Starting syncthing
[NNZJ5] 21:01:37 INFO: syncthing v0.13.9 "Copper Cockroach" (go1.6.2 linux-arm) unknow...@lx-buildslave.syncthing.net 2016-06-26 13:40:51 UTC
[NNZJ5] 21:01:37 INFO: My ID: NNZJ5XG-7ISRJEJ-EYMAAJK-76ASECK-KDDGTT3-K76D3VN-YDO7G5A-35RO3AY
[NNZJ5] 21:01:37 INFO: Single thread hash performance is ~2.8 MB/s
[NNZJ5] 21:01:37 INFO: Error loading config file; using defaults for now
[NNZJ5] 21:01:37 INFO: Default folder created and/or linked to new config
[NNZJ5] 21:01:37 INFO: Defaults saved. Edit /root/.config/syncthing/config.xml to taste or use the GUI
 
[NNZJ5] 21:01:37 FATAL: Cannot open database: readdirent: input/output error - Is another copy of Syncthing already running?
[monitor] 21:01:37 INFO: Syncthing exited: exit status 1
i tried uninstall and then reinstall the package several times, but nothing changed. Actually, it seems that the setup can not create its own config.xml and database file in that folder. Now I am be afraid of doing anything(especially flashing) with this as it can probably causes problems at flashing the new frimware.

I don't foresee issues except if the folder /Alt-F/root exists, but it wise to solve problems and have a stable environment before flashing. 
 
Could somebody help with this problem? I would be grateful for that!

Thanks
Sam
 I followed your instructions, Howewer I am a bit confused now because of the many syncthing files I found in the /root/.config/syncthing folder in the morning. Now i have the folllowing files in several folders : 


Jegyzet 2020-03-14 131808.png


Jegyzet 2020-03-14 131429.png

Jegyzet 2020-03-14 131624.png

Is this  normal? After uninstalling the pkg , running the command you wrote and reinstalling the pkg I still can not reach the GUI within the Alt-F after hitting the "Configure button"

Jegyzet 2020-03-14 132310.png

What I am thinking about is doing a "clean installation"(first deleting everything related to syncthing and then reinstall it properly), if it is possible. I know I am not a linux guru so I would like to ask for your advice about installing and configuring/upgrading syncthing properly.

Thanks a lot for your previous answer!! 

Best,

Sam




João Cardoso

unread,
Mar 14, 2020, 2:20:31 PM3/14/20
to Alt-F


On Saturday, 14 March 2020 12:34:33 UTC, Sámuel Földi wrote:


2020. március 14., szombat 4:18:47 UTC+1 időpontban Joao Cardoso a következőt írta:


On Friday, March 13, 2020 at 9:33:58 PM UTC, Sámuel Földi wrote:
Hi,
Finally i decided to get the new version of Alt F, as I use the Alt-F-0.1RC4.1 frimware currently. Before flashing it I tried the new frimware out using the TryIt button. After that I installed and upgraded the Syncthing package

Using the webUI?
I installed the package using the webUI, but I can not configure the program using the GUI on the Alt F platform as every time I hit the "Configure button" there was a login window saying "my connection to the website is not private"

You should not use https for the Alt-F webUI, as the syncthing webpage is http and mixing both is not allowed. When Alt-F tries to embed syncthing on it the conflict arises
 
  and asking for a username&password.

A username and password are only asked for syncthing *after* you set password on it. So either you have done that or syncthing is using a non-Alt-F generated configuration file (a leftover of your previous attempts).
 
 
to version 1.3.4. the program worked well,

How did you start it? Using the webUI?
As couldnt open the syncthing webui from browser within the Alt-F,  I folowed the instructions written int his post: "[Solved] Syncthing fails to connect to relays after upgrading to v1.1.0" . After updating the newest version (from command line using syncthing -upgrade), and changing the config.xml file in order to acces the GUI from browser, I was able to work with the syncthing GUI as well.

Well, if you are using someone else conflicting instructions... 

syncthing should be upgraded from its own webUI, not from the command line. You have to install first the Alt-F version, put it running, then upgrade it from within itself. If you use the command line to do whatever you have to give it arguments to tell where its configuration files are.
If syncthing is running started by the Alt-F webUI or the 'rcsyncthing start' command line, it is using /var/lib/syncthing for its configuration and data files, so /root/.config/syncthing is not used, and is the result of your previous attempts and can be removed (as well as everything under /root, that should be empty, and non-existing under /Alt-F, i.e, the folder '/Alt-F/root' *should not* exists).

The syncthing program itself is installed under /opt/syncthing
 
Now i have the folllowing files in several folders : 


Jegyzet 2020-03-14 131808.png

 
That's OK, that's syncthing home folder, used for its own data and configuration files


Jegyzet 2020-03-14 131429.png


How are you able to see what's inside /root using a UI browser? Using what program? That should not be possible!

 

Jegyzet 2020-03-14 131624.png

Is this  normal? After uninstalling the pkg , running the command you wrote and reinstalling the pkg I still can not reach the GUI within the Alt-F after hitting the "Configure button"

Jegyzet 2020-03-14 132310.png


http (syncthing by default uses that) within https (Alt-F webUI?) is not possible.

What I am thinking about is doing a "clean installation"

(first deleting everything related to syncthing and then reinstall it properly), if it is possible.


-verify that /Alt-F/root does not exists:
 -Packages->Alt-F, Packages Installed on section, notice where it is installed under the FS column, e.g., sda2 or md0
 -Setup->Folders and browse to that location, does a 'root' folder exists? if it exists, STOP
 
-Uninstall the syncthing package using the webUI, Packages->Alt-F. That will stop syncthing first (if launched by Alt-F!), remove the syncthing user and its installation folder, /opt/syncthing. Verify that it was indeed stopped using System->Utilities,View Logs, Running Processes. If it is listed as running, STOP.
-remove /var/lib/syncthing, the pkg uninstall will not touch that, as it might contain user data
-remove /root/* nothing has to be there, /root is in memory and must be empty -- but don't remove /root, if you do and then recreate it it will go to disk!

-use http to access Alt-F webUI
-install the syncthing pkg
-configure it  but don't set a password nor enable https. Mostly, do nothing

-after verifying that is is working, stop it and start it, and verify that it is still working
-upgrade it within its own webUI. That will stop if, perform the upgrade and eventually, can't remember, start it.
 

I know I am not a linux guru so I would like to ask for your advice about installing and configuring/upgrading syncthing properly.

Thanks a lot for your previous answer!! 

Best,


The main problem when following other people posts is to know if the environment and pre-conditions are the same, and frequently they are not. For example, do you have a folder called root within /Alt-F? Are you using https to access the Alt-F webUI? What program are you using to see the /root contents?
  

Sam




Sámuel Földi

unread,
Mar 15, 2020, 8:03:30 AM3/15/20
to Alt-F

Hi Joao!

2020. március 14., szombat 19:20:31 UTC+1 időpontban João Cardoso a következőt írta:


On Saturday, 14 March 2020 12:34:33 UTC, Sámuel Földi wrote:


2020. március 14., szombat 4:18:47 UTC+1 időpontban Joao Cardoso a következőt írta:


On Friday, March 13, 2020 at 9:33:58 PM UTC, Sámuel Földi wrote:
Hi,
Finally i decided to get the new version of Alt F, as I use the Alt-F-0.1RC4.1 frimware currently. Before flashing it I tried the new frimware out using the TryIt button. After that I installed and upgraded the Syncthing package

Using the webUI?
I installed the package using the webUI, but I can not configure the program using the GUI on the Alt F platform as every time I hit the "Configure button" there was a login window saying "my connection to the website is not private"

You should not use https for the Alt-F webUI, as the syncthing webpage is http and mixing both is not allowed. When Alt-F tries to embed syncthing on it the conflict arises

A far as I know I use http when I reach the Alt-F webUI. (I typed this http://192.168.1.77) Maybe something else is the problem here as I messed up a lot of things when installed the syncthing first. 
 
  and asking for a username&password.

A username and password are only asked for syncthing *after* you set password on it. So either you have done that or syncthing is using a non-Alt-F generated configuration file (a leftover of your previous attempts).

Yes it must to be the case 
 
 
to version 1.3.4. the program worked well,

How did you start it? Using the webUI?
As couldnt open the syncthing webui from browser within the Alt-F,  I folowed the instructions written int his post: "[Solved] Syncthing fails to connect to relays after upgrading to v1.1.0" . After updating the newest version (from command line using syncthing -upgrade), and changing the config.xml file in order to acces the GUI from browser, I was able to work with the syncthing GUI as well.

Well, if you are using someone else conflicting instructions... 

syncthing should be upgraded from its own webUI, not from the command line. You have to install first the Alt-F version, put it running, then upgrade it from within itself. If you use the command line to do whatever you have to give it arguments to tell where its configuration files are.
Yep, I did it wrong when I used the command line logged as root to perform the upgrade(syncthing -upgrade) and start the program (I just wrote syncthing to the command line) 
So if I have understood correctly I should delete all these files: 

Jegyzet 2020-03-15 122104.png

 

The syncthing program itself is installed under /opt/syncthing
 
Now i have the folllowing files in several folders : 


Jegyzet 2020-03-14 131808.png

 
That's OK, that's syncthing home folder, used for its own data and configuration files


Jegyzet 2020-03-14 131429.png


How are you able to see what's inside /root using a UI browser? Using what program? That should not be possible!
I use the program WinSCP to work with files on NAS, I login as root using my own Alt-F password. The screenshots were made with winSCP too. 

 

Jegyzet 2020-03-14 131624.png

Is this  normal? After uninstalling the pkg , running the command you wrote and reinstalling the pkg I still can not reach the GUI within the Alt-F after hitting the "Configure button"

Jegyzet 2020-03-14 132310.png


http (syncthing by default uses that) within https (Alt-F webUI?) is not possible.
I a bit confused about this as I am not sure which protocol the Alt-F webUI use, but I am quite sure it is http. 

What I am thinking about is doing a "clean installation"

(first deleting everything related to syncthing and then reinstall it properly), if it is possible.


-verify that /Alt-F/root does not exists:
 -Packages->Alt-F, Packages Installed on section, notice where it is installed under the FS column, e.g., sda2 or md0
In the Alt-F version 0.1RC4.1 I can not check what filesystem are the packages installed on. However I checked it using WinSCP. 
 -Setup->Folders and browse to that location, does a 'root' folder exists? if it exists, STOP
Sorry for not answering this question in my previous post(I have forgotten). As far as I see, there is no root folder under Alt-F

Jegyzet 2020-03-15 122606.png

 
 
-Uninstall the syncthing package using the webUI, Packages->Alt-F. That will stop syncthing first (if launched by Alt-F!), remove the syncthing user and its installation folder, /opt/syncthing. Verify that it was indeed stopped using System->Utilities,View Logs, Running Processes. If it is listed as running, STOP.
-remove /var/lib/syncthing, the pkg uninstall will not touch that, as it might contain user data
-remove /root/* nothing has to be there, /root is in memory and must be empty -- but don't remove /root, if you do and then recreate it it will go to disk!
I must not remove the /root folder itself, but I should remove the content of the folder, am I right? 

-use http to access Alt-F webUI
-install the syncthing pkg
-configure it  but don't set a password nor enable https. Mostly, do nothing

-after verifying that is is working, stop it and start it, and verify that it is still working
-upgrade it within its own webUI. That will stop if, perform the upgrade and eventually, can't remember, start it. 
 

I know I am not a linux guru so I would like to ask for your advice about installing and configuring/upgrading syncthing properly.

Thanks a lot for your previous answer!! 

Best,


The main problem when following other people posts is to know if the environment and pre-conditions are the same, and frequently they are not. For example, do you have a folder called root within /Alt-F(No have not)? Are you using https to access the Alt-F webUI?(I believe I am not.) What program are you using to see the /root contents? (WinSCP with root authority)
  

Sam

To summarize:
- verify that /Alt-F/root does not exist ----> done
-uninstall the syncthing pkg using the webUI-it removes /opt/syncthing
- check if the syncthing process is still running 
-remove /var/lib/syncthing
-remove all contents stored in the /root folder, but not the folder itself
Question: I should not remove any other file belonging to syncthing e.g.:/etc/init.d/S81syncthing,shouldn't I?
-istall syncthing pkg within the webUI (using http) and configure it using it's own GUI
-NOT use the command line to do anything
-upgrade syncthing using its own GUI

I am very appreciating your help!. I hope it  will finally work  well. I only want to ask now, whether  my Summary is correct or not. 
 
A really BIG THANKS 

Best,
Sam

João Cardoso

unread,
Mar 15, 2020, 3:56:40 PM3/15/20
to Alt-F
OK
 
Are you using https to access the Alt-F webUI?(I believe I am not.)

OK. You are using http://<your-box>. But latter syncthing releases might enforce https, and a http (Alt-F webUI)  and https (other app embedded in the Alt-F webUI) page can't coexist in the same browser tab. That's a https rule, no mixing.

You can use https with Alt-F, just use https://<your-box> instead, but you will receive a browser warning that the connection is not secure. And again, if another app webui is http it can't be embedded in the Alt-F https webUI. So, there is not a right solution for that.
 
What program are you using to see the /root contents? (WinSCP with root authority)

OK.
 
  

Sam

To summarize:
- verify that /Alt-F/root does not exist ----> done
-uninstall the syncthing pkg using the webUI-it removes /opt/syncthing
- check if the syncthing process is still running 
-remove /var/lib/syncthing
-remove all contents stored in the /root folder, but not the folder itself

Yes, but I don't know what the Sync folder content is(*), I can't tell you to delete it.
Probably it is the folder that syncthing used to sync data from other syncthing clients, you can examine it and decide yourself.
I don't work with syncthing, but my understanding is that what you do in one client propagates to the others, so, if it is running on the box and communicating with other sibling clients and you remove data files under it control, that data will be removed on the other clients also. Right?
 
Question: I should not remove any other file belonging to syncthing e.g.:/etc/init.d/S81syncthing,shouldn't I?
You can, but the pkg uninstall should remove it.
 
-istall syncthing pkg within the webUI (using http) and configure it using it's own GUI

minimal configuration. Certainly not set https nor passwords. Probably it can't communicate with other sibling clients, as it looks like the protocol has changed.
If you can't "embed" syncthing within Alt-F, you can open anther browser tab and use http://<your-boz>:8088
Notice that the first time it is run it can take some one or two minutes to generate SSL cryptographic keys.
I'm giving all those recommendations, but I'm not a syncthing user, I'm just recollecting my experience when I used it, along with general Alt-F experience.

-NOT use the command line to do anything

Absolutely not! I mean, yes, you can use the command line, but you have to know what you are doing, you are like a dictator, you can murder however you want and nobody will  question your commands.

As a matter of fact, starting it the first time from the command line will display messages that otherwise might be lost in the webUI. Always using the initscript, such as

rcsyncthing start
rcsyncthing stop
rcsyncthing status
rcsyncthing enable # boot enable it
rcsyncthing disable # boot disable it

Examining its logs might also give you hints, cat /var/log/syncthing/syncthing.log

The most important thing to remember is that syncthing (as well as other daemon processes) runs a user called syncthing, which doesn't has root privileges; and as a group called sync; and its configuration file must be passed also as an argument. That is the meaning in the rcsyncthing script of the SYNCTHING_ARGS variable

-home=$SYNCTHING_HOME" (which expands to -home=/var/lib/syncthing, which is on disk, not memory)

and the '--chuid $RC_USER:$RC_GROUP' that expands to means "start running as user syncthing and group sync"

If instead you want t run syncthing as a normal user, when you are not login in as the root user, you can, most windows and even linux users do that; in that case it will look for a .config/syncthing... in your home folder, or create one. But you have to create the user first, using the webUI, and its home folder will be resident on disk.

-upgrade syncthing using its own GUI 

Ĩ can't guarantee that it will work, but I remember discussing that some time ago with other user and concluded that there was no need to release anther Alt-F package.
 

I am very appreciating your help!. I hope it  will finally work  well. I only want to ask now, whether  my Summary is correct or not. 

Yes.

BTW, your screen shots are very small, I barely can read them even zooming to 200%
Reply all
Reply to author
Forward
0 new messages