tftpd-hpa(Ubuntu 16.04 LTS)をインストールしました。最近いくつかのアップデートを受け取った後(または依存関係のあるアプリケーションを削除した後)、tftpd-hpaは起動しなくなりました。 tftpd-hpaは次のように設定されます。
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure --create"
デフォルトのルートディレクトリは、/var/lib/tftpboot
コマンドsystemctl status tftpd-hpa.service
の出力は次のとおりですjournalctl -xe
。
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)
編集:以下はsudo netstat -lnp | grep 69
出力です
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
ベストアンサー1
2つの情報を組み合わせます。
最近いくつかのアップデートを受けた後
次のエラーが発生します。
4月18日 01:47:32 Amtek in.tftpd[4777]: ローカル IPv4 ソケットにバインドできません: アドレスはすでに使用中です。
問題は、tftpサーバーを起動したときにtftpポート(69)がすでに使用されているようです。最近インストール/更新された新しいプログラムがこの現象を引き起こす可能性があります。
次のコマンドを実行すると、コンピュータでtftpポート(69)を使用しているプロセスを見つけるのに役立ちます。
netstat -lnp | grep 69
-l、--listeningリスニングソケットのみを表示します。 (基本的に省略しています。)
--numeric, -n シンボル ホスト、ポート、またはユーザー名を解決する代わりに、数値アドレスを表示します。
-p, --program 各ソケットが属するプログラムのPIDと名前を表示します。
注:
| grep 69
69を含む行のみを表示するように結果をフィルタリングします。
編集する:
質問に追加した結果によると、netstat -lnp
現在inetd
udp / port 69で実行されているため、tftpクライアントの一部として実行できるため、inetd
このポートでtftpd-hpaを実行できません。
注:実行中であることを確認してください
tftpd
。十分であれば使用を避けることができます。tftpd-hpa
2つのオプションがあります。
tftp
別のポートを使用するためのサーバーの移動これは、ポート69でtftpを設定する次の行を変更することによって実行できます。TFTP_ADDRESS=":69"
6900などの他のポートを使用するには:
TFTP_ADDRESS=":6900"
tftp-client
注:このソリューションを使用するには、新しいポート番号を使用する必要があります。
udp/69の使用を中止するには、
inetd
フォルダtftp configuration
にファイルがあることを確認し、inetd
次の名前のファイルを検索します。/etc/xinetd.d/tftp
または
/etc/inetd.d/tftp