LINUX.ORG.RU
решено ФорумAdmin

hostapd падает

 ,


1

2

То работает, то работает, но падает через какое-то время и не хочет перезапускаться

Feb 07 17:49:57 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 07 17:49:57 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 07 17:49:57 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:49:59 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 07 17:49:59 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 2622.
Feb 07 17:49:59 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:49:59 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 07 17:49:59 debian-home hostapd[16006]: Configuration file: /etc/hostapd/hostapd.conf
Feb 07 17:49:59 debian-home hostapd[16006]: nl80211: Could not configure driver mode
Feb 07 17:49:59 debian-home hostapd[16006]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 07 17:49:59 debian-home hostapd[16006]: nl80211 driver initialization failed.
Feb 07 17:49:59 debian-home hostapd[16006]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 07 17:49:59 debian-home hostapd[16006]: wlp3s0: AP-DISABLED
Feb 07 17:49:59 debian-home hostapd[16006]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 07 17:49:59 debian-home hostapd[16006]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 07 17:49:59 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 07 17:49:59 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 07 17:49:59 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:01 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 07 17:50:01 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 2623.
Feb 07 17:50:01 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:01 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 07 17:50:01 debian-home hostapd[16009]: Configuration file: /etc/hostapd/hostapd.conf
Feb 07 17:50:01 debian-home hostapd[16009]: nl80211: Could not configure driver mode
Feb 07 17:50:01 debian-home hostapd[16009]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 07 17:50:01 debian-home hostapd[16009]: nl80211 driver initialization failed.
Feb 07 17:50:01 debian-home hostapd[16009]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 07 17:50:01 debian-home hostapd[16009]: wlp3s0: AP-DISABLED
Feb 07 17:50:01 debian-home hostapd[16009]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 07 17:50:01 debian-home hostapd[16009]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 07 17:50:01 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 07 17:50:01 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 07 17:50:01 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:03 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 07 17:50:03 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 2624.
Feb 07 17:50:03 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:03 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 07 17:50:04 debian-home hostapd[16012]: Configuration file: /etc/hostapd/hostapd.conf
Feb 07 17:50:04 debian-home hostapd[16012]: nl80211: Could not configure driver mode
Feb 07 17:50:04 debian-home hostapd[16012]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 07 17:50:04 debian-home hostapd[16012]: nl80211 driver initialization failed.
Feb 07 17:50:04 debian-home hostapd[16012]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 07 17:50:04 debian-home hostapd[16012]: wlp3s0: AP-DISABLED
Feb 07 17:50:04 debian-home hostapd[16012]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 07 17:50:04 debian-home hostapd[16012]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 07 17:50:04 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 07 17:50:04 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 07 17:50:04 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:04 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 07 17:50:04 debian-home systemd[1]: hostapd.service: Start request repeated too quickly.
Feb 07 17:50:04 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 07 17:50:04 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.

cat /etc/hostapd/hostapd.conf

interface=wlp3s0
ssid=some
hw_mode=g
wpa=2
wpa_passphrase=some_pwd
# wpa_key_mgmt=WPA-PSK WPA-EAP WPA-PSK-SHA256 WPA-EAP-SHA256
wpa_key_mgmt=WPA-PSK

Если сделать killall -9 hostapd, то потом hostapd перезапускается и всё работает

★★★★

Последнее исправление: bryak (всего исправлений: 5)

Если не делать killall, а посмотреть pid hostapd и потом посмотреть логи в районе этого pid?

mky ★★★★★
()
Ответ на: комментарий от mky
и потом посмотреть логи в районе этого pid?

Где именно посмотреть? В systemd что вываливается - есть в треде

bryak ★★★★
() автор топика
Ответ на: комментарий от mky

Вот как раз сейчас hostapd не поднялся. Логи прикрепляю

