Skip to content

"general SOCKS server failure" since syncthing 1.3.3 #6289

Closed

Description

@SanskritFritz

https://forum.syncthing.net/t/general-socks-server-failure-since-syncthing-1-3-3/14375

Syncthing Version: v1.3.3
OS Version: Archlinux

Since I upgraded syncthing to 1.3.3 on archlinux, it is unable to connect to my cntlm socks proxy running locally. The log says repeatedly:

INFO: Listen (BEP/relay): joining session: socks connect tcp localhost:8010->127.0.0.1:443: unknown error general SOCKS server failure

I have configured socks for syncthing via systemctl edit syncthing@user

[Service]
Environment=all_proxy='socks5://localhost:8010' ALL_PROXY_NO_FALLBACK=1 http_proxy= https_proxy= GOMAXPROCS=1

Downgrading syncthing to 1.3.2 works as a workaround.
Logs of both versions with STTRACE=dialer:
https://gist.github.com/SanskritFritz/3e13c89f00f4f7b857b705a58dcd3d43
https://gist.github.com/SanskritFritz/719eccbd21e29f54a9df844e67f2196f

Activity

  1. AudriusButkevicius commented on Jan 23, 2020

    @AudriusButkevicius
    Member

    So I've found a bug, but I don't think it's the bug you're experiencing.
    Suggest you download the dev build from:

    #6291 (build page: https://build.syncthing.net/viewLog.html?buildId=53240&buildTypeId=Syncthing_BuildLinuxCross&tab=artifacts)

    and see if it fixes it.
    If not, provide the logs again, as this build adds verbose logging back in.

  2. SanskritFritz commented on Jan 23, 2020

    @SanskritFritz
    Author

    Which one should I download for the x86_64 architecture?

  3. imsodin commented on Jan 23, 2020

    @imsodin
    Member

    x86_64 is named amd64 in the artifacts.

  4. AudriusButkevicius commented on Jan 23, 2020

    @AudriusButkevicius
    Member

    Its amd64 and whatever your os is.

  5. SanskritFritz commented on Jan 24, 2020

    @SanskritFritz
    Author

    Thanks. I've copied the binary over the installed syncthing 1.3.2 and restarted the service.
    My problem has gone, syncthing works nicely again over my socks proxy.
    So it seems your fix has fixed this problem as well. Thank you!

    Jan 24 08:53:23 FrankVM syncthing[778350]: [start] INFO: syncthing v1.3.4-rc.1+14-ga8351010 "Fermium Flea" (go1.13.6 linux-amd64) [email protected] 2020-01-23 21:30:13 UTC
    Jan 24 08:53:23 FrankVM syncthing[778350]: [start] INFO: Automatic upgrade is always enabled for candidate releases.
    Jan 24 08:53:23 FrankVM syncthing[778350]: [YSBJ4] INFO: My ID: ...
    Jan 24 08:53:24 FrankVM syncthing[778350]: [monitor] INFO: Proxy settings detected
    Jan 24 08:53:24 FrankVM syncthing[778350]: [monitor] INFO: Proxy fallback disabled
    Jan 24 08:53:24 FrankVM syncthing[778350]: [YSBJ4] INFO: Proxy settings detected
    Jan 24 08:53:24 FrankVM syncthing[778350]: [YSBJ4] INFO: Proxy fallback disabled
    ...
    Jan 24 08:53:25 FrankVM syncthing[778350]: [YSBJ4] INFO: Completed initial scan of sendreceive folder "Keepass" (xxxx-xxxx)
    Jan 24 08:53:25 FrankVM syncthing[778350]: [YSBJ4] INFO: Completed initial scan of sendreceive folder "Shared" (xxxx-xxxx)
    Jan 24 08:53:25 FrankVM syncthing[778350]: [YSBJ4] INFO: Completed initial scan of sendreceive folder "ZimNotebooks" (xxxx-xxxx)
    Jan 24 08:53:33 FrankVM syncthing[778350]: [YSBJ4] INFO: Joined relay relay://195.201.94.137:443
    Jan 24 08:55:53 FrankVM syncthing[778350]: [YSBJ4] INFO: Established secure connection to ... at 127.0.0.1:47950-127.0.0.1:8010/relay-server/TLS1.3-TLS_AES_128_GCM_SHA256
    Jan 24 08:55:53 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... client is "syncthing v1.3.2" named "xxxS7" at 127.0.0.1:47950-127.0.0.1:8010/relay-server/TLS1.3-TLS_AES_128_GCM_SHA256
    Jan 24 08:55:53 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Keepass" (xxxx-xxxx) has a new index ID (0x95EA0D49BEB1F6D2)
    Jan 24 08:55:53 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Keepass" (xxxx-xxxx) has mismatching index ID for us (0x6F16B156BC933B0D != 0x3539AC5EF9E16A21)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Established secure connection to ... at 127.0.0.1:47962-127.0.0.1:8010/relay-server/TLS1.3-TLS_AES_128_GCM_SHA256
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... client is "syncthing v1.3.3" named "HomeC" at 127.0.0.1:47962-127.0.0.1:8010/relay-server/TLS1.3-TLS_AES_128_GCM_SHA256
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "ZimNotebooks" (xxxx-xxxx) has a new index ID (0x298C81405D38EA50)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "ZimNotebooks" (xxxx-xxxx) has mismatching index ID for us (0xD877EFB1FE089CB3 != 0x2AADC4315CF9DE67)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Keepass" (xxxx-xxxx) has a new index ID (0xDC1ACD3CEC30D14F)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Keepass" (xxxx-xxxx) has mismatching index ID for us (0x6F16B156BC933B0D != 0x3539AC5EF9E16A21)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Shared" (xxxx-xxxx) has a new index ID (0x1303707EDC8C7C7D)
    Jan 24 08:56:09 FrankVM syncthing[778350]: [YSBJ4] INFO: Device ... folder "Shared" (xxxx-xxxx) has mismatching index ID for us (0x E4E20019E437F5F != 0xC24540EFA3782D70)
    
  6. added
    bug
    on Jan 24, 2020
  7. added this to the v1.4.0 milestone on Jan 24, 2020
  8. SanskritFritz commented on Jan 24, 2020

    @SanskritFritz
    Author

    Should I have closed this issue myself, or was my post enough for clarification? Just asking so I know about the policy here.

  9. AudriusButkevicius commented on Jan 24, 2020

    @AudriusButkevicius
    Member

    I don't think there is any applicable policy in this case. Essentially we want to close once we are sure the commit landed in master. In theory it should have asked you to test before merging, but the bug was so obvious that I didn't bother waiting.

  10. SanskritFritz commented on Jan 24, 2020

    @SanskritFritz
    Author

    Perfect, this is fine with me, thanks.

  11. 10 remaining items

  12. SanskritFritz commented on Feb 25, 2020

    @SanskritFritz
    Author

    Thanks guys for dealing with this problem!
    Here is the log as requested:
    https://gist.githubusercontent.com/SanskritFritz/cb6d14b1b6ec749b736a2c920e627bc9/raw/5a80a3ef721174cf1036791b15356399e99eaab4/gistfile1.txt
    This is how I ran the test:

    #!/bin/bash
    export all_proxy='socks5://localhost:8010' 
    export ALL_PROXY_NO_FALLBACK=1 
    export http_proxy= 
    export https_proxy= 
    export GOMAXPROCS=1
    export STTRACE=dialer
    ./syncthing -home /home/frank/temp/syncthing_temp/
    
  13. AudriusButkevicius commented on Feb 25, 2020

    @AudriusButkevicius
    Member

    Everything looks fine from the logs for far, but it doesn't get to the point where your logs are showing the problem because you terminated it.

    Your proxy is blocking any connections that are not going to port 80 or 443, most relays listen on port 22067 which your proxy is refusing.
    It does eventually pick a relay that happens to be listening on 443.

    But I think I see the problem.

  14. SanskritFritz commented on Feb 25, 2020

    @SanskritFritz
    Author

    Oh sorry. Should I leave it running longer?

  15. added 3 commits that reference this issue on Feb 25, 2020
    59346e6
    39489ef
    6d1e05a
  16. modified the milestones: v1.4.0, v1.4.1 on Feb 26, 2020
  17. SanskritFritz commented on Feb 27, 2020

    @SanskritFritz
    Author

    Can I test the fix via a nightly build?

  18. AudriusButkevicius commented on Feb 27, 2020

    @AudriusButkevicius
    Member

    You can download the build off the PR.

  19. SanskritFritz commented on Feb 27, 2020

    @SanskritFritz
    Author

    I have tried syncthing-linux-amd64-v1.4.0-rc.7+19-g947459e9.tar.gz
    It panicks and exits:
    https://gist.github.com/SanskritFritz/2c1ad2b77afaf77a26303b75327e2443

    UPDATE: Sorry I have realised just now there is another PR which is relevant here:
    syncthing-linux-amd64-v1.4.0-rc.7+18-g670a799b.tar.gz
    Testing it right now.

    UPDATE2: ... and that build works, thank you!

    2020.04.12 UPDATE3: I just installed 1.4.2 from the package manager and it works well too. Thank you!

  20. added
    frozen-due-to-age
    on Feb 26, 2021
  21. locked and limited conversation to collaborators on Feb 26, 2021
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions