You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bin/logs Script Fails to Display Logs on Host, Logs Only Accessible Inside Container Description #363
I am using the Overleaf Toolkit to deploy Overleaf Community Edition (CE) via Docker. When attempting to view logs using the bin/logs script on the host machine (e.g., bin/logs -f web), the output is blank. However, I can find and view the log files (e.g., /var/log/overleaf/web.log) inside the container's shell after executing bin/shell. This indicates that logs are being generated but are not accessible via the bin/logs script as expected.
This issue hinders debugging and monitoring from the host machine, as I must manually enter the container to access logs. I believe this could be a configuration or scripting issue with the Toolkit's log retrieval mechanism.
as6325400@overleaf:~/overleaf-toolkit$ bin/logs web
as6325400@overleaf:~/overleaf-toolkit$ sudo bin/shell
root@60fd7209b119:/overleaf# ls -l /var/log/overleaf
total 220
-rw-r--r-- 1 root root 348 May 29 12:06 chat.log
-rw-r--r-- 1 root root 22994 May 29 12:06 clsi.log
-rw-r--r-- 1 root root 356 May 29 12:06 contacts.log
-rw-r--r-- 1 root root 808 May 29 13:05 cron-deactivate-projects.log
-rw-r--r-- 1 root root 404 May 29 12:20 cron-delete-projects.log
-rw-r--r-- 1 root root 772 May 29 12:15 cron-delete-users.log
-rw-r--r-- 1 root root 2868 May 29 13:00 cron-project-history-periodic-flush.log
-rw-r--r-- 1 root root 3232 May 29 12:06 docstore.log
-rw-r--r-- 1 root root 872 May 29 12:06 document-updater.log
-rw-r--r-- 1 root root 3530 May 29 12:06 filestore.log
-rw-r--r-- 1 root root 3856 May 29 12:06 history-v1.log
-rw-r--r-- 1 root root 1034 May 29 12:06 notifications.log
-rw-r--r-- 1 root root 370 May 29 12:06 project-history.log
-rw-r--r-- 1 root root 782 May 29 12:45 project-history-retry-hard.log
-rw-r--r-- 1 root root 743 May 29 12:30 project-history-retry-soft.log
-rw-r--r-- 1 root root 10829 May 29 12:38 real-time.log
-rw-r--r-- 1 root root 7102 May 29 12:38 web-api.log
-rw-r--r-- 1 root root 121835 May 29 13:01 web.log
root@60fd7209b119:/overleaf#
I discovered that the reason bin/logs produced no output was because I didn't use sudo.
The command at line 81 suppresses all errors using 2>/dev/null || true, which also hides permission denied messages.
This made it harder to understand what went wrong.
Is there a reason why this line swallows all errors silently?
Activity
mserranom commentedon May 30, 2025
Would you mind sharing the output of running
bin/doctor? This would help with diagnosing the issue.as6325400 commentedon May 30, 2025
as6325400 commentedon Jun 2, 2025
I discovered that the reason bin/logs produced no output was because I didn't use sudo.
The command at line 81 suppresses all errors using 2>/dev/null || true, which also hides permission denied messages.
This made it harder to understand what went wrong.
Is there a reason why this line swallows all errors silently?