Der tftpd-hpa startet nach dem Update nicht

Der tftpd-hpa startet nach dem Update nicht

Ich habe tftpd-hpa installiert (Ubuntu 16.04 LTS). In letzter Zeit, möglicherweise nach einigen Updates (oder der Deinstallation einer Anwendung mit großen Abhängigkeiten), startet tftpd-hpa nicht mehr. Die tftpd-hpa-Einstellungen sind:

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure --create"

Das Standardstammverzeichnis ist /var/lib/tftpboot. Ausgabe von systemctl status tftpd-hpa.serviceund journalctl -xeBefehlen:

testlab@Amtek:~$ systemctl status tftpd-hpa.service
● tftpd-hpa.service - LSB: HPA's tftp server
   Loaded: loaded (/etc/init.d/tftpd-hpa; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2017-04-18 01:47:32 EEST; 2min 8
     Docs: man:systemd-sysv-generator(8)
  Process: 4764 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=71)

Apr 18 01:47:32 Amtek systemd[1]: Stopped LSB: HPA's tftp server.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Addre
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, 
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed stat
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit
lines 1-14/14 (END)

testlab@Amtek:~$ journalctl -xe
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Addre
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, 
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed stat
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authenticat
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atom
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Addres
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, c
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authenticati
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomi
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Address already in use
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, code=exited status=71
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authentication Agent for unix-process:4752:17293
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=58
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Address already in use
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, code=exited status=71
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authentication Agent for unix-process:4752:172933
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=585
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Address already in use
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, code=exited status=71
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authentication Agent for unix-process:4752:1729339 (system
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=585206 end=5
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Address already in use
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, code=exited status=71
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authentication Agent for unix-process:4752:1729339 (system 
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=585206 end=58
lines 1276-1298/1298 (END)
-- 
-- Unit tftpd-hpa.service has finished shutting down.
Apr 18 01:47:32 Amtek systemd[1]: Starting LSB: HPA's tftp server...
-- Subject: Unit tftpd-hpa.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has begun starting up.
Apr 18 01:47:32 Amtek tftpd-hpa[4764]:  * Starting HPA's tftpd in.tftpd
Apr 18 01:47:32 Amtek in.tftpd[4777]: cannot bind to local IPv4 socket: Address already in use
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Control process exited, code=exited status=71
Apr 18 01:47:32 Amtek systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: Unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit tftpd-hpa.service has failed.
-- 
-- The result is failed.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Unit entered failed state.
Apr 18 01:47:32 Amtek systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
Apr 18 01:47:32 Amtek polkitd(authority=local)[885]: Unregistered Authentication Agent for unix-process:4752:1729339 (system bus name :1.
Apr 18 01:48:46 Amtek kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=585206 end=585207) time 9
lines 1276-1298/1298 (END)

BEARBEITEN: unten ist sudo netstat -lnp | grep 69die Ausgabe

udp        0      0 0.0.0.0:69              0.0.0.0:*                           851/inetd       
unix  2      [ ACC ]     STREAM     LISTENING     20940    1069/Xorg           @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     20941    1069/Xorg           /tmp/.X11-unix/X0

Antwort1

Zusammenführung der beiden Informationsteile:

Vor kurzem, nach einigen Updates erhalten

Und der folgende Fehler:

18. April 01:47:32 Amtek in.tftpd[4777]: kann nicht an lokalen IPv4-Socket binden: Adresse wird bereits verwendet

Das Problem scheint darin zu liegen, dass der TFTP-Port (69) bereits belegt ist, wenn Sie den TFTP-Server starten. Dies kann an einem neuen Programm liegen, das vor Kurzem installiert/aktualisiert wurde.

Durch Ausführen des folgenden Befehls können Sie herausfinden, welcher Prozess den TFTP-Port (69) auf Ihrem Computer verwendet:

netstat -lnp | grep 69

netstat man

-l, --listening Nur Listening-Sockets anzeigen. (Diese werden standardmäßig weggelassen.)

--numeric, -n Zeigt numerische Adressen an, anstatt zu versuchen, symbolische Host-, Port- oder Benutzernamen zu ermitteln.

-p, --program Zeigt die PID und den Namen des Programms an, zu dem jeder Socket gehört.

Hinweis: Der | grep 69 Filter zeigt nur die Zeilen an, die 69 enthalten.

Bearbeiten:

Wie Sie Ihrer Frage hinzugefügt haben, netstat -lnpzeigt das Ergebnis, dass es jetzt inetdauf UDP/Port 69 läuft. Es ist möglich, dass es als Teil davon einen TFTP-Client ausführt inetd, weshalb Sie TFTPd-HPA nicht auf diesem Port ausführen können.

Hinweis: Bitte überprüfen Sie, ob tftpdes läuft, und wenn es gut genug ist, können Sie die Verwendung vontftpd-hpa

Sie haben zwei Möglichkeiten:

  • Verschieben Sie tftpden Server, um einen anderen Port zu verwenden. Dies können Sie durch Ändern der folgenden Zeile erreichen, die TFTP auf Port 69 einstellt:

    TFTP_ADDRESS=":69"

    Um einen anderen Port zu verwenden, zB 6900:

    TFTP_ADDRESS=":6900"

Hinweis: Bei dieser Lösung muss tftp-clientdie neue Portnummer verwendet werden.

  • Hören Sie auf inetd, udp/69 zu verwenden. Sie können prüfen, ob tftp configurationdie Datei im inetdOrdner vorhanden ist. Suchen Sie nach einer Datei mit einem Namen wie:

    /etc/xinetd.d/tftp

oder

 /etc/inetd.d/tftp

Antwort2

Es könnte für jemanden mit neuen Versionen von tftpd-hpa nützlich sein. Meine Konfiguration ist:

RUN_DAEMON="yes"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/user/tftproot"
FTP_ADDRESS=":69"
TFTP_OPTIONS="192.168.0.1 --ipv4 -m /etc/tftpd.remap --create --permissive"

Ohne die Serveradresse von tftpd (in meinem Fall 192.168.0.1) konnte der tftpd-hpa-Dienst nicht gestartet werden.

verwandte Informationen