fiskaltrust / product-de-bring-your-own-datacenter

Information about the fiskaltrust "Bring your own Data Center" product, which enables hosting the fiskaltrust.Middleware in data centers.
5 stars 2 forks source link

Updating cashbox configuration when MySql query string is wrong #51

Closed mgbarnech closed 2 years ago

mgbarnech commented 3 years ago

Describe the bug After a cashbox is configured with MySql wrong credentials we cannot restart the configuration only for that cashbox

To Reproduce

Expected behavior We should be able to download the new correct configuration of the cashbox without restart the entire cluster. We expect following behavior

Screenshots Pods in our cluster

Bildschirmfoto 2021-07-26 um 15 18 18

STDOUT/STDERR With the wrong MySql connection we request the endpoint /json/v1/Sign to generate a ZeroReceipt

{
    "log": "\u001b[40m\u001b[1m\u001b[33mwarn\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.HelipadUploader[0]\n      Failed to remove queue upload for cashbox cashbox. cashboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-kpvxb",
        "container_name": "byodc",
        "docker_id": "9d8cf62e6240a55c22e7c85ed2902ede9c7943396c365a71ff0a02945623a00f",
        "container_hash": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly@sha256:adde70ed0481ff88caa6a27c36541dcab9ab3e59ae8da3403fba85d8c66c2ecd",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[40m\u001b[1m\u001b[33mwarn\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.HelipadUploader[0]\n      Failed to remove queue upload for cashbox cashbox. cashboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-zxz9x",
        "container_name": "byodc",
        "docker_id": "faa3c92ffd2dcebe6aad0c9553b45a3857841877eb1e90f8860f7209914c96e9",
        "container_hash": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly@sha256:adde70ed0481ff88caa6a27c36541dcab9ab3e59ae8da3403fba85d8c66c2ecd",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[41m\u001b[30mfail\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory[0]\n      Failed to create worker. casboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n      System.AggregateException: One or more errors occurred. (Access denied for user 'user'@'10.1.10.36' (using password: YES))\n       ---> MySqlConnector.MySqlException (0x80004005): Access denied for user 'user'@'10.1.10.36' (using password: YES)\n         at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, Int32 startTickCount, ILoadBalancer loadBalancer, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 462\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 110\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 140\n         at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 846\n         at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 410\n         at fiskaltrust.Middleware.Storage.MySQL.DatabaseInitialization.DatabaseMigrator.MigrateAsync()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.InitAsync(Guid queueId, Dictionary`2 configuration, ILogger`1 logger)\n         --- End of inner exception stack trace ---\n         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n         at System.Threading.Tasks.Task.Wait()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.ConfigureStorageServices(IServiceCollection serviceCollection)\n         at fiskaltrust.Middleware.Queue.MySQL.PosBootstrapper.ConfigureServices(IServiceCollection serviceCollection)\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateQueue(ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 211\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.<>c__DisplayClass10_0.<<CreateAsync>b__0>d.MoveNext() in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 171\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-b4fnc",
        "container_name": "byodc",
        "docker_id": "f79f095b67dd4d647f9782c8fc848eeed4f3705c2881b67a692ae71dd6d8acf5",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[41m\u001b[30mfail\u001b[39m\u001b[22m\u001b[49m: Microsoft.AspNetCore.Server.Kestrel[13]\n      Connection id \"0HMAG62LR2SS4\", Request id \"0HMAG62LR2SS4:00000002\": An unhandled exception was thrown by the application.\n      System.AggregateException: One or more errors occurred. (Access denied for user 'user'@'10.1.10.36' (using password: YES))\n       ---> MySqlConnector.MySqlException (0x80004005): Access denied for user 'user'@'10.1.10.36' (using password: YES)\n         at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, Int32 startTickCount, ILoadBalancer loadBalancer, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 462\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 110\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 140\n         at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 846\n         at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 410\n         at fiskaltrust.Middleware.Storage.MySQL.DatabaseInitialization.DatabaseMigrator.MigrateAsync()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.InitAsync(Guid queueId, Dictionary`2 configuration, ILogger`1 logger)\n         --- End of inner exception stack trace ---\n         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n         at System.Threading.Tasks.Task.Wait()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.ConfigureStorageServices(IServiceCollection serviceCollection)\n         at fiskaltrust.Middleware.Queue.MySQL.PosBootstrapper.ConfigureServices(IServiceCollection serviceCollection)\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateQueue(ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 211\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.<>c__DisplayClass10_0.<<CreateAsync>b__0>d.MoveNext() in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 171\n      --- End of stack trace from previous location ---\n         at fiskaltrust.SignatureCloud.DE.Services.Locking.RedisLockService.ProcessLockiningAsync[T](String lockName, Func`1 executeMethod) in /src/src/fiskaltrust.SignatureCloud.DE/Services/Locking/RedisLockService.cs:line 29\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateAsync(Guid cashboxid, String accesstoken, ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 85\n         at fiskaltrust.SignatureCloud.DE.Controllers.SignController.Post(ReceiptRequest request) in /src/src/fiskaltrust.SignatureCloud.DE/Controllers/SignController.cs:line 90\n         at lambda_method11(Closure , Object )\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n         at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n         at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-b4fnc",
        "container_name": "byodc",
        "docker_id": "f79f095b67dd4d647f9782c8fc848eeed4f3705c2881b67a692ae71dd6d8acf5",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},

After the MySql query string was fixed and the echo request was performed

{
    "log": "\u001b[40m\u001b[1m\u001b[33mwarn\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.HelipadUploader[0]\n      Failed to remove queue upload for cashbox cashbox. cashboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-zxz9x",
        "container_name": "byodc",
        "docker_id": "faa3c92ffd2dcebe6aad0c9553b45a3857841877eb1e90f8860f7209914c96e9",
        "container_hash": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly@sha256:adde70ed0481ff88caa6a27c36541dcab9ab3e59ae8da3403fba85d8c66c2ecd",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[40m\u001b[1m\u001b[33mwarn\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.HelipadUploader[0]\n      Failed to remove queue upload for cashbox cashbox. cashboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-kpvxb",
        "container_name": "byodc",
        "docker_id": "9d8cf62e6240a55c22e7c85ed2902ede9c7943396c365a71ff0a02945623a00f",
        "container_hash": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly@sha256:adde70ed0481ff88caa6a27c36541dcab9ab3e59ae8da3403fba85d8c66c2ecd",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[41m\u001b[30mfail\u001b[39m\u001b[22m\u001b[49m: fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory[0]\n      Failed to create worker. casboxid: b7cbd467-0dbf-4496-94d1-3b7eef760905\n      System.AggregateException: One or more errors occurred. (Access denied for user 'user'@'10.1.21.142' (using password: YES))\n       ---> MySqlConnector.MySqlException (0x80004005): Access denied for user 'user'@'10.1.21.142' (using password: YES)\n         at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited(ValueTask`1 task) in /_/src/MySqlConnector/Core/ServerSession.cs:line 815\n         at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, Int32 startTickCount, ILoadBalancer loadBalancer, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 462\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 110\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 140\n         at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 846\n         at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 410\n         at fiskaltrust.Middleware.Storage.MySQL.DatabaseInitialization.DatabaseMigrator.MigrateAsync()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.InitAsync(Guid queueId, Dictionary`2 configuration, ILogger`1 logger)\n         --- End of inner exception stack trace ---\n         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n         at System.Threading.Tasks.Task.Wait()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.ConfigureStorageServices(IServiceCollection serviceCollection)\n         at fiskaltrust.Middleware.Queue.MySQL.PosBootstrapper.ConfigureServices(IServiceCollection serviceCollection)\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateQueue(ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 211\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.<>c__DisplayClass10_0.<<CreateAsync>b__0>d.MoveNext() in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 171\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-b4fnc",
        "container_name": "byodc",
        "docker_id": "f79f095b67dd4d647f9782c8fc848eeed4f3705c2881b67a692ae71dd6d8acf5",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
},
{
    "log": "\u001b[41m\u001b[30mfail\u001b[39m\u001b[22m\u001b[49m: Microsoft.AspNetCore.Server.Kestrel[13]\n      Connection id \"0HMAG62LR2SS8\", Request id \"0HMAG62LR2SS8:00000002\": An unhandled exception was thrown by the application.\n      System.AggregateException: One or more errors occurred. (Access denied for user 'user'@'10.1.21.142' (using password: YES))\n       ---> MySqlConnector.MySqlException (0x80004005): Access denied for user 'user'@'10.1.21.142' (using password: YES)\n         at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited(ValueTask`1 task) in /_/src/MySqlConnector/Core/ServerSession.cs:line 815\n         at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, Int32 startTickCount, ILoadBalancer loadBalancer, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ServerSession.cs:line 462\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 110\n         at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/ConnectionPool.cs:line 140\n         at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 846\n         at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 410\n         at fiskaltrust.Middleware.Storage.MySQL.DatabaseInitialization.DatabaseMigrator.MigrateAsync()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.InitAsync(Guid queueId, Dictionary`2 configuration, ILogger`1 logger)\n         --- End of inner exception stack trace ---\n         at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n         at System.Threading.Tasks.Task.Wait()\n         at fiskaltrust.Middleware.Storage.MySQL.MySQLBootstrapper.ConfigureStorageServices(IServiceCollection serviceCollection)\n         at fiskaltrust.Middleware.Queue.MySQL.PosBootstrapper.ConfigureServices(IServiceCollection serviceCollection)\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateQueue(ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 211\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.<>c__DisplayClass10_0.<<CreateAsync>b__0>d.MoveNext() in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 171\n      --- End of stack trace from previous location ---\n         at fiskaltrust.SignatureCloud.DE.Services.Locking.RedisLockService.ProcessLockiningAsync[T](String lockName, Func`1 executeMethod) in /src/src/fiskaltrust.SignatureCloud.DE/Services/Locking/RedisLockService.cs:line 29\n         at fiskaltrust.SignatureCloud.DE.Services.MiddlewareInstanceFactory.CreateAsync(Guid cashboxid, String accesstoken, ftCashBoxConfiguration configuration) in /src/src/fiskaltrust.SignatureCloud.DE/Services/MiddlewareInstanceFactory.cs:line 85\n         at fiskaltrust.SignatureCloud.DE.Controllers.EchoController.Post(EchoRequest message) in /src/src/fiskaltrust.SignatureCloud.DE/Controllers/EchoController.cs:line 78\n         at lambda_method44(Closure , Object )\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\n         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n         at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n         at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)\n         at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)\n",
    "stream": "stdout",
    "kubernetes": {
        "pod_name": "byodc-7467d7bcf6-b4fnc",
        "container_name": "byodc",
        "docker_id": "f79f095b67dd4d647f9782c8fc848eeed4f3705c2881b67a692ae71dd6d8acf5",
        "container_image": "ghcr.io/fiskaltrust/byodc-mysql-fiskaly:1.3-buster"
    }
}

POSSystem (please complete the following information):

Cashbox Information (please complete the following information):

Additional context We have 3 Backend PODs in our environment

StefanKert commented 3 years ago

Hi @mgbarnech,

I am very sorry for not getting back earlier. Currently we are understaffed because of the holiday season.

We have very quickly tried to reproduce the issue and it looks like we are having a inconsistency in our code. While we are "dropping" the instance of the middleware when a empty message is sent on Echo we do not clear the configuration. We will fix that soonish, but for now you could give it a shot with the following body:

{
    "message": null
}

When sending this as part of the echo body the configuration was correctly replaced by the new one.

We will roll out a fix for this issue in the next release to make sure that we also check for empty strings / adapt the docs to ensure that we having them match with the codebase.

mgbarnech commented 3 years ago

Hi @StefanKert with "message":null it works correctly Thank you!