You are not logged in.

#1 2013-02-10 15:20:09

oangelo
Member
Registered: 2013-02-10
Posts: 12

Ypbind, systemd and net-auto-wired problems

I have the following problem after boot:
YPBINDPROC_DOMAIN: Domain not bound
And can't login with any user!

I have to restart the ypbind so I can login.
I am using systemd and net-auto-wired.service to start my connection.
I think the problem is that the ypbind.service is being started before the network.

# journalctl | grep ypbind
Feb 10 14:36:00 qomplex000 ypbind[369]: Host name lookup failure

I can't find the problem, tried all kinds of configurations on
/usr/lib/systemd/system/ypbind.service
And no change.

I think there is a relation with this:
https://bugzilla.redhat.com/show_bug.cgi?id=632620

Offline

#2 2013-03-20 10:24:08

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

oangelo wrote:

I have the following problem after boot:
YPBINDPROC_DOMAIN: Domain not bound
And can't login with any user!

I have to restart the ypbind so I can login.

Same here. Seems like ypbind is started too early and can't hook to the ypserver. Meanwhile as a workaround I use initscripts and placed a

systemctl restart ypbind.service

in rc.local. Ugly workaround, but it works wink

Maybe you could file a bug report?

Harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#3 2013-03-20 12:27:35

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

Ah, here's another not so ugly workaround: Put the code in rc.local but instead of using initscripts, use /usr/lib/systemd/system/rc-local.service in a pure systemd environment.

harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#4 2013-03-20 13:31:10

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

The best solution I could find, is using the script /etc/systemd/system/network.service found here https://wiki.archlinux.org/index.php/Dh … CP_at_boot.
It seems that net-auto-wired does not use network.target as it should. I tried rewriting it my self, but I couldn't make it work.
It's does seems like a bug, I was waiting to see if some one else would notice. :-)

Last edited by oangelo (2013-03-20 13:32:16)

Offline

#5 2013-03-20 14:30:58

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

oangelo wrote:

It's does seems like a bug, I was waiting to see if some one else would notice. :-)

This is definitely a bug. Please be so kind to file a bug report and post a link here.

Harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#6 2013-03-20 17:55:29

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

Offline

#7 2013-03-20 18:58:00

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

oangelo wrote:

Ok, I chimed in... By now I spent some hours on debugging this. It drives me nuts because it even won't work properly with initscripts installed. In one out of ten tries it works as expected. 'Tis a timing problem, I'm sure. I get YPBINDPROC_DOMAIN: Domain not bound. After a service restart all is well.

Edit: Seems to have found it. DNS is not working at the time ypbind starts. Resolving ypserver in the clients /etc/hosts works (at least for 3 consecutive times now...)

Last edited by Harey (2013-03-20 19:02:55)


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#8 2013-03-20 19:32:16

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

Yes, I  spent some time on this too.
I think that net-auto-wired.service should have lines like this:
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-net0.device
After=sys-subsystem-net-devices-net0.device

Since ypbind must start after network.target.
Net-auto-wired must depends on the network.target.
This should prevent network.target from starting before it should.
However, I don't remember why this did not work...

Last edited by oangelo (2013-03-20 19:33:09)

Offline

#9 2013-03-20 20:23:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Ypbind, systemd and net-auto-wired problems

I think it's worth noting here that netcfg will be deprecated sometime soon, in favour of netctl, so it's unlikely that netcfg bug reports will be actioned.

I suggest you check if this behaviour is still present in netctl, and if necessary post bug reports/patches/etc against it. netctl is currently in the testing repo.

Offline

#10 2013-03-20 23:26:54

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

I will try it. However, I think that netctl should be mentioned at https://wiki.archlinux.org/index.php/Ne … figuration.
In this way, people would try it before they get crazy about netcfg.

Offline

#11 2013-03-21 07:53:28

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

Sorry, folks but I believe this goes in the wrong direction. Ypbind simply relies on a network being set up completely, including working dns resolution. Systemd network target can't provide this. See http://www.freedesktop.org/wiki/Softwar … workTarget. This is at first a problem in the systemd service file, I believe. Using netcfg / netctl is not the culprit here. I fear switching to netctl won't fix this.

Harvey

Last edited by Harey (2013-03-21 07:55:09)


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#12 2013-03-21 11:44:59

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

Harvey, I don't think so. What I could undertand from the link you sent, is that one must configure the system in a way that network.target implements the dependencies. One can use the words "before" and "after", on *.sevice files, to make sure that the service will start on the right order.

Offline

#13 2013-03-21 12:04:40

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

oangelo wrote:

One can use the words "before" and "after", on *.sevice files, to make sure that the service will start on the right order.

But this does check only start but not completion of the started service. In our case dns is started and systemd moves on, not waiting for a valid dns configuration (but it takes a few seconds for dhcpd to put the nameserver in /etc/resolv.conf). The ypbind service gets started and tries to resolve a dns for ypserver from /var/yp.conf. Since the nameserver is not configured properly at this moment it gets no valid answer. Unfortunately ypbind seems not to be smart enough to retry ypserver and hangs. Thats the cause for 'YPBINDPROC_DOMAIN: Domain not bound'.

