OpenSuSE 13.1: `named` service fails during start most likely because of `zypper update`


**slave:/var/lib/named #** rcnamed start && rcnamed status
redirecting to systemctl start named.service
Checking for nameserver BIND                                                                                                                                                                                                       **dead**
named.service - LSB: Domain Name System (DNS) server, named
   Loaded: loaded (/etc/init.d/named)
   Active: **active (exited)** (Result: exit-code) since Mon 2014-08-25 08:34:45 CEST; 1h 1min ago
  Process: 6259 ExecStop=/etc/init.d/named stop (code=exited, status=0/SUCCESS)
  Process: 6581 ExecReload=/etc/init.d/named reload **(code=exited, status=1/FAILURE)**
  Process: 6292 ExecStart=/etc/init.d/named start (code=exited, status=6)


**slave:/var/lib/named #** ls -al
total 12
drwxr-xr-x   1 root  root   140 Aug 16 21:40 **.**
drwxr-xr-x   1 root  root   330 Aug 24 14:15 **..**
-rw-r--r--   1 root  root   192 Nov 19  2009 127.0.0.zone
drwxr-xr-x   1 root  root    20 Aug 16 16:54 **dev**
drwxr-xr-x   1 named named    0 Feb 12  2014 **dyn**
drwxr-xr-x   1 root  root   110 Aug 25 08:34 **etc**
drwxr-xr-x   1 root  root    14 Aug 16 21:40 **lib64**
-rw-r--r--   1 root  root   182 Nov 19  2009 localhost.zone
drwxr-xr-x   1 named named  138 Aug 16 21:40 **log**
drwxr-xr-x   1 root  root     0 Feb 12  2014 **master**
dr-xr-xr-x 125 root  root     0 Aug 24 11:17 **proc**
-rw-r--r--   1 root  root  3048 Feb 12  2014 root.hint
drwxr-xr-x   1 named named  120 Aug 17 19:53 **slave**
drwxr-xr-x   1 root  root    18 Aug 16 16:54 **var**

