Hi there,
I am having trouble using HAProxy in front (as detailed elsewhere), and just gave a try with Nginx (version 1.18.0).
I start the server with self-signed certificates, but the connection to the repository server using command line doesn’t work.
Using client Kopia command line:
❯ kopia repository connect server --url=https://<kopia.domain.tld>:443 --server-cert-fingerprint=<fingerprint> --log-file=kopia.log --log-level=debug --override-username=<username> --override-hostname=<hostname> --password=<password>
Nginx on the server returns:
2021/10/21 19:34:34 [error] 59303#59303: *71 upstream sent frame for closed stream 1 while reading upstream, client: <client-ip>, server: <kopia.domain.tld>, request: "POST /kopia_repository.KopiaRepository/Session HTTP/2.0", upstream: "grpcs://0.0.0.0:51515", host: "<kopia.domain.tld>:443"
Client Kopia log returns:
❯ cat kopia.log
2021-10-21 19:34:33.168 I [logger.go:244] Connecting to server 'https://<kopia.domain.tld>:443' as '<user@hostname>'...
2021-10-21 19:34:33.168 D [logger.go:254] Creating cache directory '/home/<$USER>/.cache/kopia/1b0e0fd7e3249467' with max size 5242880000
2021-10-21 19:34:33.374 D [logger.go:254] establishing new GRPC streaming session (purpose=)
2021-10-21 19:34:33.702 D [logger.go:254] GRPC stream read loop terminated with rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: INTERNAL_ERROR
2021-10-21 19:34:33.702 E [logger.go:214] failed to open repository: unable to establish session for purpose=: error establishing session: unable to initialize session: rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: INTERNAL_ERROR: EOF
I have added the user <username>@<hostname>
serverside.
Also, curl -v https://<kopia.domain.tld>:443 -u <server-username>:<server-password>
shows correct TLS handshakes, as with using HAProxy and reported here.
Any hints?