samba 4.10.7へアップデートしたあと、「systemctl status samba-ad-dc.service」で出力されるログを見てみたら、微妙な感じのエラーがあった。
1 | 8月 29 08:54:02 adserver samba[107156]: [2019/08/29 08:54:02.287210, 0] ../../lib/util/util_runcmd.c:327(samba_runcmd_io_handler) |
2 | 8月 29 08:54:02 adserver samba[107156]: /usr/local/samba/sbin/samba_dnsupdate: ImportError: No module named dns.resolver |
3 | 8月 29 08:54:02 adserver samba[107156]: [2019/08/29 08:54:02.295161, 0] ../../source4/dsdb/dns/dns_update.c:331(dnsupdate_nameupdate_done) |
4 | 8月 29 08:54:02 adserver samba[107156]: dnsupdate_nameupdate_done: Failed DNS update with exit code 1 |
5 | 8月 29 08:54:03 adserver winbindd[107159]: [2019/08/29 08:54:03.430795, 0] ../../source3/winbindd/winbindd_cache.c:3166(initialize_winbindd_cache) |
6 | 8月 29 08:54:03 adserver winbindd[107159]: initialize_winbindd_cache: clearing cache and re-creating with version number 2 |
7 | 8月 29 08:54:03 adserver smbd[107151]: [2019/08/29 08:54:03.438943, 0] ../../lib/util/become_daemon.c:136(daemon_ready) |
8 | 8月 29 08:54:03 adserver smbd[107151]: daemon_ready: daemon 'smbd' finished starting up and ready to serve connections |
9 | 8月 29 08:54:03 adserver winbindd[107159]: [2019/08/29 08:54:03.454411, 0] ../../lib/util/become_daemon.c:136(daemon_ready) |
10 | 8月 29 08:54:03 adserver winbindd[107159]: daemon_ready: daemon 'winbindd' finished starting up and ready to serve connections |
「samba_dnsupdate: ImportError: No module named dns.resolver」の対応
現状の確認方法
1 | [root@adserver ~]# samba_dnsupdate --verbose |
2 | Traceback (most recent call last): |
3 | File "/usr/local/samba/sbin/samba_dnsupdate", line 57, in <module> |
5 | ImportError: No module named dns.resolver |
原因はpythonのDNS toolkitがインストールされていないこと。
CentOS7環境で対処するには「yum search dnspython」を実行してモジュール名を確認
1 | [root@adserver ~]# yum search dnspython |
2 | 読み込んだプラグイン:fastestmirror |
3 | Determining fastest mirrors |
7 | * updates: ftp.riken.jp |
8 | =============================== 一致: dnspython ================================ |
9 | python-dns.noarch : DNS toolkit for Python |
10 | python36-dns.noarch : DNS toolkit for Python 3 |
今回使っている環境はpython 2環境なので、「yum install python-dns」でインストール。
1 | [root@adserver ~]# yum install python-dns.noarch |
2 | 読み込んだプラグイン:fastestmirror |
3 | Loading mirror speeds from cached hostfile |
4 | epel/x86_64/metalink | 7.3 kB 00:00 |
8 | * updates: ftp.riken.jp |
12 | packages-microsoft-com-prod | 2.9 kB 00:00 |
14 | (1/3): epel/x86_64/updateinfo | 998 kB 00:02 |
15 | (2/3): packages-microsoft-com-prod/primary_db | 200 kB 00:00 |
16 | (3/3): epel/x86_64/primary_db | 6.8 MB 00:03 |
18 | --> トランザクションの確認を実行しています。 |
19 | ---> パッケージ python-dns.noarch 0:1.12.0-4.20150617git465785f.el7 を インスト ール |
24 | ================================================================================ |
28 | ================================================================================ |
30 | python-dns noarch 1.12.0-4.20150617git465785f.el7 base 233 k |
33 | ================================================================================ |
40 | python-dns-1.12.0-4.20150617git465785f.el7.noarch.rpm | 233 kB 00:00 |
41 | Running transaction check |
42 | Running transaction test |
43 | Transaction test succeeded |
45 | インストール中 : python-dns-1.12.0-4.20150617git465785f.el7.no 1/1 |
46 | 検証中 : python-dns-1.12.0-4.20150617git465785f.el7.no 1/1 |
49 | python-dns.noarch 0:1.12.0-4.20150617git465785f.el7 |
動作確認・・・
1 | [root@adserver ~]# samba_dnsupdate --verbose |
3 | Looking for DNS entry A adserver.adosakana.local 172.17.44.49 as adserver.adosakana.local. |
4 | Looking for DNS entry NS adosakana.local adserver.adosakana.local as adosakana.local |
6 | Checking 0 100 389 adserver.adosakana.local. against SRV _ldap._tcp.Default-First-Site-Name._sites.ForestDnsZones.adosakana.local adserver.adosakana.local 389 |
それ以外のログについて
samba_dnsupdateに関するエラーについて対処した後、sambaを再起動してログを見てみると、下記の様な感じになっていた。
1 | 8月 29 09:06:46 adserver samba[107294]: [2019/08/29 09:06:46.991243, 0] ../../source4/smbd/server.c:773(binary_smbd_main) |
2 | 8月 29 09:06:46 adserver samba[107294]: binary_smbd_main: samba: using 'standard' process model |
3 | 8月 29 09:06:47 adserver samba[107294]: [2019/08/29 09:06:47.021548, 0] ../../lib/util/become_daemon.c:136(daemon_ready) |
4 | 8月 29 09:06:47 adserver samba[107294]: daemon_ready: daemon 'samba' finished starting up and ready to serve connections |
5 | 8月 29 09:06:49 adserver winbindd[107312]: [2019/08/29 09:06:49.157089, 0] ../../source3/winbindd/winbindd_cache.c:3166(initialize_winbindd_cache) |
6 | 8月 29 09:06:49 adserver winbindd[107312]: initialize_winbindd_cache: clearing cache and re-creating with version number 2 |
7 | 8月 29 09:06:49 adserver winbindd[107312]: [2019/08/29 09:06:49.266323, 0] ../../lib/util/become_daemon.c:136(daemon_ready) |
8 | 8月 29 09:06:49 adserver winbindd[107312]: daemon_ready: daemon 'winbindd' finished starting up and ready to serve connections |
9 | 8月 29 09:06:50 adserver smbd[107311]: [2019/08/29 09:06:50.436561, 0] ../../lib/util/become_daemon.c:136(daemon_ready) |
10 | 8月 29 09:06:50 adserver smbd[107311]: daemon_ready: daemon 'smbd' finished starting up and ready to serve connections |
RHEL7だと上記出力を赤文字で出力してるけど、内容を見る限りではinformation的なものであるので、特に対処する必要はなさそうである。