Can't start Syncthing Linux Mint

unable to start Syncthing daemon. Here’s what the log file says:

[monitor] 07:48:59 INFO: Log output saved to file “/home/joseph/.config/syncthing/syncthing.log”

[start] 07:48:59 INFO: syncthing v1.18.0-ds1 “Fermium Flea”

(go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC

[start] 07:48:59 WARNING: Failed to initialize config: config file version (37) is newer than supported version (35). If this is expected, use -allow-newer-config to override.

[monitor] 07:48:59 INFO: Syncthing exited: exit status 1

[start] 07:49:00 INFO: syncthing v1.18.0-ds1 “Fermium Flea”

(go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC [start] 07:49:00 WARNING: Failed to initialize config: config file version (37) is newer than supported version (35). If this is expected, use -allow-newer-config to override.

[monitor] 07:49:00 INFO: Syncthing exited: exit status 1

[start] 07:49:01 INFO: syncthing v1.18.0-ds1 “Fermium Flea”

(go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC

[start] 07:49:01 WARNING: Failed to initialize config: config file version (37) is newer than supported version (35). If this is expected, use -allow-newer-config to override.

[monitor] 07:49:01 INFO: Syncthing exited: exit status 1

[start] 07:49:02 INFO: syncthing v1.18.0-ds1 “Fermium Flea”

(go1.18.1 linux-amd64) debian@debian 2023-05-03 08:38:45 UTC [start] 07:49:02 WARNING: Failed to initialize config: config file version (37) is newer than supported version (35). If this is expected, use -allow-newer-config to override.

[monitor] 07:49:02 INFO: Syncthing exited: exit status 1

[monitor] 07:49:03 WARNING: 4 restarts in 4.043699907s; not retrying further

Any help much appreciated thank you!

You have a config from a newer version of Syncthing than the (very old) one you’re trying to run. You should probably source a newer Syncthing. This is a good place: https://apt.syncthing.net/

I just followed your link and typed all those possible troubleshooting things into the Terminal and then tried to do it from the command line as it says at the end. Here’s what I got: Reading package lists… Done Building dependency tree… Done Reading state information… Done syncthing is already the newest version (1.18.0~ds1-3ubuntu0.2). The following packages were automatically installed and are no longer required: at linux-headers-5.15.0-100 linux-headers-5.15.0-100-generic linux-headers-5.15.0-101 linux-headers-5.15.0-101-generic linux-headers-5.15.0-92 linux-headers-5.15.0-92-generic linux-headers-5.15.0-94 linux-headers-5.15.0-94-generic linux-headers-5.15.0-97 linux-headers-5.15.0-97-generic linux-image-5.15.0-100-generic linux-image-5.15.0-101-generic linux-image-5.15.0-92-generic linux-image-5.15.0-94-generic linux-image-5.15.0-97-generic linux-modules-5.15.0-100-generic linux-modules-5.15.0-101-generic linux-modules-5.15.0-92-generic linux-modules-5.15.0-94-generic linux-modules-5.15.0-97-generic linux-modules-extra-5.15.0-100-generic linux-modules-extra-5.15.0-101-generic linux-modules-extra-5.15.0-92-generic linux-modules-extra-5.15.0-94-generic linux-modules-extra-5.15.0-97-generic Use ‘sudo apt autoremove’ to remove them. 0 upgraded, 0 newly installed, 0 to remove and 63 not upgraded.

If Linux Mint is convinced that 1.18 is the latest version, does it then fall to me to unzip a tar file? I’m always bad at figuring out how to do that. But the tar file is 1.27, I just look at the file like a monkey at the obelisk in 2001 a Space Odyssey.

There are two issues:

  • Syncthing 1.18.0 package from Ubuntu’s repository is still installed.
  • Need to set a priority so that the package from Syncthing’s APT repo is chosen first.

It’s noted on the same apt.syncthing.net webpage, but since you already have an existing installation, it’s also best to tidy up first. Issue the following four commands:

printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing.pref
sudo apt purge syncthing
sudo apt update
sudo apt install syncthing

Since it’s generally not a good idea to copy, paste, and run commands found on the internet before knowing at least a little about what they do…

  • 1st command sets the preferred priority by creating a preferences file (/etc/apt/preferences.d/syncthing.pref).
  • 2nd command purges the existing Syncthing package and any related system files (but doesn’t touch your existing config at /home/joseph/.config/syncthing).
  • 3rd command updates the APT package catalog.
  • 4th command installs the latest Syncthing package per the preferred priority.

(On a side note, how did you end up with a newer Syncthing config version on a system with an older version of Syncthing?)

To answer your last question, the Syncthing GUI wasn’t working on my previous installation of Syncthing so I thought I cleaned house and installed a new version, which led me to where we’re at right now. Of course, “cleaning house” means none of it works now and it’s where you see that log file. I’d like to give you an update as to what it said after putting in those Terminal commands, because I think it’s still insisting on 1.18, but I’ll let you officially say if that’s true or not (this is from after “sudo apt install syncthing”

sudo apt install syncthing Reading package lists… Done Building dependency tree… Done Reading state information… Done The following packages were automatically installed and are no longer required: at linux-headers-5.15.0-100 linux-headers-5.15.0-100-generic linux-headers-5.15.0-101 linux-headers-5.15.0-101-generic linux-headers-5.15.0-92 linux-headers-5.15.0-92-generic linux-headers-5.15.0-94 linux-headers-5.15.0-94-generic linux-headers-5.15.0-97 linux-headers-5.15.0-97-generic linux-image-5.15.0-100-generic linux-image-5.15.0-101-generic linux-image-5.15.0-92-generic linux-image-5.15.0-94-generic linux-image-5.15.0-97-generic linux-modules-5.15.0-100-generic linux-modules-5.15.0-101-generic linux-modules-5.15.0-92-generic linux-modules-5.15.0-94-generic linux-modules-5.15.0-97-generic linux-modules-extra-5.15.0-100-generic linux-modules-extra-5.15.0-101-generic linux-modules-extra-5.15.0-92-generic linux-modules-extra-5.15.0-94-generic linux-modules-extra-5.15.0-97-generic Use ‘sudo apt autoremove’ to remove them. The following NEW packages will be installed: syncthing 0 upgraded, 1 newly installed, 0 to remove and 70 not upgraded. Need to get 0 B/7,117 kB of archives. After this operation, 18.5 MB of additional disk space will be used. Selecting previously unselected package syncthing. (Reading database … 842376 files and directories currently installed.) Preparing to unpack …/syncthing_1.18.0~ds1-3ubuntu0.2_amd64.deb … Unpacking syncthing (1.18.0~ds1-3ubuntu0.2) … Setting up syncthing (1.18.0~ds1-3ubuntu0.2) … Created symlink /etc/systemd/system/sleep.target.wants/syncthing-resume.service → /lib/systemd/system/syncthing-resume.service. Processing triggers for desktop-file-utils (0.26+mint3+victoria) … Processing triggers for hicolor-icon-theme (0.17-2) … Processing triggers for ufw (0.36.1-4ubuntu0.1) … Rules updated for profile ‘syncthing-gui’ Firewall reloaded Processing triggers for man-db (2.10.2-1) … Processing triggers for mailcap (3.70+nmu1ubuntu1) …

According to the apt output, it doesn’t look like you’ve added Syncthing’s repo to your system.

Output a list of the available Syncthing packages…

apt -a list syncthing

(Linux tip: sudo isn’t required for many APT actions, so that’s why I left it out of the command above.)

Also, does this return an error…

cat /etc/apt/sources.list.d/syncthing.list

Should really issue the command sudo apt autoremove to remove those unneeded packages for a more streamlined output.

And when pasting preformatted console/terminal output into a post, it’s always best to bracket it with the preformatted text tag to improve readability: preformatted_toolbar_icon

Ok great gonna do all of that. First order of business, when I put in apt -a list syncthing into terminal, I get a definition of what the “apt” command does. So before I can give you that information of the available Syncthing packages, do let me know what I screwed up with that step.

Double-check the syntax of what you entered into the terminal.

I’ve used the command thousands of times over the years, so unless Mint decided to ship a twisted version of apt, it’ll work verbatim as written.

If it still responds with the same result, post a screenshot of the terminal window.

Best guess is that there was a typo, or if you copy and pasted from the forum webpage, an extraneous character was included.

Alright I’m sending you a screenshot since I’m pretty sure I typed it in right. Here it is!

Apparently mint invented their own apt variant. Looks like the real apt is in /usr/bin/apt so maybe invoke that directly.

When you say “invoke that directly” does that mean I open up an instance of Terminal IN /usr/bin/apt and in that instance, type apt -a list syncthing? I do know how to get to that file directory. Then the buck stops.

In Linux, it doesn’t matter what your “current working directory” is, it will always find the same executable.

Enter this instead:

/usr/bin/apt -a list syncthing
2 Likes

Alright so doing that I got this:

joseph@joseph-HP-ProDesk-600-G1-SFF:~$ /usr/bin/apt -a list syncthing
Listing... Done
syncthing/jammy-updates,jammy-security,now 1.18.0~ds1-3ubuntu0.2 amd64 [installed]
syncthing/jammy 1.18.0~ds1-3 amd64

Next order of business was entering that cat command, here’s what that did:

I will try to do that sudo apt autoremove to remove those unneeded packages right now, and I think that fully answers gadget’s question from 2 days ago.

joseph@joseph-HP-ProDesk-600-G1-SFF:~$ cat /etc/apt/sources.list.d/syncthing.list
cat: /etc/apt/sources.list.d/syncthing.list: No such file or directory

You do not appear to have added the Syncthing APT repo successfully. You didn’t show what happened when you tried, way above, so we don’t know why.

Got it. So when you say I didn’t show what happened when I tried, could you break that down for me when you get a chance? Just baby steps what I got to type into Terminal and I’ll screenshot it for extra clarity if that helps.

apt.syncthing.net has commands to add the keys, source, etc. Show what happens when you follow the instructions there.

1 Like

Alright I did it. When I started to get the carrots instead of prompt, I’m pretty sure I screwed up some way but I’m also pretty sure somebody knows what I messed up. Thanks in advance. Screenshot at 2024-06-03 07-57-28

The carrots appear because you have an opening quote (") that isn’t properly closed. But the commands you typed definetly don’t match what’s written on https://apt.syncthing.net/. It appears like a wild mix of what’s written there (i.e. I see the sudo tee pipe in there, but the preceding command is the curl and not the echo command.

Have you manually typed this in or copy-pasted it? What we would generally suggest is to copy-paste the commands line-by-line and press enter after each line has been pasted. You can paste into most terminals using either right click or middle click (the scroll wheel) on your mouse.

The reason for the greater than sign (different from a caret: ^) is the mismatched double-quotes:

terminal

The shell is expecting an even number of quotes, so it’s allowing you to continue across multiple lines of input.

But, fixing the quotes will result in a different problem. While copying and pasting, you co-mingled two different steps – downloading Syncthing’s GnuPG public key and updating the APT repository list.

Please refer to the apt.syncthing.net again for the proper steps and syntax for each step.