N1QL not working in the official Couchbase 4.0.0 CE AMI

I ended up reinstalling, but here’s a one possible way to fix without reinstalling: Is reinstall really the only way to fix hostname change?