🐛 Bug Report: Couldn't send request to Reddit: error trying to connect: tcp connect error: Connection refused (os error 111)
Describe the bug
I'm running redlib in a docker container on my unraid server. It is behind an ipv4 nat, and is not port forwarded in any way. I'm reaching the instance through tailscale.
The instance has been throwing "Couldn't send request to Reddit: error trying to connect: tcp connect error: Connection refused (os error 111)" errors with the post path attached at the end. I'm not sure how long this has been happening because a page refresh or two always fixes it.
I would like to ask whether this is a well known bug/a configuration issue on my end, or if it isn't, how I can help in solving it. Thanks.
Steps to reproduce the bug
- click on redlib link / reload redlib site
- find error message randomly
What's the expected behavior?
no error message at all
Additional context / screenshot
- [x] I checked that the instance that this was reported on is running the latest git commit, or I can reproduce it locally on the latest git commit
now a reload doesn't fix it, the instance is completely unusable. i'm on the latest version.
Can you visit reddit.com on this server at all? Try running curl -vvvLI "https://www.reddit.com"
thanks. in the meantime, it started working again.
i tried that command, and it seems like reddit is being resolved to 0.0.0.0. turns out i accidentally had reddit.com blocked in my dns resolver config for the server.
what i can not fathom though, is how it reached reddit if there was a dns level block. it didn't even occur to me that i might be blocking reddit there because it just shouldn't work if that were the case. anyways, i removed the dns block, and will update here if the problem continues.
interestingly, while nslookup and curl fails and tells me reddit.com is 0.0.0.0, ping works without any issues. i guess it was some sort of weird dns caching thing, but i still don't get it.