Patricius
Patricius
Explore posts from servers
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
Also, amazing cat u have
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
Okay, thank you very much for resolving this with me. God knows how long it would take me to see this.
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
But also localhost and 0.0.0.0 was kind of in my head as the same thing
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
I hate dotnet but more myself for not thinking of this
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
oh wow it works
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
let me change the host within my app and see
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
Logs look fine, listening on localhost:8080 as per usual.
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
Same result:
curl http://localhost:8080/weatherforecast
curl: (56) Recv failure: Connection reset by peer
curl http://localhost:8080/weatherforecast
curl: (56) Recv failure: Connection reset by peer
As far as I know the error 56 shows that connection was established but dropped right away. This error also only occurs on the ports the app listens to, other ports throw error 7.
28 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
Hey, thank you for answering, I was in a meeting. - Why is entrypoint dotnet watch run? This is supposed to be a development environment Dockerfile, dotnet watch is just setting up hot reload. I have another Dockerfile for prod but that one is facing the same issues. - Why Dockerfile for dev env? Because I have other pieces of Software and with Docker launching the project takes 1 command. - This is also why I dont do publish and dont use server.dll. I can assure you that outside of Docker these commands and how I run it work fine. Even inside of Docker when I run curl commands everything is fine. - What do logs say? The logs just show the typical dotnet startup screen:
dotnet_api | Determining projects to restore...
dotnet_api | All projects are up-to-date for restore.
dotnet_api | server -> /usr/src/app/bin/Debug/net8.0/server.dll
dotnet_api | dotnet watch 🚀 Started
dotnet_api | warn: Microsoft.AspNetCore.Hosting.Diagnostics[15]
dotnet_api | Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://localhost:8080'.
dotnet_api | info: Microsoft.Hosting.Lifetime[14]
dotnet_api | Now listening on: http://localhost:8080
dotnet_api | dotnet watch 🌐 Unable to launch the browser. Navigate to http://localhost:8080
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Application started. Press Ctrl+C to shut down.
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Hosting environment: Development
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Content root path: /usr/src/app
dotnet_api | Determining projects to restore...
dotnet_api | All projects are up-to-date for restore.
dotnet_api | server -> /usr/src/app/bin/Debug/net8.0/server.dll
dotnet_api | dotnet watch 🚀 Started
dotnet_api | warn: Microsoft.AspNetCore.Hosting.Diagnostics[15]
dotnet_api | Overriding HTTP_PORTS '8080' and HTTPS_PORTS ''. Binding to values defined by URLS instead 'http://localhost:8080'.
dotnet_api | info: Microsoft.Hosting.Lifetime[14]
dotnet_api | Now listening on: http://localhost:8080
dotnet_api | dotnet watch 🌐 Unable to launch the browser. Navigate to http://localhost:8080
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Application started. Press Ctrl+C to shut down.
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Hosting environment: Development
dotnet_api | info: Microsoft.Hosting.Lifetime[0]
dotnet_api | Content root path: /usr/src/app
- Check if something is using the port? I have tried using 5282, 3000 (which I use for other apps I develop) and 8080. I know for sure that nothing else is using 3000.
28 replies