Questions tagged [resolv]
25 questions
8
votes
2 answers
"Device or resource busy" when i try move /etc/resolv.conf in ubuntu:18.04. How fix it?
I have a VPN client in my Docker container (ubuntu:18.04).
The client must do the following:
mv /etc/resolv.conf /etc/resolv.conf.orig
Then the client should create new /etc/resolv.conf with their DNS servers. However, the move fails with an…

d.jok.er
- 79
- 1
- 1
- 2
3
votes
1 answer
Resolve AD Domain using /etc/resolv.conf in CentOS
I have configured SSSD using Realm to login into the centOS VM using the AD Credentials. Please refer the setup here
I had to modify the /etc/resolv.conf file to point the namserver to the AD Domain
Original /etc/resolv.conf file:
# Generated by…

Ajinkya
- 843
- 10
- 32
3
votes
1 answer
How to use Resolv::DNS::Resource::Generic
I would like to better understand how Resolv::DNS handles records that are not directly supported. These records are represented by the Resolv::DNS::Resource::Generic class, but I could not find documentation about how to get the data out of this…

Kevin Keane
- 1,506
- 12
- 24
2
votes
0 answers
Set timeout to Resolv to get ip address from a domain
BTW: I already take a look at others answers on SO, but none of them works as expected.
Take a look at the following code:
require 'resolv'
t = Time.now
Resolv::DNS.open do |dns|
dns.getaddress('thisisaninvaliddomain.com')
end
p Time.now -…

lcjury
- 1,158
- 1
- 14
- 26
2
votes
1 answer
More than 3 DNS server in ubuntu
I need to configure more than 3 DNS servers in "/etc/resolv.conf".
According to man, it is not supported so I have to recompile glibc
Up to MAXNS (currently 3) name servers may be listed, one per line. If there are multiple servers,
the resolver…

Emma92
- 55
- 1
- 5
2
votes
1 answer
DNS: retrieving host IP address using resolv.h
I'm trying to understand DNS queries using the resolv.h library in BIND.
I'm struggling trying to parse an IP address from RRs returned by ns_parserr().
I can successfully parse authoritative NS using the code provided by…

Giulio Paoli
- 85
- 11
2
votes
2 answers
How to disable and enable internet connection from within Docker container?
I am clearing /etc/resolv.conf to disable network :
sudo mv /etc/resolv.conf /etc/resolv_backup.conf
sudo touch /etc/resolv.conf
Then to enable network:
sudo mv /etc/resolv_backup.conf /etc/resolv.conf
However the resource is busy and I cannot…

LazyCoder
- 287
- 1
- 3
- 10
2
votes
1 answer
Ruby PUMA error: "Unable to load application: NameError: uninitialized constant Service::Resolv"
Using Windows 10E
ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
puma v 2.13.4
I'm a HUGE PUMA noob, so please excuse me. I know code (python, php, just not rails, ruby)
So, I'm trying to revive an old project my buddy dumped off to me.…

Sean Vreeland
- 87
- 1
- 12
2
votes
2 answers
Set a timeout for Ruby Resolv.getaddress(ip)
I can't find in the Ruby documentation anything on how to set a timeout to retrieve the IP of a domain using the class method getaddress from the Resolv class—from the Ruby std library.

Gmae
- 63
- 8
2
votes
1 answer
Resolv::DNS - how do I force TCP?
Does anyone know how do I force TCP when using Resolv::DNS?
It seems that when I ask for ANY records, the output is truncated and I get partial results. When I perform many queries (one for each record type) I get more results. I also get…

Zach Moshe
- 2,782
- 4
- 24
- 40
1
vote
0 answers
How can I get the list of ipv6 dns servers in linux by using the resolver library in c
I'm trying to get the list of all DNS servers in c through the resolver library, but I can't get the list of ipv6 DNS servers, please help me.
OS: Debian GNU/Linux 10 (buster)
here is the test code:
#include
#include
#include…

shenw
- 91
- 7
1
vote
1 answer
Android NDK DNS resolution with libresolv
I want to use an existing C/C++ library in an Android project. The library contains calls to res_query in the resolv.h header (libresolv on Linux), which exists in the NDK and, according to Wikipedia, is part of Android's Bionic libc.
The program…

Woalk
- 146
- 6
1
vote
1 answer
coredns is running but not ready after conjure-up k8s cdk
I have deployed Kubernetes V1.18.2 (CDK) using conjure-up (which used bionic)
Update: Destroyed the above env completely and then deployed it back again manually using CDK bundle here https://jaas.ai/canonical-kubernetes, same K8S version same OS…

Dom
- 580
- 4
- 26
1
vote
1 answer
why EC2 /etc/resolv.conf is always got empty, and rebooting the instance can fill the values, but later on it will be empty again
Does anyone know the reason why the /etc/resolv.conf is got empty at sometimes and rebooting the instance, it can fill correct values into it, but after a while, it will be empty again, all the instances created by the same AMI have this issue.
the…

Edward Xie
- 31
- 3
1
vote
0 answers
Ruby - Using Resolv::DNS to lookup DNS records through authenticated proxy
I have code that performs DNS lookups using Ruby's built-in Resolve::DNS functionality and it works perfectly to resolve IP addresses to names (or any other type of applicable DNS lookup).
It is working against our internal nameservers, however…

Kurt W
- 321
- 2
- 15