Feb 08 15:28:55 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:28:58 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 08 15:28:58 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 689.
Feb 08 15:28:58 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:28:58 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 08 15:28:58 debian-home hostapd[7303]: Configuration file: /etc/hostapd/hostapd.conf
Feb 08 15:28:58 debian-home hostapd[7303]: nl80211: Could not configure driver mode
Feb 08 15:28:58 debian-home hostapd[7303]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 08 15:28:58 debian-home hostapd[7303]: nl80211 driver initialization failed.
Feb 08 15:28:58 debian-home hostapd[7303]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 08 15:28:58 debian-home hostapd[7303]: wlp3s0: AP-DISABLED
Feb 08 15:28:58 debian-home hostapd[7303]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 08 15:28:58 debian-home hostapd[7303]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 08 15:28:58 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 08 15:28:58 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 08 15:28:58 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:29:00 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 08 15:29:00 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 690.
Feb 08 15:29:00 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:29:00 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 08 15:29:00 debian-home hostapd[7306]: Configuration file: /etc/hostapd/hostapd.conf
Feb 08 15:29:00 debian-home hostapd[7306]: nl80211: Could not configure driver mode
Feb 08 15:29:00 debian-home hostapd[7306]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 08 15:29:00 debian-home hostapd[7306]: nl80211 driver initialization failed.
Feb 08 15:29:00 debian-home hostapd[7306]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 08 15:29:00 debian-home hostapd[7306]: wlp3s0: AP-DISABLED
Feb 08 15:29:00 debian-home hostapd[7306]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 08 15:29:00 debian-home hostapd[7306]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 08 15:29:00 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 08 15:29:00 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 08 15:29:00 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:29:02 debian-home systemd[1]: hostapd.service: Service RestartSec=2s expired, scheduling restart.
Feb 08 15:29:02 debian-home systemd[1]: hostapd.service: Scheduled restart job, restart counter is at 691.
Feb 08 15:29:02 debian-home systemd[1]: Stopped Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Feb 08 15:29:02 debian-home systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator...
Feb 08 15:29:02 debian-home hostapd[7313]: Configuration file: /etc/hostapd/hostapd.conf
Feb 08 15:29:02 debian-home hostapd[7313]: nl80211: Could not configure driver mode
Feb 08 15:29:02 debian-home hostapd[7313]: nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
Feb 08 15:29:02 debian-home hostapd[7313]: nl80211 driver initialization failed.
Feb 08 15:29:02 debian-home hostapd[7313]: wlp3s0: interface state UNINITIALIZED->DISABLED
Feb 08 15:29:02 debian-home hostapd[7313]: wlp3s0: AP-DISABLED
Feb 08 15:29:02 debian-home hostapd[7313]: wlp3s0: CTRL-EVENT-TERMINATING
Feb 08 15:29:02 debian-home hostapd[7313]: hostapd_free_hapd_data: Interface wlp3s0 wasn't started
Feb 08 15:29:02 debian-home systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 08 15:29:02 debian-home systemd[1]: hostapd.service: Failed with result 'exit-code'.
Feb 08 15:29:02 debian-home systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
bryak ★★★★
() автор топика
Ответ на: комментарий от bryak

iwconfig

br-926050a92c2d  no wireless extensions.

docker0   no wireless extensions.

br0       no wireless extensions.

br-06b5c32b5bb4  no wireless extensions.

eno1      no wireless extensions.

lo        no wireless extensions.

wlp3s0    IEEE 802.11  Mode:Master  Tx-Power=20 dBm
          Retry short  long limit:2   RTS thr:off   Fragment thr:off
          Power Management:off

ifconfig

wlp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 70:62:b8:b3:30:2d  txqueuelen 10000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 212 (212.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
bryak ★★★★
() автор топика
Ответ на: комментарий от bryak

ну так ты настрой логгирование хостапд в нормальном вербосе моде и смотри его лог, вряд ли с таким куцым конфигом ты что-то подробное увидишь, хотя не факт что и подробный лог тебе что-то скажет. Дерзай хорунжий, рапорт потом присовокупишь к теме.

anonymous
()

Нашел причину:

auto wlp3s0
 iface wlp3s0 inet static
        hostapd /etc/hostapd/hostapd.conf
        address 192.168.0.103
        netmask 255.255.255.0
    down ip link set dev wlp3s0 down

Получается, что у меня hostapd поднимался из /etc/network/interfaces и из systemd. Убрал hostapd из автозагрузки и стало всё хорошо. Странно, но факт, что при добавлении опции в hostapd.conf

driver=nl80211

тоже работало, но раз в 10 загрузок отваливалось

bryak ★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.