To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
My web server is (include version): Nginx 1.14.0
The operating system my web server runs on is (include version): Ubuntu 18.04 LTS
My hosting provider, if applicable, is: Microsoft Azure
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): yes (azure portal)
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): 0.28.0
Error: Failed to lookup view "error" in views directory "/home/adminapp/diabetic-backend/views"
at Function.render (/home/adminapp/diabetic-backend/node_modules/express/lib/application.js:580:17)
at ServerResponse.render (/home/adminapp/diabetic-backend/node_modules/express/lib/response.js:1008:7)
at app.use (/home/adminapp/diabetic-backend/server.js:59:9)
at Layer.handle_error (/home/adminapp/diabetic-backend/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:315:13)
at /home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:335:12)
at next (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:275:10)
at app.use (/home/adminapp/diabetic-backend/server.js:48:5)
at Layer.handle [as handle_request] (/home/adminapp/diabetic-backend/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:317:13)
at /home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:335:12)
at next (/home/adminapp/diabetic-backend/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/home/adminapp/diabetic-backend/node_modules/serve-static/index.js:121:7)
at emitOne (events.js:116:13)
at SendStream.emit (events.js:211:7)
at SendStream.error (/home/adminapp/diabetic-backend/node_modules/send/index.js:270:17)
at SendStream.onStatError (/home/adminapp/diabetic-backend/node_modules/send/index.js:421:12)
at next (/home/adminapp/diabetic-backend/node_modules/send/index.js:736:16)
at onstat (/home/adminapp/diabetic-backend/node_modules/send/index.js:725:14)
at FSReqWrap.oncomplete (fs.js:152:21)
So it looks that your error handling was wrong - and now it returns a refused.
i have opened the port 80 and 443 as well. so i think firewall is not the issue anymore.
when it shows error: failed to lookup view “error” that must be my false error handling. you dont have to worry about it. I have turn off the server and it should not show this output anymore.
from what I know, I need to turn off the server first so certbot can bind the 80 port. Is this right?
If you use standalone, yes, you have to stop your running webserver. But then it's impossible to check your configuration, because this is a temporary running webserver.
So using a running webserver and webroot allows better debugging and tests.