
저는 우분투 16.04를 사용하고 있습니다. tftpd-hpa 서버를 설치했습니다. systemctl start tftp 명령을 사용하여 서버를 시작하고 싶습니다. 시스템 폴더에 tftp 서비스 파일을 생성했으며 구성은 다음과 같습니다
[Unit]
Description=Tftp Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/in.tftpd /var/tftp
ExecStop=/bin/kill -15 $MAINPID
[Install]
WantedBy=multi-user.target
내가 실행할 때마다
systemctl tftp 시작
다음 메시지가 나타납니다.
Job for tftp.service failed because a configured resource limit was exceeded. See "systemctl status tftp.service" and "journalctl -xe" for details.
실행 후:
systemctl status tftp.service
다음 메시지가 나타납니다.
● tftp.service - Tftp Server
Loaded: loaded (/etc/systemd/system/tftp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2017-07-26 14:38:22 IST; 26s ago
Process: 3309 ExecStart=/usr/sbin/in.tftpd /var/tftp (code=exited, status=1/FAILURE)
Jul 26 14:38:22 map-VB systemd[1]: Starting Tftp Server...
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Control process exited, code=exited status=1
Jul 26 14:38:22 map-VB systemd[1]: Failed to start Tftp Server.
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Unit entered failed state.
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Failed with result 'exit-code'.
어떤 지침이라도 대단히 감사하겠습니다.
달리고 난 후
journalctl -xe
그것은 다음과 같은 메시지를 주었다
-- Unit acpid.service has finished starting up.
--
-- The start-up result is done.
Jul 26 14:38:15 map-VB systemd[1]: Started CUPS Scheduler.
-- Subject: Unit cups.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit cups.service has finished starting up.
--
-- The start-up result is done.
Jul 26 14:38:15 map-VB polkitd(authority=local)[841]: Unregistered Authentication Agent for unix-process:3270:263001 (system bus name :1.147,
Jul 26 14:38:17 map-VB polkitd(authority=local)[841]: Registered Authentication Agent for unix-process:3300:263641 (system bus name :1.159 [/u
Jul 26 14:38:17 map-VB gnome-session[1420]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Jul 26 14:38:22 map-VB polkitd(authority=local)[841]: Operator of unix-session:c1 successfully authenticated as unix-user:map to gain TEMPORAR
Jul 26 14:38:22 map-VB systemd[1]: Starting Tftp Server...
-- Subject: Unit tftp.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tftp.service has begun starting up.
Jul 26 14:38:22 map-VB tftpd[3309]: recvfrom: Socket operation on non-socket
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Control process exited, code=exited status=1
Jul 26 14:38:22 map-VB systemd[1]: Failed to start Tftp Server.
-- Subject: Unit tftp.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit tftp.service has failed.
--
-- The result is failed.
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Unit entered failed state.
Jul 26 14:38:22 map-VB systemd[1]: tftp.service: Failed with result 'exit-code'.
Jul 26 14:38:22 map-VB polkitd(authority=local)[841]: Unregistered Authentication Agent for unix-process:3300:263641 (system bus name :1.159,
Jul 26 14:54:57 map-VB org.gnome.evolution.dataserver.Sources5[1300]: ** (evolution-source-registry:2124): WARNING **: secret_service_search_s
Jul 26 15:00:52 map-VB compiz[1963]: gkr-pam: unlocked login keyring
답변1
다음에서 서비스 파일을 수정하십시오.
[Unit]
Description=Tftp Server
[Service]
ExecStart=/usr/sbin/in.tftpd
ExecStop=/bin/kill -15 $MAINPID
StandardInput=socket
[Install]
WantedBy=multi-user.target
데몬이기 때문에 다음과 같습니다.
[Unit]
Description=Tftp Server
[Service]
Type=forking
ExecStart=/usr/sbin/xinetd
ExecStop=/bin/kill -15 $MAINPID
StandardInput=socket
[Install]
WantedBy=multi-user.target
출처: