ksync / ksync

Sync files between your local system and a kubernetes cluster.

Home Page:https://ksync.github.io/ksync/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ksync generates CSRF error

NealWilxite opened this issue · comments

commented

Recently upgraded my computer, copied ksync and kube folders from old machine and updated project folder references in ksync.yaml.

Running "ksync watch" now generates the following:

PS C:\Users\[me]\Development\[company]\[project-name]> ksync watch
time="2021-04-26T21:48:11+01:00" level=info msg=listening bind=127.0.0.1 port=40322
time="2021-04-26T21:48:11+01:00" level=info msg="new pod detected" pod=[project-name]-5696796b4c-gws4w spec=secure-snapper
time="2021-04-26T21:48:11+01:00" level=info msg="syncthing listening" port=8384 syncthing=localhost
time="2021-04-26T21:48:15+01:00" level=error msg="Error: %!s(<nil>)\nBody: CSRF Error\n"
time="2021-04-26T21:48:16+01:00" level=error msg="Error: %!s(<nil>)\nBody: CSRF Error\n"
time="2021-04-26T21:48:16+01:00" level=error msg="Error: %!s(<nil>)\nBody: CSRF Error\n"
time="2021-04-26T21:48:18+01:00" level=error msg="Error: %!s(<nil>)\nBody: CSRF Error\n"

Thought it was due to version of ksync (had upgraded to 0.4.7-hotfix) so downgraded to 0.4.5. ksync version info below.

ksync:
        Version:    Release
        Go Version: go1.14.4
        Git Commit: 9f40bf1
        Git Tag:    0.4.5
        Built:      Tue Jun 30 06:36:57 +0000 2020
        OS/Arch:    windows/amd64
service:
        Version:    Release
        Go Version: go1.16.2
        Git Commit: 14ec9e2
        Git Tag:    0.4.7-hotfix
        Built:      Wed Mar 24 22:08:03 GMT 2021

Still producing the same result. I am not sure what to try.

Did anything change with your k8s cluster? It sounds like an issue related to auth. Increasing the logging verbosity and running doctor would help!

commented

Thanks for the advice but I manage to figure out the issue. I had another instance of syncthing running in the background (from SyncTrayzor app). Doh!