louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
55.46k stars 4.99k forks source link

Localhost problem #4954

Open raman04-byte opened 1 month ago

raman04-byte commented 1 month ago

⚠️ Please verify that this question has NOT been raised before.

🛡️ Security Policy

📝 Describe your problem

I am not able to run the localhost:3001 and localhost:8000

image

📝 Error Message(s) or Log

No response

🐻 Uptime-Kuma Version

1.23.13

💻 Operating System and Arch

macOS

🌐 Browser

Chrome

🖥️ Deployment Environment

raman04-byte commented 1 month ago

I tried to simply run it on the chrome and it's running smoothly. I am using docker to deploy uptime-kuma

CommanderStorm commented 1 month ago

Have you allowed the docker container access to localhost outside of the container? (Read: are you running the container in host network mode)

https://github.com/louislam/uptime-kuma/wiki/Troubleshooting

raman04-byte commented 1 month ago

Well I have tried your solution and it's not working.

Also have tried this solution as well: https://github.com/louislam/uptime-kuma#:~:text=If%20you%20want%20to%20limit%20exposure%20to%20localhost%20(without%20exposing%20port%20for%20other%20users%20or%20to%20use%20a%20reverse%20proxy)%2C%20you%20can%20expose%20the%20port%20like%20this%3A

raman04-byte commented 1 month ago

It's still down

image
raman04-byte commented 1 month ago

Have you allowed the docker container access to localhost outside of the container? (Read: are you running the container in host network mode)

https://github.com/louislam/uptime-kuma/wiki/Troubleshooting

How to allow docker container to access the localhost?

CommanderStorm commented 1 month ago

You can allow access to the host network via --network=host.

jinnabaalu commented 1 month ago

When you search with the localhost:3000, which looks for the the service running with port 3000 within the container, so better not to monitor with localhost, use DNS or IP with ports.

alexislefebvre commented 1 month ago

On Linux, one Docker container can access to the host through the address 172.17.0.1. and host.docker.internal should work on Mac (and some versions on Linux). See https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach and https://medium.com/@TimvanBaarsen/how-to-connect-to-the-docker-host-from-inside-a-docker-container-112b4c71bc66