Closed ctmillerlin closed 2 years ago
Hi @ctmillerlin,
Thank you for your feedback. I just went through a deployment of the tool to AKS, following this guide Tutorial. I created my own Azure Container Registry and pushed my image to the registry.
When I deployed it, it seemed to work correctly with no errors. In reviewing your error code, it appears as if your appsettings.json does indeed have invalid characters. I'm not sure how that happened but let me explain what happens in the code to hopefully explain how to resolve it.
In the project notes, it's stated that the /settings folder must be mapped to a persistent storage location, so that the settings will be retained when the container is deleted/created.
I'm still not sure how your appsettings.json file got other values (the "ck" text), but you could try one of the following to resolve the issue:
Repeat the process
Update the appsettings.json file
Hope this helps!
BryanSoltis
@BryanSoltis Thanks for your reply. Let me try again
@BryanSoltis fixed by removing the appsettings.json file
We are installing the Azure naming tool in AKS. But we failed when inputting admin password. Could you help check this?
by checking trace log
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'ZBqkfabWaFBr11MunFgu4v9w0VvkMOvJzzgu99inNMI'. System.IO.InvalidDataException: Failed to load configuration from file '/app/settings/appsettings.json'. ---> System.FormatException: Could not parse the JSON file. ---> System.Text.Json.JsonReaderException: 'c' is invalid after a single JSON value. Expected end of data. LineNumber: 5 | BytePositionInLine: 1. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan
1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeNextTokenUntilAfterAllCommentsAreSkipped(Byte marker) at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.JsonDocument.Parse(ReadOnlySpan1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack) at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory
1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter) at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory1 json, JsonDocumentOptions options) at System.Text.Json.JsonDocument.Parse(String json, JsonDocumentOptions options) at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(Stream input) at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream) --- End of inner exception stack trace --- at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload) --- End of inner exception stack trace --- at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload) at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList
1 providers) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at AzureNamingTool.Helpers.GeneralHelper.GetConfigurationData() in /src/Helpers/GeneralHelper.cs:line 17 at AzureNamingTool.Shared.PasswordModal.ModalSave() in /src/Shared/PasswordModal.razor:line 61 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) `by checking appsettings.json, don't know why there is a
ck"
in it.