DNS / resolv.conf Fehler?

  • Thread starter Thread starter informant
  • Start date Start date
I

informant

Guest
Hallo, ich hab das Problem, dass wenn ich in resolv.conf einen nameserver oder merhere eintrage, meine Seite langsam aufgeht. Wenn ich garnichts eintrage oder alles auskommentiere, geht die Seite super schnell auf. Ich habe auch schon öffentliche nameserver wie google etc probiert, immer mit gleichem Ergebnis. Auch das installieren von bind9 hat nichts geholfen. Habt Ihr noch eine Idee? Weil ohne resolv.conf nameserver Einträge können E-Mails ja nicht ausgehend versendet werden und nichts aufgelöst werden, was von intern kommt.
Freu mich über Eure Infos. Danke.

PS: System ist Debian Squeeze 64 Bit
 
Last edited by a moderator:
Ich vermute mal du setzt als Webserver apache2 ein, wenn ja, bitte Output von

Code:
cat /etc/apache2/conf.d/security

und

Code:
cat /etc/apache2/apache2.conf


posten.
 
Bitte einmal die Dateien

/etc/hosts

sowie

/etc/nsswitch.conf

posten. Was heißt, die Seiten gehen langsam auf? Welche resolv.conf änderst du? Client, Server?
 
Hallo Ihr 2

@virtual

Code:
cat /etc/apache2/conf.d/security
#
# Disable access to the entire file system except for the directories that
# are explicitly allowed later.
#
# This currently breaks the configurations that come with some web application
# Debian packages.
#
#<Directory />
#       AllowOverride None
#       Order Deny,Allow
#       Deny from all
#</Directory>


# Changing the following options will not really affect the security of the
# server, but might make attacks slightly more difficult in some cases.

#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minimal | Minor | Major | Prod
# where Full conveys the most information, and Prod the least.
#
#ServerTokens Minimal
ServerTokens OS
#ServerTokens Full

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
#ServerSignature Off
ServerSignature On

#
# Allow TRACE method
#
# Set to "extended" to also reflect the request body (only for testing and
# diagnostic purposes).
#
# Set to one of:  On | Off | extended
#
TraceEnable Off
#TraceEnable On

Code:
cat /etc/apache2/apache2.conf
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
#     whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
#     which responds to requests that aren't handled by a virtual host.
#     These directives also provide default values for the settings
#     of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
#     different IP addresses or hostnames and have them handled by the
#     same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "foo.log"
# with ServerRoot set to "/etc/apache2" will be interpreted by the
# server as "/etc/apache2/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
LockFile ${APACHE_LOCK_DIR}/accept.lock

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 15

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 3

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
    StartServers          1
    MinSpareServers       1
    MaxSpareServers      15
    MaxClients          200
    MaxRequestsPerChild   0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
#              graceful restart. ThreadLimit can only be changed by stopping
#              and starting Apache.
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
    StartServers          1
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          200
    MaxRequestsPerChild   0
</IfModule>

# event MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
    StartServers          1
    MaxClients          200
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include all the user configurations:
Include httpd.conf

# Include ports listing
Include ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/


@PapaBaer

Code:
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
217.69.*.* mail.domain.de  mail domain.de

Code:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

resolv.conf am Server ist gemeint.


Zeit beim Aufruf mit Eintrag in resolv.conf
[HTTP/1.1 200 OK 1784ms]
ohne
[HTTP/1.1 200 OK 252ms]
 
Ich kann solche hohen Verzögerungen nicht bestätigen, obwohl ich gemäss des Blogposts gleich zwei Fehler mache:
Code:
[root@devnull:~] # egrep -in '(%h|hostnamelookups)' /usr/local/etc/apache22/httpd.conf
122:HostnameLookups On
124:    LogFormat "%v %a %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
126:LogFormat "%v %a %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
127:LogFormat "%v %a %h %l %u %t \"%r\" %>s %b" common

Was mache ich falsch? Will auch solche Verzögerungen...
 
Du hast eine schnelle Leitung und dein DNS läuft sauber?

Da muss doch nur irgendwo auf dem Weg ein Request ins Leere laufen oder ein DNS überlastet sein, und du wartest auf nen Timeout.
 
@PapaBaer

Es kommt nur:

Code:
grep -r HostnameLookups /etc/apache2/
/etc/apache2/apache2.conf:# HostnameLookups: Log the names of clients or just their IP addresses
/etc/apache2/apache2.conf:HostnameLookups Off

und bei egrep -in '(%h|hostnamelookups)' /etc/apache2/httpd.conf garnichts
 
Wie sieht es denn damit aus?
Code:
time dig -t a @8.8.8.8 serversupportforum.de
Code:
time dig -t a @88.198.200.1 serversupportforum.de
Code:
time dig -t ptr @8.8.8.8 176.9.78.208
Code:
time dig -t ptr @88.198.200.1 176.9.78.208
 
Schaut gut aus:
Code:
[root@devnull:~] # time dig -t a @88.198.200.1 serversupportforum.de

; <<>> DiG 9.6.-ESV-R3 <<>> -t a @88.198.200.1 serversupportforum.de
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11989
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;serversupportforum.de.         IN      A

;; ANSWER SECTION:
serversupportforum.de.  3600    IN      A       176.9.78.208

