Estou usando o Mac OS X 10.6.8. Quando eu tento pingar um domínio em particular, ele me retorna "Host desconhecido", mas quando executo o nslookup no mesmo host imediatamente, ele me retorna o IP correto.
O ping continua a gerar o erro de DNS por quase um minuto e depois se recupera automaticamente.
Eu olhei em /var/log/system.log do meu sistema e encontrei as entradas abaixo registradas no momento da falha. Eu usei os seguintes comandos para obter os logs de depuração.
"killall -USR1 mDNSResponder"
"killall -USR2 mDNSResponder"
"killall -INFO mDNSResponder"
Entradas de registro durante falha:
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Adding FD for uid 501\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceCreateConnection START\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 created 00000000 00000001\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(5000, 0, api-beta.mydomain.com., Addr) START\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 closed 00000000 00000001 (0)\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) ADD 0 api-beta.mydomain.com. Addr \
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Cancel 00000000 00000001\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) STOP\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 created 00000000 00000002\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(5000, 0, api-beta.mydomain.com., Addr) START\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 closed 00000000 00000002 (0)\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) ADD 0 api-beta.mydomain.com. Addr \
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Cancel 00000000 00000002\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) STOP\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceCreateConnection STOP\
Feb 24 12:50:25 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Removing FD\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 sudo[3675]: administrator : TTY=ttys004 ; PWD=/Users/administrator ; USER=root ; COMMAND=/usr/bin/killall -INFO mDNSResponder\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: ---- BEGIN STATE LOG ---- mDNSResponder mDNSResponder-258.21 (May 26 2011 14:40:13)\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: Timenow 0x91434D92 (-1857860206)\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: ------------ Cache -------------\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: Slt Q TTL if U Type rdlen\
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: 28 269 -U- - AAAA 0 api-beta.mydomain.com. AAAA \
Feb 24 12:50:42 Administrators-MacBook-Pro-15 mDNSResponder[30]: 28 31 -U- - Addr 0 api-beta.mydomain.com. Addr \
As entradas abaixo são registradas após a recuperação de uma falha de DNS por um minuto.
Entradas de registro durante o sucesso:
Feb 24 12:52:55 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Adding FD for uid 501\
Feb 24 12:52:55 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceCreateConnection START\
Feb 24 12:52:55 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 created 00000000 00000001\
Feb 24 12:52:55 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(5000, 0, api-beta.mydomain.com., Addr) START\
Feb 24 12:52:55 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Error socket 30 closed 00000000 00000001 (0)\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: -- Sent UDP DNS Query (flags 0100) RCODE: NoErr (0) RD ID: 34816 29 bytes from port 62558 to 192.168.1.1:53 --\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 1 Questions\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 api-beta.mydomain.com. Addr\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 Answers\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 Authorities\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 Additionals\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: --------------\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: -- Received UDP DNS Response (flags 8180) RCODE: NoErr (0) RD RA ID: 34816 45 bytes from 192.168.1.1:53 to 192.168.1.2:62558 --\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 1 Questions\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 api-beta.mydomain.com. Addr\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 1 Answers\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 TTL 30 4 api-beta.mydomain.com. Addr 172.16.2.176\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 Authorities\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 0 Additionals\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: --------------\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) ADD 4 api-beta.mydomain.com. Addr 172.16.2.176\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Cancel 00000000 00000001\
Feb 24 12:52:56 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceQueryRecord(api-beta.mydomain.com., Addr) STOP\
Feb 24 12:52:59 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: DNSServiceCreateConnection STOP\
Feb 24 12:52:59 Administrators-MacBook-Pro-15 mDNSResponder[30]: 29: Removing FD\
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: ---- BEGIN STATE LOG ---- mDNSResponder mDNSResponder-258.21 (May 26 2011 14:40:13)\
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: Timenow 0x9145AF41 (-1857704127)\
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: ------------ Cache -------------\
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: Slt Q TTL if U Type rdlen\
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: 28 113 -U- - AAAA 0 api-beta.mydomain.com. AAAA \
Feb 24 12:53:18 Administrators-MacBook-Pro-15 mDNSResponder[30]: 28 17 -U- Addr 4 api-beta.mydomain.com. Addr 172.16.2.176\
Isso está acontecendo de forma aleatória e eu posso reproduzir o caso todas as vezes, mas não consigo entender a causa do erro.
Alguém sabe por que o ping está falhando com o "host desconhecido" e como resolvê-lo?
Obrigado!