ubuntuusers.de

ntpd Problem

Status: Gelöst | Ubuntu-Version: Ubuntu 14.10 (Utopic Unicorn)
Antworten |

temptemp

Anmeldungsdatum:
11. August 2013

Beiträge: 69

Hallo zusammen, Kurze die Hintergrundinfos bevor es zur eigentlichen Frage überleitet:

Also ich hab ein raspberry Pi hinter einer Fritz Box laufen mit einem Webserver. Da ich vin "aussen" darauf zu greifen und ich einen sogenannten DS-Lite von Kabel Bw habe (kurz IPv6) habe ich eine myfritz Freigabe auf den raspberry Pi umgeleitet. Soweit funktioniert alles. Aber nach eine unbestimmten Zeit ist er nicht mehr erreichbar und im syslog steht dann

1
ntpd[2109]: Deleting interface #6 eth0:1, (ipv6 Adresse, interface stats: received=2, sent=0, dropped=0, active_time=1559389 secs

Bzw ähnliches.

Frage:

Im Internet is zu lesen dass man

1
BOOTPROTO=none

setzen soll das Problem nicht mehr existieren.

Wie und wo Stelle ich dies nun ein und was muss ich dann beachten bzgl. Fester ip Vergabe?!

Danke

lubux

Anmeldungsdatum:
21. November 2012

Beiträge: 14800

temptemp schrieb:

Wie und wo Stelle ich dies nun ein ...

Such mal im /etc-Verzeichnis. Z. B. mit:

sudo grep -R --include=* BOOTPROTO /etc 2>/dev/null

EDIT:

Beachte bzw. verfolge auch diesen Thread aus dem IPPF, ab Beitrag #9: http://www.ip-phone-forum.de/showthread.php?t=278889&s=064c122060e8b73f5dca973979ba1cbb&p=2091644&viewfull=1#post2091644

EDIT 2:

Poste mal von deinem PI, die Ausgaben von:

ipconfig -a
ip addr
cat /etc/network/interfaces
cat /etc/ntp.conf
ps -fC ntpd
sudo netstat -tulpen | grep -i :123
cat /etc/os-release
uname -a

temptemp

(Themenstarter)

Anmeldungsdatum:
11. August 2013

Beiträge: 69

genau Wortlaut ist

1
2
3
4
May 18 01:28:39 raspberrypi avahi-daemon[2251]: Leaving mDNS multicast group on interface eth0.IPv6 with address *.
May 18 01:28:39 raspberrypi avahi-daemon[2251]: Joining mDNS multicast group on interface eth0.IPv6 with address *.
May 18 01:28:41 raspberrypi ntpd[2878]: Deleting interface #6 eth0, *#123, interface stats: received=0, sent=0, dropped=0, active_time=7177 se$
May 18 01:28:41 raspberrypi ntpd[2878]: peers refreshed

