Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🐞 How to debug errors #1749

Jan 11, 2022 · 3 comments · 2 replies
Discussion options

Here are some useful tips on how to start debugging an error.

For any error #

If you have any error, check whether the npm logs contain any useful information. You can check the logs of your npm container by running docker logs <npm-container-name>, of course replacing <npm-container-name> with the actual name of your npm container. If you do not know the container name of your npm instance, run docker ps and look for it. The name should be listed in the last column.

NPM admin page is staying blank or behaving weirdly #

If the NPM admin page is staying blank or behaving weirdly check your developer console to see if any errors are shown. Also try to clear your browser cache (not your cookies), refresh the page and see if the error persist.

Bad Gateway error when accessing the admin page #

If you receive a 502 Bad Gateway error when accessing the admin page and are unable to log in, it usually means your database is not available. Check if your database is up and running without errors. If you use a dockerized database, you can check the logs of your database by running docker logs <db-container-name>, of course replacing <db-container-name> with the actual name of your db container. If you do not know the container name of your database, run docker ps and look for the database container. The name should be listed in the last column.

Unable to access proxied app #

If you are not able to access a proxied app, make sure your app is actually accessible, e.g. an exposed port or the same docker network as npm. If you are using a hostname for your app, also try an IP-address instead.

Have a look at the logs of the specific proxy host. They are located inside the container at /data/logs/proxy-host-<id>_error.log and /data/logs/proxy-host-<id>_access.log. the <id> of the host can be found by clicking on the three dots next to the host in the proxy host list. The header of the opened menu should be something like Proxy Host #6, 6 being the id. The error log contains only logs of errors that occurred, while the access log contains all requests handled by the proxy.

Cloudflare could also be causing issues. Check if you are able to access the app when you disable Cloudflare.

Unable to create or renew certificate #

If you are not able to create or renew certificates make sure that port 80 is forwarded in your router. This does not apply when using a DNS challenge. But make sure to mention whether you are using a DNS challenge or not.
You should also check the Letsencrypt logs to see if it contains any useful information. You can get the logs by running docker exec <npm-container-name> cat /var/log/letsencrypt/letsencrypt.log, of course replacing <npm-container-name> with the actual name of your npm container. If you do not know the container name of your npm instance, run docker ps and look for it. The name should be listed in the last column.
Please also note if you use a service like duckdns or other services where you only have a subdomain, creating a certificate for this subdomain might fail due to a fair use limit by letsencrypt. See #1350 (comment).
A frequent source of errors is Cloudflare, so if you use the Cloudflare service, try disabling it and see if certificate creation / renewal works then.


Please do not post your errors in the comments of this discussion. Check for similar issues (open or closed) instead, or open a new issue if the existing issues could not resolve the problem.

You must be logged in to vote

Replies: 3 comments 2 replies

Comment options

When trying to debug with docker logs, I have an
[Global ] › ⬤ debug CMD: /usr/sbin/nginx -t -g "error_log off;"
Where should nginx error_log should be set to on?

You must be logged in to vote
2 replies
Comment options

@dirad did you figure out how to enable 'error_log'?

Comment options

no, if i recall i found a way around my issue
But my next guess would be to go into the docker instance and go to /etc/nginx ...

Comment options

Please implement a logs feature right in the web Ui. We would like to know the originating IP for example, so we can easily create access lists.

You must be logged in to vote
0 replies
Comment options

to turn log on for particular proxy host would be nice, in the current version the manager generates
access_log /data/logs/proxy-host-15_access.log proxy;
error_log /data/logs/proxy-host-15_error.log warn;

and I can not override it either., sometimes need to debug headers and securuty

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /