-
Notifications
You must be signed in to change notification settings - Fork 83
Description
Hope this is the right forum. First time leaving an issue on GitHub.
Edit: Originally posted on Tsudoko's repo but realized he hasn't answered in any issues in a couple of years.
Long story short, I've set up a docker container (kuklinistvan/anki-sync-server) for Anki-Sync-Server (AnkiSS) and when attempting to use the Anki Desktop client to sync, I'm receiving the "AnkiWeb ID or password was incorrect; please try again." error. When looking at the server logs it says "Authentication failed for nonexistent user None.".
AnkiSS is on a Linux Server and the Anki Desktop is on a Linux Client.
The Anki Desktop client is v2.1.66.
To go over set up & troubleshooting steps:
On the AnkiSS host, I've ran the ./ankisyncctl.py adduser command, as noted in the linked documentation.
Troubleshooting output is shown below:
- Docker-Compose config
- The wireshark output as observed on the client
- As well as the docker logs from the running conainer showing that it receives the request (first line)
- The in-container AnkiSS output that shows the user exists.
My goal is to identify (as shown in # 3) why a user of NONE is observed on the server, even after I've explicitly created one and validated that one exists. Also, I would like to know if there is anything in general I am missing or misunderstanding about the Sync Server's purpose/configuration.
I have an nginx proxy, but I tried with both FQDN and just IP and the result is the same.
01. Docker Compose:
version: "3.8"
services:
anki-sync-server:
image: kuklinistvan/anki-sync-server:latest
container_name: anki-sync-server
restart: unless-stopped
ports:
- "1257:27701"
volumes:
- ./data/sync_server:/app/data
logging:
options:
max-size: "10m"
max-file: "3"02. Wireshark HTTP Stream:
---- POST ----
POST /sync/hostKey HTTP/1.1
anki-sync: {"v":11,"k":"","c":"2.1.66,70506aeb,linux","s":"dVi2Fn"}
content-type: application/octet-stream
accept: */*
host: 192.168.50.61:1257
transfer-encoding: chunked
(./..X...{"u":"bob","p":"1234"}
---- RESPONSE ----
HTTP/1.0 403 Forbidden
Date: Fri, 22 Sep 2023 15:39:29 GMT
Server: WSGIServer/0.2 CPython/3.7.0
Content-Length: 161
Content-Type: text/html; charset=UTF-8
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<h1>403 Forbidden</h1>
Access was denied to this resource.<br /><br />
null
</body>
</html>
03. Docker Log Output:
Error output:
anki-sync-server | [2023-09-22 15:39:29,385]:INFO:ankisyncd.users:Authentication failed for nonexistent user None.
anki-sync-server | [2023-09-22 15:39:29,386]:INFO:ankisyncd.http:192.168.55.10 "POST /sync/hostKey HTTP/1.1" 403 161
A successful connection looks like:
anki-sync-server | [2023-09-22 15:48:29,386]:INFO:ankisyncd.http:127.0.0.1 "GET / HTTP/1.1" 200 16
04. Container Output:
/app/anki-sync-server # ./ankisyncctl.py lsuser
bob