dnsmasq가 Debian에서 시작되지 못했습니다.

dnsmasq가 Debian에서 시작되지 못했습니다.

이것은 systemctl status dnsmasq.service의 내용입니다:

● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-06-29 12:37:37 CEST; 23s ago
  Process: 24641 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
  Process: 24638 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

저널 내용은 다음과 같습니다.

-- Logs begin at Tue 2019-06-25 11:49:21 CEST, end at Sat 2019-06-29 12:48:50 CEST. --
Jun 25 11:49:29 EddLinux kernel: nouveau 0000:01:00.0: preinit failed with -22
Jun 25 11:49:29 EddLinux kernel: nouveau: DRM:00000000:00000080: init failed with -22
Jun 25 11:49:32 EddLinux avahi-daemon[297]: chroot.c: open() failed: No such file or directory
Jun 25 11:49:33 EddLinux systemd-rfkill[421]: Failed to open device: No such device
Jun 25 11:49:35 EddLinux dhclient[502]: Failed to get interface index: No such device
Jun 25 11:49:35 EddLinux dhclient[502]: 
Jun 25 11:49:35 EddLinux dhclient[502]: If you think you have received this message due to a bug rather
Jun 25 11:49:35 EddLinux dhclient[502]: than a configuration issue please read the section on submitting
Jun 25 11:49:35 EddLinux dhclient[502]: bugs on either our web page at www.isc.org or in the README file
Jun 25 11:49:35 EddLinux dhclient[502]: before submitting a bug.  These pages explain the proper
Jun 25 11:49:35 EddLinux dhclient[502]: process and the information we find helpful for debugging..
Jun 25 11:49:35 EddLinux dhclient[502]: 
Jun 25 11:49:35 EddLinux dhclient[502]: exiting.
Jun 25 11:49:35 EddLinux systemd[1]: Failed to start Raise network interfaces.
Jun 25 11:49:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 12:17:49 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 13:32:38 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 13:32:43 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 17:36:10 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 18:29:26 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 25 18:46:36 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 25 18:50:57 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 12:29:22 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 13:08:52 EddLinux anacron[4522]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 26 14:20:05 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 14:31:18 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 15:38:34 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 15:38:47 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 26 15:38:47 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 26 15:42:56 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 15:52:46 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 16:21:11 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 17:39:35 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 18:16:05 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 26 18:25:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 26 20:30:11 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 27 16:39:10 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 17:06:50 EddLinux anacron[11980]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 27 17:38:13 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 27 18:11:44 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 18:12:28 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 27 18:50:12 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 28 11:46:18 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 28 11:48:33 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 28 11:48:33 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 28 11:48:55 EddLinux kernel: FAT-fs (sdb1): unable to read boot sector to mark fs as dirty
Jun 28 11:53:31 EddLinux kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Jun 28 11:53:31 EddLinux kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Jun 28 11:53:41 EddLinux wpa_supplicant[571]: nl80211: Unexpected encryption algorithm 5
Jun 28 12:08:31 EddLinux anacron[17533]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 28 12:52:24 EddLinux kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20160831/evevent-291)
Jun 29 12:13:35 EddLinux anacron[21404]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Jun 29 12:35:05 EddLinux dnsmasq[24574]: failed to create listening socket for port 53: Address already in use
Jun 29 12:35:05 EddLinux dnsmasq[24574]: FAILED to start up
Jun 29 12:35:05 EddLinux systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 29 12:37:37 EddLinux dnsmasq[24641]: failed to create listening socket for port 53: Address already in use
Jun 29 12:37:37 EddLinux dnsmasq[24641]: FAILED to start up
Jun 29 12:37:37 EddLinux systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.

이미 다시 설치했습니다. 어떤 도움이라도 환영합니다!

답변1

문제

포트 53에 대한 청취 소켓을 생성하지 못했습니다: 주소가 이미 사용 중입니다.

그게 다야.

DNS는 포트 53에서 데이터를 보내는 쿼리를 사용합니다(대부분 UDP이지만 TCP도 사용할 수 있음).

dnsmasq(무엇보다도) 소위 전달 DNS입니다.섬기는 사람,서버라는 사실은 서버가 다음을 원한다는 것을 의미합니다.듣다최소 53/UDP에서, 어쩌면 53/TCP에서도 가능합니다.

단일 프로세스(실행 중인 프로그램)만이 특정 IP 주소의 특정 번호를 가진 포트를 수신할 수 있습니다. 따라서 오류는 다른 프로그램이 이미 포트 53을 수신하고 있지만 dnsmasq이를 수행하지 못하고 종료된다는 의미입니다.

그것에 대해 무엇을 해야할지

먼저, 53/UDP에서 무엇이 수신되고 있는지 알아보세요.

  1. 설치하다 iproute2:

    # apt install iproute2
    
  2. 53/UDP를 사용하는 사람을 확인하세요.

    # ss -nlup
    

    옵션의 의미는 다음과 같습니다.

    • 보여주다N숫자 주소를 DNS로 확인하려고 시도하지 마세요.
    • 만 표시소켓을 청취합니다.
    • 만 표시dp 소켓(실제로 엔드포인트이지만 신경쓰지 마세요).
    • 보여주다해당 소켓을 연 프로세스입니다.

    root(이 프로그램을 —maybe via 로 실행해야 합니다. sudo이는 시스템에서 권한을 높이는 방법을 구성한 방법에 따라 다릅니다.)

    이제 출력에서 ​​다음과 같은 내용이 포함된 레코드를 찾습니다 [::]:53. 예를 들어 정확한 판독값은 다를 수 있지만 0.0.0.0:53해당 접미사가 확실히 표시됩니다 :53(포트 번호). 그런 다음 "사용자" 열을 확인합니다. 이름이 나열되어야 합니다. 해당 소켓을 연 프로그램의

    내 시스템에서 관련 항목은 다음과 같습니다 UNCONN 0 0 [::]:53 [::]:* users:(("dnsmasq",pid=601,fd=6))(간결함을 위해 공백을 약간 압축했습니다). 사용자는 입니다 dnsmasq. 귀하의 시스템에서는 이것이 다를 것입니다.

좋아요, 범인이 누구인지 알아낸 후에는 해당 프로그램을 제거하는 방법을 생각해 보세요. 그런 다음에는 Simple이 # systemctl restart dnsmasq진행됩니다.

관련 정보