Suppress console output in PowerShell/Batch
· One min read
Powershell When exception is occured, Out-Null is actually not worked, so uses
Get-ChildItem aaa >$null 2>&1
Or in Powershell 3
Get-ChildItem aaa *>$null
Batch/Dos
dir aaa >nul 2>&1
Powershell When exception is occured, Out-Null is actually not worked, so uses
Get-ChildItem aaa >$null 2>&1
Or in Powershell 3
Get-ChildItem aaa *>$null
Batch/Dos
dir aaa >nul 2>&1
Intermittent 502 errors or after a few days If you run Pages on a system that uses systemd and tmpfiles.d, you may encounter intermittent 502 errors trying to serve Pages with an error similar to:
dial tcp: lookup gitlab.example.com on [::1]:53: dial udp [::1]:53: connect: no route to host"
GitLab Pages creates a bind mount inside /tmp/gitlab-pages-* that includes files like /etc/hosts. However, systemd may clean the /tmp/ directory on a regular basis so the DNS configuration may be lost.
echo 'x /tmp/gitlab-pages-*' >> /etc/tmpfiles.d/gitlab-pages-jail.conf
sudo gitlab-ctl restart gitlab-pages