Acabei de instalar o unbound em um novo VPS Ubuntu16.04 instalado. Para ter certeza, eu emiti um enable (que na verdade é feito automaticamente durante a instalação)
sytemctl enable unbound
Após a reinicialização, o servidor desvinculado falhou ao iniciar e o syslog mostra:
[...]
12:45:58 systemd[1]: Starting unbound.service...
12:45:58 unbound[1036]: * Starting DNS server unbound
12:50:58 systemd[1]: unbound.service: Start operation timed out. Terminating.
12:50:58 systemd[1]: Failed to start unbound.service.
12:50:58 systemd[1]: unbound.service: Unit entered failed state.
12:50:58 systemd[1]: unbound.service: Failed with result 'timeout'.
12:55:01 unbound-anchor: /var/lib/unbound/root.key has content
12:55:01 unbound-anchor: success: the anchor is ok
[...]
Além disso, "journalctl" para a última inicialização mostra mais informações:
[...]
12:50:58 systemd[1]: unbound.service: Start operation timed out. Terminating.
12:50:58 systemd[1]: Failed to start unbound.service.
12:50:58 systemd[1]: Dependency failed for Host and Network Name Lookups.
12:50:58 systemd[1]: nss-lookup.target: Job nss-lookup.target/start failed with result 'dependency'.
12:50:58 systemd[1]: unbound.service: Unit entered failed state.
12:50:58 systemd[1]: unbound.service: Failed with result 'timeout'.
12:50:58 systemd[1]: Reached target Multi-User System.
[...]
Quando depois eu emito manualmente
systemctl start unbound
Em seguida, unbound inicia conforme o esperado e o syslog mostra:
12:58:32 systemd[1]: Starting unbound.service...
12:58:32 unbound[1268]: * Starting DNS server unbound
12:58:34 unbound-anchor: /var/lib/unbound/root.key has content
12:58:34 unbound-anchor: success: the anchor is ok
12:58:34 unbound: [1284:0] notice: init module 0: validator
12:58:34 unbound: [1284:0] notice: init module 1: iterator
12:58:34 unbound: [1284:0] info: start of service (unbound 1.5.8).
12:58:34 unbound[1268]: ...done.
12:58:34 systemd[1]: Started unbound.service.
O problema parece estar relacionado a "nss-lookup", e eu suspeito que a interface de rede não está disponível rápido o suficiente, mas por enquanto eu não sei como resolver isso.
Tags systemd ubuntu ubuntu-16.04 unbound