Skip to content

"Lockfile doesn't exist" error on new install #10126

Closed

Description

@Saiyaken-PHOENIX

What happened?

We've done a new install using Arch Linux with XFCE, with attempts on using all three packages (syncthing, syncthing-gtk, syncthingtray). Every one would fail, with one of them giving us a cryptic "system exited too fast" error. (in

This Image

In log output, Page 1)

We were going on about this for hours, later figuring out with syncthing alone, that it had something to do with the systemd service. (In log output, Page 2)

Creating a blank lockfile that the systemd service is complaining about fixes the issue.

We have not tested if a brand new install can replicate this.

Syncthing version

1.29.6-2

Platform & operating system

Linux x86/64

Browser version

No response

Relevant log output

###PAGE 1###

[cinnamon@green-machine ~]$ sudo systemctl status [email protected]
× [email protected] - Syncthing - Open Source Continuous File Synchronization for cinnamon
     Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2025-05-24 20:49:45 EDT; 3s ago
   Duration: 47ms
 Invocation: d5d60cae045440769f6a8602b1397bb4
       Docs: man:syncthing(1)
    Process: 46303 ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0 (code=exited, status=1/FAILURE)
   Main PID: 46303 (code=exited, status=1/FAILURE)

May 24 20:49:45 green-machine systemd[1]: [email protected]: Scheduled restart job, restart counter is at 4.
May 24 20:49:45 green-machine systemd[1]: [email protected]: Start request repeated too quickly.
May 24 20:49:45 green-machine systemd[1]: [email protected]: Failed with result 'exit-code'.
May 24 20:49:45 green-machine systemd[1]: Failed to start Syncthing - Open Source Continuous File Synchronization for cinnamon.


###END PAGE 1###

###PAGE 2###

[cinnamon@green-machine ~]$ syncthing
[start] 2025/05/24 21:35:46 INFO: syncthing v1.29.6 "Gold Grasshopper" (go1.24.3 linux-amd64) syncthing@archlinux 2025-05-15 09:30:00 UTC [noupgrade]
[start] 2025/05/24 21:35:46 WARNING: Failed to acquire lock: open /home/cinnamon/.local/state/syncthing/syncthing.lock: no such file or directory
[monitor] 2025/05/24 21:35:46 INFO: Syncthing exited: exit status 1
[start] 2025/05/24 21:35:47 INFO: syncthing v1.29.6 "Gold Grasshopper" (go1.24.3 linux-amd64) syncthing@archlinux 2025-05-15 09:30:00 UTC [noupgrade]
[start] 2025/05/24 21:35:47 WARNING: Failed to acquire lock: open /home/cinnamon/.local/state/syncthing/syncthing.lock: no such file or directory
[monitor] 2025/05/24 21:35:47 INFO: Syncthing exited: exit status 1
[start] 2025/05/24 21:35:48 INFO: syncthing v1.29.6 "Gold Grasshopper" (go1.24.3 linux-amd64) syncthing@archlinux 2025-05-15 09:30:00 UTC [noupgrade]
[start] 2025/05/24 21:35:48 WARNING: Failed to acquire lock: open /home/cinnamon/.local/state/syncthing/syncthing.lock: no such file or directory
[monitor] 2025/05/24 21:35:48 INFO: Syncthing exited: exit status 1
[start] 2025/05/24 21:35:49 INFO: syncthing v1.29.6 "Gold Grasshopper" (go1.24.3 linux-amd64) syncthing@archlinux 2025-05-15 09:30:00 UTC [noupgrade]
[start] 2025/05/24 21:35:49 WARNING: Failed to acquire lock: open /home/cinnamon/.local/state/syncthing/syncthing.lock: no such file or directory
[monitor] 2025/05/24 21:35:49 INFO: Syncthing exited: exit status 1
[monitor] 2025/05/24 21:35:50 WARNING: 4 restarts in 4.063240369s; not retrying further

###END OF PAGE 2###

Activity

  1. added
    bug
    needs-triage
    on May 25, 2025
  2. marbens-arch commented on May 25, 2025

    @marbens-arch
    Member

    This looks more like a support request than a clear bug or feature request. Please use the forum - https://forum.syncthing.net/ - for support, first by searching for any similar issues and then by posting a new one when required. The forum has a lot more eyes and friendly people on it than the issue tracker.

    Thanks!

  3. reopened this on May 25, 2025
  4. calmh commented on May 25, 2025

    @calmh
    Member

    Nah this is a actually a legit bug. The lock file is in the database directory, which may not be created yet if it's not the same as the config directory; I can reproduce. I suspect Arch sets the env vars to trigger xdg fundamentalist mode with separation of config and database dirs by default.

    testuser@unu:~$ syncthing serve --data ~/.local/foo/bar --config ~/.local/baz/quux
    [start] 2025/05/25 05:51:42 INFO: syncthing v2.0.0-rc.16 "Hafnium Hornet" (go1.24.2 linux-amd64) [email protected] 2025-05-20 12:34:20 UTC [noupgrade]
    [start] 2025/05/25 05:51:42 INFO: Generating ECDSA key and certificate for syncthing...
    [start] 2025/05/25 05:51:42 WARNING: Failed to acquire lock: open /home/testuser/.local/foo/bar/syncthing.lock: no such file or directory
    [monitor] 2025/05/25 05:51:42 INFO: Syncthing exited: exit status 1
    ^C[monitor] 2025/05/25 05:51:43 INFO: Signal 2 received; exiting
    
  5. removed
    needs-triage
    on May 25, 2025
  6. added a commit that references this issue on May 25, 2025
    64b5a1b
  7. changed the title [-]Weird "Lockfile doesn't exist" Error on New Install Preventing Service From Starting[/-] [+]"Lockfile doesn't exist" error on new install[/+] on May 25, 2025
  8. added 2 commits that reference this issue on May 25, 2025
    39d6692
    59a84b4
  9. added a commit that references this issue on Jun 8, 2025
    8b3462a
  10. Pugglewuggle commented on Jul 31, 2025

    @Pugglewuggle

    This happens on Debian as well with a fresh install of syncthing from the Debian apt repositories (version 1.29.5)

  11. bt90 commented on Jul 31, 2025

    @bt90
    Contributor

    Sure, because the fix is shipped with v1.29.7 and the Debian version is lagging behind.

    Add https://apt.syncthing.net to your sources if you need a recent version.

  12. Pugglewuggle commented on Jul 31, 2025

    @Pugglewuggle

    @bt90 Well, that is good to know. Thanks!

  13. added
    frozen-due-to-age
    on Jul 1, 2026
  14. locked and limited conversation to collaborators on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions