We added the logger statements to all of the services and the auth server but they showed they were the same.
But, our other developer remembered that we had changed our default pass phrases when we deployed our apps to AKS. So the appsettings running localhost and the environment variables in the AKS deployment were different. The SMTP user password in our test tenant must have been set & hashed with localhost before we moved our apps to AKS. He reset the SMTP password with the current default pass phrase settings and the problem went away.
Thank you for pointing us in the right direction. Also, if you can direct to any documentation on how the default pass phrase is used across your packages and templates that would be helpful. This seems to be the only issue resulting from changing the default pass phrases.
Where do I put public override void OnApplicationInitialization(ApplicationInitializationContext context) { var env = context.GetEnvironment(); var app = context.GetApplicationBuilder();
var opt = app.ApplicationServices.GetRequiredService<IOptions<AbpStringEncryptionOptions>>();
Logger.LogInformation("pass phrase is : " + opt.DefaultPassPhrase);
.....
}
What module/program file within the Authserver solution?
Hi,
I don't understand your response. What do you mean?: "This is a problem with your StringEncryption. They used different values, so setting values could not be decrypted."
Different values from what? We have the StringEncryption in the Kubernetes pod config environment variables in the authserver application:
Where else is the StringEncryption?
Why was this closed. You all haven't answered the question.
Hi,
Yes I can see the password for the tenant but it is null for the host which is our requirement. Each tenant will have their own SMTP servers, usernames, etc.
Where would I put Logger statement?
Thank you.
[17:25:49 INF] Request starting HTTP/1.1 POST http://authserver.mydomain.dev/Account/Register application/x-www-form-urlencoded 272 [17:25:58 ERR] Padding is invalid and cannot be removed. System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at System.Security.Cryptography.SymmetricPadding.GetPaddingLength(ReadOnlySpan
1 block, PaddingMode paddingMode, Int32 blockSize)
at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(ReadOnlySpan1 inputBuffer, Span
1 outputBuffer)
at System.Security.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.ReadAsyncCore(Memory1 buffer, CancellationToken cancellationToken, Boolean useAsync) at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count) at Volo.Abp.Security.Encryption.StringEncryptionService.Decrypt(String cipherText, String passPhrase, Byte[] salt) at Volo.Abp.Settings.SettingEncryptionService.Decrypt(SettingDefinition settingDefinition, String encryptedValue) [17:25:58 ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null } [17:25:58 ERR] Setting value for 'Abp.Mailing.Smtp.Password' is null or empty! Volo.Abp.AbpException: Setting value for 'Abp.Mailing.Smtp.Password' is null or empty! at Volo.Abp.Emailing.EmailSenderConfiguration.GetNotEmptySettingValueAsync(String name) at Volo.Abp.Emailing.Smtp.SmtpEmailSender.BuildClientAsync() at Volo.Abp.Emailing.Smtp.SmtpEmailSender.SendEmailAsync(MailMessage mail) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(MailMessage mail, Boolean normalize) at Volo.Abp.Emailing.EmailSenderBase.SendAsync(String to, String subject, String body, Boolean isBodyHtml) at Volo.Abp.Account.Emailing.AccountEmailer.SendEmailConfirmationLinkAsync(IdentityUser user, String confirmationToken, String appName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.SendEmailConfirmationTokenAsync(IdentityUser user, String applicationName, String returnUrl, String returnUrlHash) at Volo.Abp.Account.AccountAppService.RegisterAsync(RegisterDto input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync()
at Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel.OnPostAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
....
[17:26:11 INF] Request finished HTTP/1.1 GET http://authserver.mydomain.dev/Abp/ApplicationLocalizationScript?cultureName=en - - - 200 106364 application/javascript 10787.4888ms`We're using the Microservice template and trying to register a new user with the self registration on the login page. It works fine when running the solution on localhost with the databases on our test server. It throws the above error when registering through the app running on AKS with the same databases on our test server.
We created a new test AKS cluster with Abp version 9.0 and the registration process works. But given our project time line I don't think we can wait until we have all of our microservices upgraded to V9 so ideally we get this fixed in V7.2
Thank you
Thanks. That was helpful
I've been exploring the ABP Studio Microservice template for Version 9.0 and watched the Youtube video Kubernetes Integrated Microservice Development with ABP Studio. Both the solution template and the video have Sql Server running as an application in Kubernetes.
In our version 7.2 environment we've been using our SQL Servers running on Azure VM's for the micro-service databases.
What's Abp's viewpoint on running in the same Kubernetes cluster as the micro-services, versus running on a VM... for performance, cost and possibly security considerations ? Do you have clients running micro-services with Sql server in Kubernetes?
Thank you.
Abp Studio Solution Configuration
When I open Abp Studio I get this message: Some pre-requirements are missing. If you want the application to work as expected, you need to install the following tool(s):
- PowerShell as a dotnet global tool. (Installation link: https://devblogs.microsoft.com/powershell/introducing-powershell-as-net-global-tool)
- node. (Installation link: https://nodejs.org/en)
- Volo.Abp.Studio.Cli as a dotnet global tool. (Installation link: https://abp.io/docs/latest/cli)
- dotnet-ef as a dotnet global tool. (Installation link: https://learn.microsoft.com/en-us/ef/core/cli/dotnet)
- mkcert. (Installation link: https://github.com/FiloSottile/mkcert)
If you have already installed the tool(s), please check the PATH environment variable.
Unfortunately your documentation doesn't list the prerequisites for Mac or how to install if they're missing.
The second issue shows up in the logs 4:33:44.349 Information Trying to connect to ABP Studio Backend: "http://localhost:38271"14:33:49.385 Information Trying to connect to ABP Studio Backend: "http://localhost:38271" 14:33:54.420 Information Trying to connect to ABP Studio Backend: "http://localhost:38271" 14:33:54.422 Warning Could not connect to ABP Studio Backend! Detail: "Failed to connect to StreamingHub 'IStudioBackendHub'. (Status(StatusCode="Unavailable", Detail="Error connecting to subchannel.", DebugException="System.Net.Sockets.SocketException: Connection refused"))"
Upgraded abp cli and .net to v9.0
Installed abp Studio for Mac
uninstalled abp cli dotnet tool uninstall -g Volo.Abp.Cli
Installed Abp studio as a global dotnet tool install -g Volo.Abp.Studio.Cli
Opened Studio
Got the pre-requisites error
Viewed the logs and saw the Backend connection error
Verified verified that each pre-requisite installed via the terminal command line:
rogerhopkins@MacBookPro ~ % node -v
v18.19.0
rogerhopkins@MacBookPro ~ % dotnet-ef --version
Entity Framework Core .NET Command-line Tools
7.0.3
rogerhopkins@MacBookPro ~ % mkcert --version
v1.4.4
rogerhopkins@MacBookPro ~ % pwsh
PowerShell 7.4.6
PS /Users/rogerhopkins>
To add to the conversation, this is what I'm getting just logging in with the abp cli abp login myusername -p mypassword