How can I research the (code=exited, status=6) result?
I tried finding the cause in /var/lib/named/log and /var/log/* without success.

The odd thing is that named did run well last week, but it died after installing a few more packages to get it configured through YaST2; I bolded the packages I think are relevant (thanks to https://www.suse.com/communities/conversations/zypper-equivalent-of-rug-history-command/):


**slave:/var/lib/named #** cut -d "|" -f 1-4 -s --output-delimiter " | " /var/log/zypp/history | grep -v " radd "
...
**2014-08-16 16:54:40 | install | bind-chrootenv | 9.9.4P2-2.8.1**
**2014-08-16 16:54:40 | install | bind | 9.9.4P2-2.8.1**
2014-08-16 17:05:49 | install | yast2-online-update-frontend | 3.0.0-2.1.4
2014-08-16 21:27:05 | install | yast2-sysconfig | 3.0.1-2.1.4
2014-08-23 21:46:15 | install | krb5 | 1.11.3-3.12.1
2014-08-23 21:46:15 | install | libopenssl1_0_0 | 1.0.1i-11.52.1
2014-08-23 21:46:16 | install | libpython2_7-1_0 | 2.7.6-8.14.1
2014-08-23 21:46:16 | install | libgcrypt11 | 1.5.4-2.4.1
2014-08-23 21:46:16 | install | openssl | 1.0.1i-11.52.1
2014-08-23 21:46:17 | install | python-base | 2.7.6-8.14.1
**2014-08-23 22:27:57 | install | yast2-dns-server | 3.0.1-2.1.4**
2014-08-23 22:27:57 | install | yast2-sudo | 3.0.0-2.1.4
2014-08-23 22:32:05 | install | yast2-runlevel | 3.0.1-1.1

It worked on the 22nd, as this DNS history shows (this machine is ns5.4delphi.com at **62.195.34.14 **and the only reason it is there is to play secondary DNS server): http://leafdns.com/index.cgi?testid=A074B455
The current report shows ns5.4delphi.com at 62.195.34.14 as unreachable (they also show ns1.4delphi.com as unreachable because the domain registrar f@!#$@$d up the GLUE record change from 82.161.132.169 to 80.100.143.119): http://leafdns.com/index.cgi?testid=F7E90DBE

Thanks for any help.

–jeroen

6 usually means an error in configuration files. BIND dumps debug in messages so;

egrep -i named /var/log/messages

And try to make yourself up-to-date by using systemctl commands. The rc* start/stop/status commands still work (as you see by translating them into systemctl syntax), but you never know for how long :wink:

Thanks for the tip.
I’m a relatively oldie so: Where to get up to speed on the systemctl commands?

(Gosh: why doesn’t this forum understand markdown? <g>)

–jeroen

Thats the thing there is no /var/log/messages (it’s a plain Minimal Server Selection box (screenshots are at the first page of The Perfect Server - OpenSUSE 13.1 x86_64 (Apache2, MySQL, PHP, Postfix, Dovecot and ISPConfig 3)) with only the essentials on it: it is going to be a server for a reason.


**slave:/var/lib/named #** egrep -i named /var/log/messages
egrep: /var/log/messages: No such file or directory

–jeroen

Install rsyslog and start it.

Running a server without a syslog service is just asking for problems, as you can see.

Well, isn’t

man systemctl

an obvious starting point?

And of course read about systemd: systemd and systemd - Wikipedia
and more.

I’m sensing a bit of RTFM here, however with chkconfig, I learned the hard way that some stuff doesn’t have an easy to find man page or explanatory page.

This seems to be especially true in the OpenSuSE world. Which is too bad, as when I started using SuSE in the 6.x age, it was far ahead of other distros and it is still a big reason for me to stick with the SuSE world.

So: I love staying with SuSE, but please allow me to goof up every now and then, OK?
In return, I will write up questions with as relevant details as I can come up with, and later summarize solutions on my http://wiert.me tech blog.

–jeroen

Thanks. I wasn’t expecting the OpenSuSE 13.1 install to skip that, as IIRC the 11.x install (wich I then upgraded step by step to 12.x) did contain it.
Back then, I did most configuration using YaST2, and I’m now rapidly trying to learn the console way.

The reason for to configure a secondary DNS server from scratch to document from step 1, as I didn’t fully do that back then (yes, learning is a life long experience).

After installing the syslog-service and dependencies, enabling and running it, there is a /var/log/messages with content.
So I did a less /var/log/messages after runing a systemctl start named.service and less showed this:


systemd[1]: Started LSB: Domain Name System (DNS) server, **named**.

Yup: nothing more, not in /var/lib/named/log either, so starting the service does seems to barf before it can actually start the named service.
What else should I look into?

Thanks for all the help so far.

–jeroen

You may want to restart the entire system so systemd and other services will properly log into it - right now it seems as if systemd isn’t writing the output properly into it (and thus, no errors)

Found it: during reboot, the actual message appeared, but much earlier in the log.
When trying to start named again, that same message is not repeated.

So after carefully going through the whole /var/log/messages, I found that it looks like the issue has to do with YaST2 adding logging to the named.conf inclusion tree, and I already had logging manually configured before installing the YaST2 named module **yast2-dns-server**.

Not sure yet if this is an EBCAK or something else.

I’ll research this further and add a reply with the full answer.

Thanks so far.

–jeroen

I think it wasn’t EBCAK. This is why:

I had logging organized similar to How to enable named/bind/DNS full logging? - Stack Overflow where an include file (which got loaded by include "/etc/named.conf.include"; in /etc/named.conf) has the logging configuration which directed some categories to certain files (but not all the categories like the StackOverflow answer shows).

What yast2-dns-server did was add this entry to /var/named.conf:

logging {
        category default { log_syslog; };
        channel log_syslog { syslog; };
};

This caused two logging clauses, which bind cannot handle (with good reason).

To fix this, after reading more on bind logging at http://www.zytrax.com/books/dns/ch7/logging.html I changed parts my logging include file from entries like:


    category xfer-in { xfer-in_file; };
    category xfer-out { xfer-out_file; };

to entries like:


    category xfer-in { xfer-in_file; log_syslog; };
    category xfer-out { xfer-out_file; log_syslog; };

And finally included this towards the bottom, and removed the logging section from /etc/named.conf:


        category default { log_syslog; };
        channel log_syslog { syslog; };
};

This means to log almost anything in syslog and certain categories into specific files for each category.

Thanks guys for all the directions and giving me the opportunity to learn a lot of new things.

–jeroen

On 2014-08-25 15:26, jpluimers wrote:
>
> Miuku;2661190 Wrote:
>> Install rsyslog and start it.
>>
>> Running a server without a syslog service is just asking for problems,
>> as you can see.
>
> Thanks. I wasn’t expecting the OpenSuSE 13.1 install to skip that, as
> IIRC the 11.x install (wich I then upgraded step by step to 12.x) did
> contain it.

If you used the “minimal server” pattern or similar wording, it contains
next to nothing. You have to add most packages manually - absurdly,
syslog :-/


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2014-08-25 11:46, hcvv wrote:
>
> And try to make yourself up-to-date by using systemctl commands. The rc*
> start/stop/status commands still work (as you see by translating them
> into systemctl syntax), but you never know for how long :wink:

The boss said something about keeping rc* in openSUSE for ever :wink:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Which I would kind of understand from a usability perspective: rc* has command-completion, whereas systemctl start *.servicehas not.

If you used the “minimal server” pattern or similar wording, it contains
next to nothing. You have to add most packages manually - absurdly,
syslog :-/

I’m glad more people are surprised about it (:

–jeroen

systemctl actually has completion but it requires packages that aren’t available in the minimal installation.

In a way I understand it but they should really name it “JeOS”, Just Enough OS because it’s really barebones install.

Actually Studio has JeOS and it has even less! It doesn’t even have zypper, it’s hardcore stuff for minimalistic systems :slight_smile:

Can you please elaborate on that?

… “JeOS”, Just Enough OS …
Actually Studio has JeOS and it has even less! It doesn’t even have zypper, it’s hardcore stuff for minimalistic systems :slight_smile:

Wow. JeOS isn’t for the faint of heart (:

I take it back, it should “just work”, you should have /usr/share/bash-completion/completions/ where there are systemctl, loginctl etc. files. The bash rules for it are defined in /etc/bash.bashrc.

f.ex. if I type systemctl start apa<tab> it’ll autocomplete the apache2.service for me.

On 2014-08-26 18:36, jpluimers wrote:
>
> robin_listas;2661307 Wrote:
>> The boss said something about keeping rc* in openSUSE for ever :wink:
> Which I would kind of understand from a usability perspective: rc* has
> command-completion, whereas systemctl start *.servicehas not.

Well, systemctl also has auto-completion, and more complex than the
rc-tab-tab variant. It needs certain files to be installed, though.

They said to keep the rc* files because they exist in many docs, scripts
that call them, people used to them… Compatibility, etc.

>> If you used the “minimal server” pattern or similar wording, it contains
>> next to nothing. You have to add most packages manually - absurdly,
>> syslog :-/
>
> I’m glad more people are surprised about it (:

There is a discussion now about this in the factory mail list. I
suggested to add a “rather complete text pattern”. It is difficult to
define what “server things” to add, because it depends on what you are
going to “serve”. Maybe you need apache but not dovecot, say.

But it should be easier to add a text pattern with a rather complete set
of tools and applications. Say mc, pine/mutt, vi/emacs/joe, complete man
and info pages, links/w3m, iptraf, top… who knows.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)