Bug 1216141 - "Servname not supported for ai_socktype" after /etc/services moved to /usr/etc/
Summary: "Servname not supported for ai_socktype" after /etc/services moved to /usr/etc/
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network (show other bugs)
Version: Current
Hardware: Other openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-11 13:47 UTC by Georg Pfuetzenreuter
Modified: 2023-10-12 10:06 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
strace (20.28 KB, text/plain)
2023-10-11 13:47 UTC, Georg Pfuetzenreuter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Pfuetzenreuter 2023-10-11 13:47:28 UTC
Created attachment 870096 [details]
strace

Hi,

trying to run `whois` on a recent Tumbleweed snapshot fails:

```
$ whois 88.208.74.89
getaddrinfo(whois.ripe.net): Servname not supported for ai_socktype
```

This seems to be a regression from /etc/services moving to /usr/etc, since 

```
# cp /usr/etc/services /etc/
```

mitigates the issue.

Note that I did not have any other file in /etc/services before the `cp` call.

It seems `nscd` is involved as well, since `whois` continues to work after removing `/etc/services` again for as long as I keep `nscd` running.

I will attach strace output of a failing `whois` operation in case it's useful.

Best,
Georg
Comment 1 Thorsten Kukuk 2023-10-12 09:59:29 UTC
whois works fine on my system.

Since you have an own copy of /etc/nsswitch.conf, I bet you have that misconfigured and /usr/etc lookup is disabled. Please enable that again, else it will of course not work.
Comment 2 Georg Pfuetzenreuter 2023-10-12 10:06:42 UTC
Hi,

I didn't recall modifying nsswitch, but upon opening it:

```
$ more /etc/nsswitch.conf
# bla bla bla
```

I suppose I created this at some point to suppress the enormous amount of "No such file or directory" log messages nscd is printing to the journal about the file not being found.

I now deleted the bogus `/etc/nsswitch.conf` and `whois` seems to operate even after `nscd` restarts.

Thank you for the hint!

I recall some other bug about the bogus log messages but cannot find it for reference.