Ausgaben von ifconfig -a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:3f:f6:bc  
          inet addr:192.168.178.24  Bcast:192.168.178.255  Mask:255.255.255.0
          inet6 addr: 2a02:8070:1c3:e800:b36c:3526:39c4:7046/64 Scope:Global
          inet6 addr: 2a02:8070:1c3:e800:ba27:ebff:fe3f:f6bc/64 Scope:Global
          inet6 addr: fe80::ba27:ebff:fe3f:f6bc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3126 errors:0 dropped:4 overruns:0 frame:0
          TX packets:1997 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:284209 (277.5 KiB)  TX bytes:376424 (367.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2764 (2.6 KiB)  TX bytes:2764 (2.6 KiB)

ip addr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether b8:27:eb:3f:f6:bc brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.24/24 brd 192.168.178.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a02:8070:1c3:e800:b36c:3526:39c4:7046/64 scope global dynamic 
       valid_lft 6949sec preferred_lft 3349sec
    inet6 2a02:8070:1c3:e800:ba27:ebff:fe3f:f6bc/64 scope global dynamic 
       valid_lft 6360sec preferred_lft 2760sec
    inet6 fe80::ba27:ebff:fe3f:f6bc/64 scope link 
       valid_lft forever preferred_lft forever

cat /etc/network/interfaces

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

cat /etc/ntp.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable


# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst


# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
# Generated by dhcpcd from eth0
server 192.168.178.1
# End of dhcpcd from eth0

ps -fC ntpd

1
2
UID        PID  PPID  C STIME TTY          TIME CMD
ntp       2888     1  0 18:44 ?        00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:107

sudo netstat -tulpen | grep -i :123

1
2
3
4
5
6
7
8
udp        0      0 192.168.178.24:123      0.0.0.0:*                           0          7746        2888/ntpd       
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          7745        2888/ntpd       
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          7737        2888/ntpd       
udp6       0      0 fe80::ba27:ebff:fe3:123 :::*                                0          7750        2888/ntpd       
udp6       0      0 2a02:8070:1c3:e800::123 :::*                                0          7749        2888/ntpd       
udp6       0      0 2a02:8070:1c3:e800::123 :::*                                0          7748        2888/ntpd       
udp6       0      0 ::1:123                 :::*                                0          7747        2888/ntpd       
udp6       0      0 :::123                  :::*                                0          7738        2888/ntpd  

cat /etc/os-release

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

uname -a

1
Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux

temptemp

(Themenstarter)

Anmeldungsdatum:
11. August 2013

Beiträge: 69

Hilfen??

Lidux

Anmeldungsdatum:
18. April 2007

Beiträge: 17143

Hallo temptemp,

auto eth0
allow-hotplug eth0
iface eth0 inet manual

wenn hier manual steht musst du auch die ip Adresse usw. angeben ....

Gruss Lidux

lubux

Anmeldungsdatum:
21. November 2012

Beiträge: 14800

temptemp schrieb:

Hilfen??

Versuch mal auch mit folgender interfaces-Datei:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp

#allow-hotplug eth0
#iface eth0 inet manual

#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#auto wlan1
#allow-hotplug wlan1
#iface wlan1 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Siehe auch deinem PI auch die Ausgaben von:

sudo dhclient -4 -d -v eth0
sudo dhclient -6 -d -v eth0

temptemp

(Themenstarter)

Anmeldungsdatum:
11. August 2013

Beiträge: 69

Konnte mich durch diese Änderung nicht mehr verbinden mit meinem raspberry via ssh 🙄

lubux

Anmeldungsdatum:
21. November 2012

Beiträge: 14800

temptemp schrieb:

Konnte mich durch diese Änderung nicht mehr verbinden mit meinem raspberry via ssh 🙄

Dann versuch mal mit einer statischen IPv4-Adresse für eth0, in der interfaces-Datei:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.178.12
netmask 255.255.255.0
gateway 192.168.178.1
dns-nameservers 192.168.178.1 8.8.8.8

iface eth0 inet6 dhcp

#allow-hotplug eth0
#iface eth0 inet manual

#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

#auto wlan1
#allow-hotplug wlan1
#iface wlan1 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

zwecks Verbindung per ssh aus dem LAN.

EDIT:

ntpd[2109]: Deleting interface #6 eth0:1

Evtl. kannst Du den ntpd auf deinem PI auch so konfigurieren, dass dieser nur bestimmte Interfaces/IP-Adresse(n)/Protokolle benutzt, und somit nicht "abstürzt" bzw. zum "Absturz" des PI führt wenn ein exotisches Interface (hier eth0:1) von wem und warum auch immer angelegt/gelöscht wird bzw. plötzlich nicht mehr existiert (... und an dem der ntpd aber anscheinend auch gelauscht hat).

temptemp

(Themenstarter)

Anmeldungsdatum:
11. August 2013

Beiträge: 69

Hat funktioniert ☺ Danke ☺

–>geschlossen

Antworten |