Syncthing plugin - starting with STTRACE environment variable

  • Trying to debug a connection issue between devices running Syncthing.


    What would be the recommended way of starting Syncthing on OMV, and passing it the debugging environment variable STTRACE=connections ?

    • Offizieller Beitrag

    Maybe create a systemd override file to specify the strace stuff? Never had an issue with connections as long as settings were right and firewalls were not in the way.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    That isn't an override file. An override file would be in /etc/systemd/system/syncthing.service.d. Did you try reading this wiki - https://docs.syncthing.net/dev/debugging.html

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • i did read the syncthing debugging FAQ,
    the only useful tidbit in there is :



    Code
    Under Unix (including Mac) the easiest way to run Syncthing with an environment variable set is to prepend the variable to the command line. I.e:
    
    
    $ STTRACE=model syncthing


    no mention of systemd override files.



    Code
    root@backup-nas:/etc/systemd/system# ls -lha /etc/systemd/system/syncthing.service.d
    ls: cannot access /etc/systemd/system/syncthing.service.d: No such file or directory
    root@backup-nas:/etc/systemd/system#


    There is no /etc/systemd/system/syncthing.service.d directory on the OMV installation ?

  • after some further reading :


    # systemctl edit syncthing@admin


    is supposed to create the directory "/etc/systemd/system/syncthing.service.d"


    which would contain an override file.


    Unfortunately :
    root@backup-nas:/etc/systemd/system# systemctl edit syncthing@admin
    Unknown operation 'edit'
    root@backup-nas:/etc/systemd/system# systemd --version
    systemd 215


    The systemctl edit functionality was only added in Systemd 218.


    Any further help would be much appreciated.

    • Offizieller Beitrag

    no mention of systemd override files.

    This was my idea. I had no idea if it would work or not and I didn't read the wiki. I don't even use syncthing. I was just trying to throw ideas out there since no one else was responding.


    There is no /etc/systemd/system/syncthing.service.d directory on the OMV installation ?

    No because the plugin doesn't create an override file. It doesn't need to exist unless there is an override file.

    is supposed to create the directory "/etc/systemd/system/syncthing.service.d"

    Just create the directory yourself - mkdir -p /etc/systemd/system/syncthing.service.d

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • root@backup-nas:/etc/systemd/system/syncthing.service.d# cat override.conf
    [Service]
    Environment=STTRACE=connections


    followed by


    # systemctl daemon-reload
    and
    # systemctl restart syncthing@admin


    Still no extra info in the log.


    also :
    # systemd-delta
    0 overridden configuration files found.

    • Offizieller Beitrag

    I guess the syncthing forum would be able to give better help.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • setting the environment variable in Windows enables debugging perfectly, as it does in other linux distributions
    C:\> set STTRACE=model


    I'm just not finding the correct way to set the variable in this distro


    Setting the environment variable in /lib/systemd/system/syncthing@.service works just fine, but that's a Bad Idea (tm).

  • Place a file containing the following to /etc/systemd/system/syncthing@.service.d , run systemctl daemon-reload and restart the Syncthing service ( systemctl restart syncthing@admin ) :


    [Service]Environment=STTRACE=*your value*


    This is what solved it for me.

    Einmal editiert, zuletzt von Tii () aus folgendem Grund: revisiting this after extensive testing.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!