From the ypbind manpage:

This ypbind version listens for DBUS messages from NetworkManager. If no NetworkManager is running at startup, ypbind will behave as usual and assumes there is a working network connection. If NetworkManager is running on the system, ypbind will only search and provide NIS informations, if NetworkManager tells that a network connection is available. If NetworkManager establishes a connection, ypbind will reread all configuration files, registers at the local portmapper and try to search NIS servers. If NetworkManager drops a connection, ypbind will unregister from portmapper.

I don't use NetworkManager on these systems (because of keeping it simple, as a real archer).

Harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#14 2013-03-22 10:03:42

Harey
Member
From: Bavaria, Germany
Registered: 2007-03-24
Posts: 359

Re: Ypbind, systemd and net-auto-wired problems

The original idea was to define an alias in my dns server for the actual ypserver as 'ypserver.my.domain'. In case of changing servers due to whatever errors I only would have to change the alias to point to the new server and none of the clients would even recognize the server change.

This is not possible because of the herementioned errors with ypbind.service.

The next best solution now is to define more ypservers in yp client's yp.conf. This will get entries like 'ypserver xxx.xxx.xxx.xxx' with all possible ypserver's ip addresses in my domain. By using ipv4 addresses I avoid having to rely on working dns resolution and thus changing every client's /etc/hosts file. I only have to deploy this yp.conf to all clients and ypbind works like a charm with systemd.

Of course this is only a workaround, but it is the best that came to my mind.   
Hope this helps someone

Harvey


Linux is like a wigwam: No Gates, no Windows and an Apache inside

Offline

#15 2013-04-23 22:41:08

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Ypbind, systemd and net-auto-wired problems

I tried ypserv and couldn't get the thing to work, even when reading the ArchWiki.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#16 2013-04-23 22:59:50

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

I think this is the wrong place to post this question, here we were discussing another matter.
And you should be more specific about what you are trying to do...
Nis works very well for me!

Offline

#17 2013-04-24 01:14:13

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Ypbind, systemd and net-auto-wired problems

I was getting the same error messages, of domain not bound, and such.  It is possible I didn't have it setup correctly but the ypserver wasn't going along with the yp client.  I don't understand why the directory services want to go searching all over the internet for nis queries.  I just want it to stay on the local network, but it doesn't answer when I run yptest.  I had to fix a problem with mysql one time by modifying an entry in /etc/hosts.allow and /etc/hosts.deny, hopefully that's not the problem here.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#18 2013-04-24 12:59:59

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Ypbind, systemd and net-auto-wired problems

OpenBSD has their own implementation, but maybe a little more detailed in some ways as to the implementation of NIS: http://www.openbsd.org/faq/faq10.html
They aren't too crazy about the possible security problems it might pose: http://www.openbsd.org/papers/oreilly2000/page52.html
Which brings another question of how much I want to use something like ActiveDirectory across the Internet to save an authentication or two across forests. 

Anyhow, what did your contents of /var/yp look like?  Did it have a (none) directory?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#19 2013-04-24 13:21:52

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

Well, I have this on the server:

angelo@fiscomp:/var/yp$ ls
binding  fiscomp  Makefile  nicknames
angelo@fiscomp:/var/yp$ ls fiscomp/
group.bygid   hosts.byname     netgroup.byuser  passwd.byuid        rpc.byname       services.byservicename
group.byname  netgroup         netid.byname     protocols.byname    rpc.bynumber     shadow.byname
hosts.byaddr  netgroup.byhost  passwd.byname    protocols.bynumber  services.byname
angelo@fiscomp:/var/yp$ ls binding/
fiscomp.1  fiscomp.2
angelo@fiscomp:/var/yp$ cat nicknames 
passwd          passwd.byname
group           group.byname
networks        networks.byaddr
hosts           hosts.byname
protocols       protocols.bynumber
services        services.byname
aliases         mail.aliases
ethers          ethers.byname
angelo@fiscomp:/var/yp$ 

Actually the server is debian, only the nodes uses archlinux.
Still, everything works smooth.

I still don't know what is your problem! What is the output of yptest?
Are you sure the services are active? Have you tried: "systemctl list-units"?
See if there are any problems on the initialization with: "journalctl | grep ypbind"

Offline

#20 2013-04-24 14:21:50

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Ypbind, systemd and net-auto-wired problems

yptest

Test 1: domainname
Configured domainname is "xyz"

Test 2: ypbind
can't yp_bind: Reason: Domain not bound

I'm still getting (none) in /var/yp
If I use yptest -h <host>
Then I go through all 9 tests, 6 tests fail and Warning: Internal NIS error
On test 4, it gives Warning: RPC failure on NIS operation.

Last edited by nomorewindows (2013-04-24 14:31:36)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#21 2013-04-24 15:10:15

oangelo
Member
Registered: 2013-02-10
Posts: 12

Re: Ypbind, systemd and net-auto-wired problems

Are you running RPC bind?

systemctl enable rpcbind

Offline

#22 2013-04-24 19:45:15

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,362

Re: Ypbind, systemd and net-auto-wired problems

I already have rpcbind running for NFS.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB