kosync-dotnet icon indicating copy to clipboard operation
kosync-dotnet copied to clipboard

Error when trying to register

Open MMorokk opened this issue 10 months ago • 2 comments

When trying to register in KOReader on my Pocketbook i get "Unknown server error" on client and this on server:

kosync                 | info: Kosync.Services.ProxyService[0]
kosync                 |       [2025/04/20 09:10:19] Trusted proxies: 10.5.5.1
kosync                 | fail: Microsoft.AspNetCore.Server.Kestrel[13]
kosync                 |       Connection id "0HNBVTCM333MA", Request id "0HNBVTCM333MA:00000001": An unhandled exception was thrown by the application.
kosync                 |       System.IO.IOException: The system cannot open the device or file specified. : 'Global\78955F1506BA6151E462139B6528D09CECDFC027.Mutex'
kosync                 |          at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
kosync                 |          at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
kosync                 |          at LiteDB.SharedEngine..ctor(EngineSettings settings)
kosync                 |          at LiteDB.ConnectionString.CreateEngine()
kosync                 |          at LiteDB.LiteDatabase..ctor(ConnectionString connectionString, BsonMapper mapper)
kosync                 |          at LiteDB.LiteDatabase..ctor(String connectionString, BsonMapper mapper)
kosync                 |          at Kosync.Database.KosyncDb..ctor() in /app/Database/KosyncDb.cs:line 9
kosync                 |          at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
kosync                 |          at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite callSite, RuntimeResolverContext context)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
kosync                 |          at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
kosync                 |          at lambda_method2(Closure, IServiceProvider, Object[])
kosync                 |          at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass6_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
kosync                 |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
kosync                 |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
kosync                 |       --- End of stack trace from previous location ---
kosync                 |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
kosync                 |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
kosync                 |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
kosync                 |          at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
kosync                 |          at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
kosync                 |          at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

My docker-compose is

  kosync:
    container_name: kosync
    image: ghcr.io/jberlyn/kosync-dotnet:latest
    restart: unless-stopped
    volumes:
      - ${HOME}/hdd/kosync:/app/data:rw
    ports:
      - 7200:8080
    environment:
      - ASPNETCORE_HTTP_PORTS=8080
      - ADMIN_PASSWORD=[redacted]
      - REGISTRATION_DISABLED=false
      - TRUSTED_PROXIES=10.5.5.1
    user: 1000:1000

MMorokk avatar Apr 20 '25 09:04 MMorokk

Can you give some information about your server setup?

puhtahtoe avatar Apr 21 '25 06:04 puhtahtoe

Can you give some information about your server setup?

Debian 12 VM inside proxmox Docker with docker compose with few other programs Wireguard VPN to the remote vps Caddy proxy tunneling traffic thru wireguard to local server from VPS that has public IP and domain name.

I'm not sure what else to mention, if you want me to elaborate on something or have other questions - feel free to ask

MMorokk avatar Apr 21 '25 07:04 MMorokk