<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>37622</bug_id>
          
          <creation_ts>2019-12-13 14:29:48 +0300</creation_ts>
          <short_desc>unbound.service failed при первом запуске</short_desc>
          <delta_ts>2020-05-27 11:47:17 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Distributions</classification>
          <product>Branch p9</product>
          <component>unbound</component>
          <version>не указана</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Makeenkov">amakeenk</reporter>
          <assigned_to name="Leontiy Volodin">lvol</assigned_to>
          
          
          <qa_contact name="qa-p9@altlinux.org">qa-p9</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>186308</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2019-12-13 14:29:48 +0300</bug_when>
    <thetext>При первом запуске сервиса возникает ошибка:

# systemctl start unbound
Job for unbound.service failed because the control process exited with error code.
See &quot;systemctl status unbound.service&quot; and &quot;journalctl -xe&quot; for details.

Но при этом сам сервис запускается:

# systemctl status unbound
● unbound.service - Unbound recursive Domain Name Server
   Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-12-13 14:23:01 MSK; 1s ago
  Process: 3348 ExecStartPre=/usr/sbin/unbound-anchor (code=exited, status=0/SUCCESS)
  Process: 3349 ExecStartPre=/bin/chown _unbound /var/lib/unbound/root.key (code=exited, status=0/SUCCESS)
  Process: 3350 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)
  Process: 3351 ExecStart=/usr/sbin/unbound (code=exited, status=0/SUCCESS)
 Main PID: 3352 (unbound)
    Tasks: 1 (limit: 3572)
   Memory: 5.8M
   CGroup: /system.slice/unbound.service
           └─3352 /usr/sbin/unbound

дек 13 14:23:01 20191213-server-9-x86-64-office systemd[1]: Starting Unbound recursive Domain Name Server...
дек 13 14:23:01 20191213-server-9-x86-64-office unbound-checkconf[3350]: unbound-checkconf: no errors in /var/lib/unbound/unbound.conf
дек 13 14:23:01 20191213-server-9-x86-64-office systemd[1]: Started Unbound recursive Domain Name Server.
дек 13 14:23:01 20191213-server-9-x86-64-office unbound[3352]: [3352:0] notice: init module 0: validator
дек 13 14:23:01 20191213-server-9-x86-64-office unbound[3352]: [3352:0] notice: init module 1: iterator
дек 13 14:23:02 20191213-server-9-x86-64-office unbound[3352]: [3352:0] info: start of service (unbound 1.9.4).

Скорее всего это происходит из-за того, что команда unbound-anchor (ExecStartPre=/usr/sbin/unbound-anchor) при первом запуске завершается с кодом 1.

Например (первый запуск команды):
# unbound-anchor -v
/var/lib/unbound/root.key does not exist
success: the anchor is ok
# echo $?
1

При повторном запуске код выхода равен нулю и сервис запускается без ошибок.

Версия 1.9.4-alt1 (также воспроизводится и в версии 1.9.6-alt1 из задания 242856).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189878</commentid>
    <comment_count>1</comment_count>
    <who name="Leontiy Volodin">lvol</who>
    <bug_when>2020-05-12 17:14:08 +0300</bug_when>
    <thetext>Попробуйте версию 1.9.6-alt3 из задания 251597.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190341</commentid>
    <comment_count>2</comment_count>
    <who name="Leontiy Volodin">lvol</who>
    <bug_when>2020-05-27 11:34:08 +0300</bug_when>
    <thetext>(Ответ для Leontiy Volodin на комментарий #1)
&gt; Попробуйте версию 1.9.6-alt3 из задания 251597.

В p9 уже пришла версия 1.10.2-alt1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>190343</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2020-05-27 11:47:17 +0300</bug_when>
    <thetext>Ошибка исправлена.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>