nslookup funciona, mas o ping falha com erro de DNS aleatoriamente [fechado]

1

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!

    
por Supratik 24.02.2014 / 13:59

1 resposta

2

Você conhece como o mDNS é diferente do DNS regular e regular? Não tentando ser rude, mas eu queria salientar que eles são dois sistemas diferentes tentando resolver problemas semelhantes, mas é importante não confundir os dois.

Então, para responder à sua pergunta, parece que você está conectado a várias redes e está recebendo respostas conflitantes ou não frequentes por meio de mdns. Especificamente, a partir de seus arquivos de log, você obtém respostas mdns indicando 172.16.2.176 para api-beta.mydomain.com na interface 192.168.1.2 - o que não parece fazer muito sentido.

nslookup deve consultar diretamente um servidor DNS para sua resposta e desde que você indicou que estava funcionando corretamente, eu suspeito que mdns é simplesmente confundir tudo. Eu recomendo que você desative a resolução unicast mdns usando as seguintes instruções da apple:

http://support.apple.com/kb/HT3789

Espero que isso funcione! Boa sorte

    
por 24.02.2014 / 14:14