Posts

Showing posts from November, 2020

CentOS 8 中安裝 chrome 環境

node:102799) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! /var/www/crawler/chromium/linux-800071/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md     at onClose (/snapshot/crawler/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)     at Interface.<anonymous> (/snapshot/crawler/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)     at Interface.emit (events.js:327:22)     at Interface.close (readline.js:424:8)     at Socket.onend (readline.js:202:10)     at Socket.emit (events.js:327:22)     at endReadableNT (_stream_readable.js:1224:12)     at processTicksAndRejections (internal/process/task_queues.js:84:21) (Use `crawler --trace-warnings ...` to show where the warning was created) (node:102799) UnhandledPromiseRejectionWarning: Unhandled

Sendmail high cpu usage on CentOS

最近某台主機的 sendmail 使用率偏高 影響到其他程式的執行效率 但我的主機沒有裝 sendmail 後來排除種種問題後發現跟 crontab 有直接的關係 先暫時關掉 crontab 並將餘孽 kill 掉 `top` 中就看不到 sendmail 這支 process 了 原本以為主機中了木馬或是病毒 用 rkhunter 掃了之後跟其他主機都正常 後來想說 sendmail CPU 使用率這麼高 因應該是信件卡住寄不出去之類的 就去查找 queue list 輸入 `mailq` 發現一堆 queue(但輸入 `mail` 卻顯示 No mail for root) 後來查看 /var/log/messages 看到一堆下方的錯誤訊息 `crond[1652]: No configuration file found at /root/.esmtprc or /etc/esmtprc` 查找了一下 esmtp 這個套件相依性跟之前安裝的 google-fluentd 有關 難怪其他主機都沒這個問題 解決方式很簡單 裝個 postfix 就真的解決了 `yum install postfix -y` 參考文章 No configuration file found at /root/.esmtprc or /etc/esmtprc