Issue w/ nginx after updating

Hello :wave: - I just updated my installation today but, I encountered the following error, and it keeps repeating. I’m unable to access the site but, it looks like this should have been fixed earlier this year? These two posts seem to have the same issue, but I’m not sure what changed to break this again.

https://meta.discourse.org/t/discourse-updated-from-admin-not-working-after-rebuild-fatal-502-error-after-rebuild/200443?u=cookieman768

nginx: [emerg] host not found in set_real_ip_from "131.0.72.0/222400:cb00::/32" in /etc/nginx/conf.d/discourse.conf:116

Has anyone else encountered this? I’m just not sure what the fix would be unless something changed with Cloudflare yet again.

1 Like

I would say to make cloudflare dns only or at least disable all optimization.

Next

cd /var/discourse
git pull 

And see if it succeeds.

2 Likes

So, like change it on cloudflare to be DNS only?

1 Like

Hmm, yeah - it looks like the nginx: [emerg] host not found in set_real_ip_from "131.0.72.0/222400:cb00::/32" in /etc/nginx/conf.d/discourse.conf:116 is still being spammed in the logs even after setting Cloudflare to DNS only. If anyone has other troubleshooting ideas, I’m all for it! :slight_smile:

EDIT: I think I found the culprit - there was a custom commands section at the end of my app.yml it looks like in newer installs this is handled by the template. I’m commenting it out and using the template.

EDIT 2: Yeah, it looks like I installed Discourse before the template came out so my template was in the app.yml, simply removing it from the app.yml and using the template fixed it. Thank you for the help @pfaffman!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.