You are not logged in.
Hi,
I recently installed scrotwm and noticed that it was unresponsive for about four minutes after login. I asked about this on the scrotwm-forums, and it seems that my hostname 'archdesktop' cannot be resolved and that this causes the problem.
What I find remarkable is that 'ping -c1 archdesktop' causes no problems but 'nslookup archdesktop' responds with '** server can't find archdesktop: NXDOMAIN' (see commands below).
Here are the relevant .conf-files:
/etc/rc.conf: *link removed*
/etc/hosts: *link removed*
/etc/resolv.conf: *link removed* (dynamically generated by dhcpcd daemon)
Does anyone have a clue on how to proceed in this case?
Many thanks in advance,
Turris
$ ping -c1 localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=1 ttl=64 time=0.016 ms
--- localhost.localdomain ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/0.016/0.016/0.000 ms$ ping -c1 archdesktop
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_req=1 ttl=64 time=0.016 ms
--- localhost.localdomain ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.016/0.016/0.016/0.000 ms$ nslookup localhost
Server: 195.130.130.5
Address: 195.130.130.5#53
Name: localhost
Address: 127.0.0.1$ nslookup archdesktop
Server: 195.130.130.5
Address: 195.130.130.5#53
** server can't find archdesktop: NXDOMAIN$ host localhost
host: convert UTF-8 textname to IDN encoding: prohibited character found$ host archdesktop
host: convert UTF-8 textname to IDN encoding: prohibited character foundLast edited by Turris (2011-11-17 10:08:03)
Offline
what does:
grep ^hosts /etc/nsswitch.conf
give you?
Offline
what does:
grep ^hosts /etc/nsswitch.conf
give you?
$ grep ^hosts /etc/nsswitch.conf
hosts: files dnsOffline
The reason ping works but nslooking does not is because ping will attempt attempt to resolve the hostname from each source defined within /etc/nsswitch.conf. nslookup will only query the DNS server. For whatever reason, the hostname is not being registered with your DNS server when a DHCP lease is accepted, but I suspect this is a separate issue.
I'd start by ensuring that both the hostname and FQDN of this machine are defined within /etc/hosts. You can check this with:
hostname; hostname --fqdnAnd your /etc/hosts should look like:
[...]
127.0.0.1 myhost myhost.mydomain localhost.localdomain localhost
[...]Offline
I changed my /etc/hosts:
127.0.0.1 archdesktop.localdomain localhost.localdomain archdesktop localhost
::1 localhost.localdomain localhost$ hostname; hostname --fqdn
archdesktop
archdesktop.localdomain$ nslookup archdesktop
Server: 195.130.130.5
Address: 195.130.130.5#53
** server can't find archdesktop: NXDOMAINAnd scrotwm keeps being unresponsive the first minutes after login.
I assume that your explanation regarding the differences between ping and nslookup may explain why Openbox works perfectly and scrotwm is unresponsive after login?
Offline
I've never used scrotwm, but if it's trying to perform lookups in that manner then it's doing something very wrong. I can't think of any other reason why a lookup might be failing.
From here I'd be looking to log in straight to an xterm (no WM initially) and try running strace against scrotwm ('$ strace scrotwm'?) to see if that'll reveal where it's hanging.
Offline
I did what you suggested, however, scrotwm was immediately responsive! I experienced this before (when booting in runlevel 3 and then issuing startx it works!). If I get some time on my hands I'll put an strace in ~/.xinitrc and see what the log reveals.
Edit:
I put an strace in front of scrotwm in my ~/.xinitrc. I compared the (two) logs I got to the log of the strace mentioned above. I compared the logs in Meld.
I'm not used to debugging with strace, but I noticed the logs of scrotwm started via ~/.xinitrc contained a lot more(125 compared to 1 for one random fragment) of these messages:
read(3, "\34\0\355\2\4\0\300\0S\1\0\0(y\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32
read(3, 0xe63b24, 4096) = -1 EAGAIN (Resource temporarily unavailable)
read(3, 0xe63b24, 4096) = -1 EAGAIN (Resource temporarily unavailable)It is still a mystery to me why nslookup doesn't resolve my hostname, and why scrotwm is sensitive to this and other WM's (Openbox, i3) not.
I'm using i3 now, so this issue can be considered closed.
Last edited by Turris (2011-11-12 17:21:07)
Offline