ShokoAnime / Shokofin

Repository for Shokofin, a plugin that brings Shoko to Jellyfin.
https://shokoanime.com
MIT License
140 stars 17 forks source link

Shokofin - no connection to shokoserver in jellyfin #48

Closed SkalCore closed 5 months ago

SkalCore commented 5 months ago

Trying to connect to shokoserver, but no connection could be established.

Running jellyfin in docker, added the repo from shokofin. shokoserver also run in docker. Same ip address range.

Log entries in jellyfin thrown this info:

11.04.2024 12:26:16 [12:26:16] [ERR] [13] Shokofin.Web.WebController: Failed to create an API-key for user skalcore — unable to complete the request. 11.04.2024 12:26:16 System.Net.Http.HttpRequestException: Connection timed out (192.168.178.20:8111) 11.04.2024 12:26:16 ---> System.Net.Sockets.SocketException (110): Connection timed out 11.04.2024 12:26:16 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) 11.04.2024 12:26:16 at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 --- End of inner exception stack trace --- 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) 11.04.2024 12:26:16 at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 11.04.2024 12:26:16 at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) 11.04.2024 12:26:16 at Shokofin.API.ShokoAPIClient.GetApiKey(String username, String password, Boolean forUser) 11.04.2024 12:26:16 at Shokofin.Web.WebController.PostAsync(ApiLoginRequest body)

revam commented 5 months ago

Can you please provide your Jellyfin version (e.g. 10.8.13), Shokofin version (e.g. 3.0.1.0), Shoko Server version (e.g. 4.2.2.0 Stable, or 4.2.2.0 Dev e3e3e3e)? And some more information about how you've set up your docker container networks? E.g. can the Jellyfin container access the 8111 port on the 192.168.178.20 ip (presumably the public ip of the docker host)? Have you tried the docker internal ip for the shoko container (e.g. 172.17.0.2 — do note that this is only an example of a docker internal ip, and won't necessarily be the ip of your shoko server container on your default docker network)?

Also, for faster support I strongly advice asking in our discord server instead of on GitHub.

SkalCore commented 5 months ago

ok, after reading your answer I remembered that I installed the container from shokoserver in portainer as a stack, so shokoserver was running in a different docker network. After I changed that it works now