;; Query time: 3 msec
;; SERVER: 88.198.200.1#53(88.198.200.1)
;; WHEN: Fri Sep 28 13:18:54 2012
;; MSG SIZE  rcvd: 55

0.000u 0.003s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
[root@devnull:~] # time dig -t a @8.8.8.8 serversupportforum.de

; <<>> DiG 9.6.-ESV-R3 <<>> -t a @8.8.8.8 serversupportforum.de
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9478
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;serversupportforum.de.         IN      A

;; ANSWER SECTION:
serversupportforum.de.  3090    IN      A       176.9.78.208

;; Query time: 17 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Sep 28 13:19:18 2012
;; MSG SIZE  rcvd: 55

0.000u 0.003s 0:00.01 0.0%      0+0k 0+0io 0pf+0w
[root@devnull:~] # time dig -t a @88.198.200.1 176.9.78.208

; <<>> DiG 9.6.-ESV-R3 <<>> -t a @88.198.200.1 176.9.78.208
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16599
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;176.9.78.208.                  IN      A

;; AUTHORITY SECTION:
.                       2593    IN      SOA     ns0.opennic.glue. hostmaster.opennic.glue. 2012092802 1800 900 604800 3600

;; Query time: 3 msec
;; SERVER: 88.198.200.1#53(88.198.200.1)
;; WHEN: Fri Sep 28 13:20:00 2012
;; MSG SIZE  rcvd: 92

0.000u 0.003s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
[root@devnull:~] # time dig -t a @8.8.8.8 176.9.78.208

; <<>> DiG 9.6.-ESV-R3 <<>> -t a @8.8.8.8 176.9.78.208
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 64504
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;176.9.78.208.                  IN      A

;; AUTHORITY SECTION:
.                       1800    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2012092701 1800 900 604800 86400

;; Query time: 31 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Sep 28 13:20:11 2012
;; MSG SIZE  rcvd: 105

0.003u 0.000s 0:00.03 0.0%      0+0k 0+0io 0pf+0w
 
Was steht denn in deiner /etc/resolv.conf denn genau drin? Unter Cent OS gibt es aktuell einen Bug, wo DNS Anfragen ins leere laufen wenn die rotate Option gesetzt ist.
 
FreeBSD 8.2:
Code:
[root@devnull:~] # cat /etc/resolv.conf
nameserver 213.133.98.98
nameserver 213.133.99.99
nameserver 213.133.100.100
 
@informant: Führ Du auch mal die Befehle aus meinem anderen Beitrag aus.
 
Nein, ist deaktiviert (normalerweise) udn hat auch keine IP Adresse im ifconfig drin.

@PCFreund, achso, mom ich führe die eben mal aus.
 
Code:
 time dig -t a @8.8.8.8 serversupportforum.de

; <<>> DiG 9.7.3 <<>> -t a @8.8.8.8 serversupportforum.de
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57007
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;serversupportforum.de.         IN      A

;; ANSWER SECTION:
serversupportforum.de.  2209    IN      A       176.9.78.208

;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Sep 29 13:05:35 2012
;; MSG SIZE  rcvd: 55


real    0m0.023s
user    0m0.004s
sys     0m0.004s

Code:
time dig -t a @88.198.200.1 serversupportforum.de

; <<>> DiG 9.7.3 <<>> -t a @88.198.200.1 serversupportforum.de
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41981
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;serversupportforum.de.         IN      A

;; ANSWER SECTION:
serversupportforum.de.  3600    IN      A       176.9.78.208

;; Query time: 24 msec
;; SERVER: 88.198.200.1#53(88.198.200.1)
;; WHEN: Sat Sep 29 13:06:07 2012
;; MSG SIZE  rcvd: 55


real    0m0.032s
user    0m0.004s
sys     0m0.008s

Code:
 time dig -t ptr @8.8.8.8 176.9.78.208

; <<>> DiG 9.7.3 <<>> -t ptr @8.8.8.8 176.9.78.208
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 50314
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;176.9.78.208.                  IN      PTR

;; AUTHORITY SECTION:
.                       1800    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2012092900 1800 900 604800 86400

;; Query time: 69 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Sep 29 13:06:23 2012
;; MSG SIZE  rcvd: 105


real    0m0.077s
user    0m0.008s
sys     0m0.000s

Code:
time dig -t ptr @88.198.200.1 176.9.78.208

; <<>> DiG 9.7.3 <<>> -t ptr @88.198.200.1 176.9.78.208
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 61077
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;176.9.78.208.                  IN      PTR

;; AUTHORITY SECTION:
.                       3600    IN      SOA     ns0.opennic.glue. hostmaster.opennic.glue. 2012092904 1800 900 604800 3600

;; Query time: 137 msec
;; SERVER: 88.198.200.1#53(88.198.200.1)
;; WHEN: Sat Sep 29 13:06:39 2012
;; MSG SIZE  rcvd: 92


real    0m0.145s
user    0m0.000s
sys     0m0.008s


mit folgenden Einträgen in resolv.conf:

Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 194.145.226.9
nameserver 194.145.226.26
 
Sieht eigentlich ganz gut aus, aber warum dauert es mit resolv.conf dann 1 Sek länger als ohne Eintrag?
 
Back
Top