C
C#5mo ago
Ares

trying to deploy my app with docker with my problems

So i have my container running, and when I go to localhost:8080 where the docker is running, it takes me to the error view with the message being:
Error.
An error occurred while processing your request.
Request ID: An exception has been raised that is likely due to a transient failure.

Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
Error.
An error occurred while processing your request.
Request ID: An exception has been raised that is likely due to a transient failure.

Development Mode
Swapping to Development environment will display more detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.
6 Replies
Ares
Ares5mo ago
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
2024-02-23 04:00:03 server-1 | Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2024-02-23 04:00:03 server-1 | No XML encryptor configured. Key {69f17d4e-5434-4889-8dfa-7aaddb920824} may be persisted to storage in unencrypted form.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[14]
2024-02-23 04:00:03 server-1 | Now listening on: http://[::]:8080
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Application started. Press Ctrl+C to shut down.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Hosting environment: Production
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Content root path: /app
2024-02-23 04:00:56 server-1 | warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2024-02-23 04:00:56 server-1 | Failed to determine the https port for redirect.
2024-02-23 04:00:56 server-1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
2024-02-23 04:00:56 server-1 | An error occurred using the connection to database 'realtime_poll' on server 'tcp://localhost:5432'.
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
2024-02-23 04:00:03 server-1 | Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
2024-02-23 04:00:03 server-1 | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2024-02-23 04:00:03 server-1 | No XML encryptor configured. Key {69f17d4e-5434-4889-8dfa-7aaddb920824} may be persisted to storage in unencrypted form.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[14]
2024-02-23 04:00:03 server-1 | Now listening on: http://[::]:8080
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Application started. Press Ctrl+C to shut down.
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Hosting environment: Production
2024-02-23 04:00:03 server-1 | info: Microsoft.Hosting.Lifetime[0]
2024-02-23 04:00:03 server-1 | Content root path: /app
2024-02-23 04:00:56 server-1 | warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2024-02-23 04:00:56 server-1 | Failed to determine the https port for redirect.
2024-02-23 04:00:56 server-1 | fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
2024-02-23 04:00:56 server-1 | An error occurred using the connection to database 'realtime_poll' on server 'tcp://localhost:5432'.
i think the problem is that i cant connect to the db.
mindhardt
mindhardt5mo ago
Yes, because localhost inside docker is not the host machine It is a container host Is your db also in docker?
Ares
Ares5mo ago
no. i need to do that. the first thing i did was do docker build -t realtime_polls . and then that made the image. and then to run it I did docker run -it --rm -p 5000:80 -e ASPNETCORE_URLS=http://+:80 --name realtimepolls realtimepolls so now the caontainer is running the image i made. but now for the database, I was trying to follow this guide to add the postgres db, but whenever I try to create a new database, i dont see it in the list when i do \l https://www.commandprompt.com/education/how-to-create-a-postgresql-database-in-docker/
How to Create a PostgreSQL Database in Docker
To create a PostgreSQL database in Docker, use the “CREATE DATABASE <database-name>;” command. Then, create a new table in it and insert values in the ta…
Ares
Ares5mo ago
No description
No description
Ares
Ares5mo ago
No description
Ares
Ares5mo ago
nvm resolved
Want results from more Discord servers?
Add your server
More Posts
.NET tool/library for communication/network loggingHye guys, I was asked to do some "research" to find some fancy/cool way to logging communication betstruggling with objects and methods```cs class Circle { float radius; int id; int nextID; static void initCircle() .runsettings Coverage Pattern Not WorkingHello can someone please help me fix my runsettings to only collect from the "Controllers" folder: `✅ How can I convert/flatten an 8-Digit Hex color (Alpha) to a 6-Digit Hex color (Assuming white BG)Does anyone here know how to convert an 8-Digit HEX color code to a 6-Digit HEX color code (AssumingAzure video analyzer:blue_siren: :blue_siren: Is there any azure service that I can use to analyze a video's content? IBlazor Server and Client app, Azure questionI have Blazor Server and Client app. I deployed it on Azure Web App (not static). When I open the cLoop is returning the completely wrong value.I am using the Linqpad to test a pricing algorithm but the result at the is completely wrong. Instea✅ Invalidating inherited Properties Tree in WPFI'm trying to implement an inherited list property (called `InheritedCustomContextList`) which mergeHow do I pass through JWT token and customer headersNot sure this approach is right. I have a webapi that will receive a bearer token and a custom head✅ Is there a way you can check if an object’s equality operator will compare by reference?I want to implement a data validation attribute like [UniqueValues] for ASP.NET model binding which