[20191225]ntpd sendto(192.168.xxx.x) (fd=-1) Bad file descriptor.txt
[20191225]ntpd sendto(192.168.xxx.x) (fd=-1) Bad file descriptor.txt
--//今天使用rsyslog集中管理syslog日誌,發現一臺機器一些異常(主要發現該日誌檔案比別的機器大許多):
# grep "Bad file descriptor" *.log | tail -3
192.168.xxx.xxx_syslog.log:Dec 25 11:28:06 xxxxxxxxxx ntpd[93269]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
192.168.xxx.xxx_syslog.log:Dec 25 11:28:22 xxxxxxxxxx ntpd[93269]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
192.168.xxx.xxx_syslog.log:Dec 25 11:28:39 xxxxxxxxxx ntpd[93269]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
--//檢索發現如下連結:
--//裡面有1個提示:
A. If you are seeing Bad file descriptor errors in /var/log/messages, make sure that only one instance of ntpd is running.
# ps -ef | grep nt[p]
ntp 24786 1 0 11:25 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -x
root 93269 1 0 2015 ? 00:54:17 ntpd
--//很明顯啟動2個,而且有1個不知道那個傢伙在命令列上輸入的.執行的是ntpd(執行使用者是root),我自己手工模擬一次.
# ntpd
# ps -elf | grep nt[p]
5 S ntp 24786 1 0 80 0 - 4918 poll_s 11:25 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -x
5 S root 36129 1 0 80 0 - 4812 poll_s 11:32 ? 00:00:00 ntpd
5 S root 93269 1 0 80 0 - 4812 poll_s 2015 ? 00:54:17 ntpd
--//可以發現現在多了一行,解決這個問題很簡單,執行:
# kill -9 93269
# kill -9 36129
# ps -elf | grep nt[p]
5 S ntp 24786 1 0 80 0 - 4918 poll_s 11:25 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -x
# grep "Bad file descriptor" *.log | tail -3
192.168.xxx.xxx_syslog.log:Dec 25 11:33:01 xxxxxxxxxx ntpd[36129]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
192.168.xxx.xxx_syslog.log:Dec 25 11:33:03 xxxxxxxxxx ntpd[93269]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
192.168.xxx.xxx_syslog.log:Dec 25 11:33:18 xxxxxxxxxx ntpd[36129]: sendto(192.168.yyy.yyy) (fd=-1): Bad file descriptor
--//最後的出現問題時間是11:33:18不再變化.說明問題解決.
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*xx.xxxxxx. 5.79.108.34 3 u 4 16 7 0.323 0.152 0.181
--//做一個猜測可能對方想輸入ntpq,結果不小心輸入ntpd而導致的問題.也許這個人還是我^_^,說明做維護也要小心小心再小心.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2670434/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決“/bin/bash^M: bad interpreter: No such file or directory”
- 虛擬環境bin/python: bad interpreter: No such file or directoryPython
- -bash: ./switch.sh: /bin/bash^M: bad interpreter: No such file or directory
- 原創:java.lang.UnsupportedClassVersionError: Bad version number in .class fileJavaError
- 錯誤:-bash: ./how_paras.sh: /bin/bash^M: bad interpreter: No such file or directory
- shell指令碼編碼格式問題,bin/sh^M: bad interpreter: No such file or directory指令碼
- 發掘和利用ntpd漏洞
- [20191225]主鍵使用uuid優缺點.txtUI
- 字串函式 sha1_file ()字串函式
- Shell重定向&>file、2>&1、1>&2的區別
- Failed: error reading separator after document # 1: bad JSON array format - found no opening brackAIErrorJSONORM
- fd攔截請求,修改資料
- 演算法設計與分析(fd)演算法
- 《Google File System》讀書筆記(1)Go筆記
- CentOS RHEL 7 Chrony Vs NTP (Differences Between ntpd and chronyd).txtCentOS
- Bad magic number for central directory
- [BSidesCF 2020]Had a bad dayIDE
- HTTP Status 400 – Bad RequestHTTP
- linux phpmailer 502 Bad GatewayLinuxPHPAIGateway
- Docker Nginx 502 Bad getwayDockerNginx
- 高版本libc堆fd指標繞過指標
- [極客大挑戰 2019]Secret File 1
- Ubuntu插入行動硬碟後提示Wrong fs type,bad option,bad superblock on /devUbuntu硬碟BloCdev
- [MV] - You Give REST a Bad NameREST
- Who’s Afraid of Their Big Bad O?AI
- [Design Pattern] Upload big file - 1. Background & Solution overviewView
- CAN(FD)/LIN網路開發諮詢服務
- cannot use '/dev/da1': must be a block device or regular filedevBloC
- [Design Pattern] Upload big file - 3. Code Design - part 1
- CentOS/RHEL 7:Chrony vs NTP(ntpd和chronyd之間的差異)CentOS
- 解Bug之路-Nginx 502 Bad GatewayNginxGateway
- 400 Bad Request(錯誤請求)
- Nginx安裝啟動過程報錯libpcre.so.1 cannot open shared object file: No such file or directoryNginxObject
- cat > file << EOF 與 cat > file << -
- 執行py檔案 File "<stdin>", line 1 SyntaxError: invalid syntaxError
- 題解:AT_xmascon21_b Bad Mood
- [題解]ABC337E Bad JuiceUI
- PHP 介面呼叫報錯 502 Bad GatewayPHPGateway