🐞 How to debug errors #1749
chaptergy
announced in
FAQs / Instructions
Replies: 2 comments
-
When trying to debug with |
Beta Was this translation helpful? Give feedback.
0 replies
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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, rundocker 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 runningdocker 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, rundocker 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 likeProxy 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, rundocker 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.
Beta Was this translation helpful? Give feedback.
All reactions