albi
Posts: 13
Joined: Thu Feb 15, 2018 7:35 am

Updating hostapd fails…

Wed Mar 06, 2019 8:03 am

Hi there,

updating my raspi lately fails because of the hostapd.service. Here is what I got so far:

Code: Select all

OK:1 http://archive.raspberrypi.org/debian stretch InRelease
OK:2 https://deb.nodesource.com/node_9.x stretch InRelease         
OK:3 https://dev2day.de/pms jessie InRelease                       
OK:4 http://archive.raspbian.org/raspbian stretch InRelease        
Paketlisten werden gelesen... Fertig    
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Paketaktualisierung (Upgrade) wird berechnet... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
hostapd (2:2.6-21~bpo9~rpt1) wird eingerichtet ...
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript hostapd, action "restart" failed.
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-03-06 09:01:37 CET; 36ms ago
  Process: 13874 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

Mär 06 09:01:37 pi systemd[1]: hostapd.service: Unit entered failed state.
Mär 06 09:01:37 pi systemd[1]: hostapd.service: Failed with result 'exit-code'.
dpkg: Fehler beim Bearbeiten des Paketes hostapd (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 hostapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't know what to do and where to start :(

User avatar
lh61
Posts: 6
Joined: Wed Mar 06, 2019 5:10 am
Location: Rennes, France

Re: Updating hostapd fails…

Thu Mar 07, 2019 3:44 pm

Did you progress?
What is your distribution, your Raspberry product?
Did you read this topic? The guys may have the skill to help you, personally I don't use this service and no need to say I'm not a guru.
Did you try to force downgrade to a previous version?
What about your hostapd.conf? Does it conform to Jouni Malinen reference
When I did an apt-get dist-upgrade recently, I had an issue with samba and wpa_supplicant that suggested in the changelog to make changes to wpa_supplicant.conf regarding security level raised from 1 to 2 (maybe an answer to the wpa2 vulnerability found last year).
Now, location entry is mandatory in wpa_supplicant.conf on RPi3 to address regulation rules concerning the activation of 5GHz band.

extremin
Posts: 2
Joined: Thu Mar 07, 2019 5:45 pm

Re: Updating hostapd fails…

Thu Mar 07, 2019 5:49 pm

Today I have too.
Version 2: 2.6-21 ~ bpo9 ~ rpt1 does not work.

extremin
Posts: 2
Joined: Thu Mar 07, 2019 5:45 pm

Re: Updating hostapd fails…

Thu Mar 07, 2019 10:16 pm

Solved. I installed version hostapd 2: 2.4-1 + deb9u2. Work. :idea:

User avatar
lh61
Posts: 6
Joined: Wed Mar 06, 2019 5:10 am
Location: Rennes, France

Re: Updating hostapd fails…

Fri Mar 08, 2019 12:42 am

Thank you for your feedback ;-)

So according to this howto what you did is:

Code: Select all

$ sudo su
# apt-cache madison hostapd
   hostapd | 2:2.6-21~bpo9~rpt1 | http://archive.raspberrypi.org/debian stretch/main armhf Packages
   hostapd | 2:2.4-1+deb9u2 | http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
# apt-get install hostapd=2:2.4-1+deb9u2 -V
... and that's it !

I fogot, you would like to prevent future update with:

Code: Select all

apt-mark hold hostapd

And remove the directive later with:

Code: Select all

apt-mark unhold hostapd

albi
Posts: 13
Joined: Thu Feb 15, 2018 7:35 am

Re: Updating hostapd fails…

Fri Mar 08, 2019 12:48 pm

Sorry for my late reply…

Raspbian GNU/Linux 9 (stretch)
Kernel: 4.14.98-v7+

on my Raspberry Pi 3 Model B

At some point of the current OS installation I tried to use the Raspi as an access point. But in the end I decided not to use it. Maybe there is something wrong with the current hostapd setting. As far as I can see it tries to start every 2 seconds.

Maybe, because I do not use the service, I will stop it stop updating it.

albi
Posts: 13
Joined: Thu Feb 15, 2018 7:35 am

Re: Updating hostapd fails…

Fri Mar 08, 2019 1:04 pm

UPDATE: uninstalling the old hostapd and installing the new one worked.

fvisticot
Posts: 2
Joined: Sat Aug 25, 2018 10:11 am

Re: Updating hostapd fails…

Tue Apr 16, 2019 11:39 am

I try the procedure... Update is working now but if I reboot, I have the login prompt but I get a "Connection Reset" from the PI...

is there something additionnal to configure before reboot (by example TLS) ?

dazz100
Posts: 32
Joined: Mon Apr 17, 2017 4:54 am

Re: Updating hostapd fails…

Wed Jun 26, 2019 9:38 am

Hi
I have had the same problem.
I have followed the instructions https://www.raspberrypi.org/documentati ... s-point.md
down to, but not including "Add routing and masquerade".

This included update and upgrade to:
Raspbian GNU/Linux 9 (stretch)
Kernel: Linux 4.14.70-v7+
and hostapd -v
hostapd v2.6
running on a Raspi 3B+

I get the following error message:

Code: Select all

sudo systemctl status hostapd.service
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-06-26 21:11:52 NZST; 1s ago
  Process: 28548 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF}(code=exited, status=1/

Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Control process exited, code=exited status=1
Jun 26 21:11:52 ap-name systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authen
Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Unit entered failed state.
Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Failed with result 'exit-code'.
lines 1-9/9 (END)
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2019-06-26 21:11:52 NZST; 1s ago
  Process: 28548 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Control process exited, code=exited status=1
Jun 26 21:11:52 ap-name systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Unit entered failed state.
Jun 26 21:11:52 ap-name systemd[1]: hostapd.service: Failed with result 'exit-code'.
I haven't tried to change the hostapd version yet. That is the next step.
This post is to provide evidence of a problem.

I have been trying to get an access point going for months. I try, it fails. I leave it alone for a while, then come back and have another go. This is the latest failure. I am not a newbie or a guru but it shouldn't be this difficult.

Dazz

dazz100
Posts: 32
Joined: Mon Apr 17, 2017 4:54 am

Re: Updating hostapd fails…

Wed Jun 26, 2019 10:21 am

I have tried downgrading hostapd but that doesn't work either. Here is the screen.

Code: Select all

[email protected]:/etc/hostapd# apt-cache madison hostapd
   hostapd | 2:2.6-21~bpo9~rpt1 | http://archive.raspberrypi.org/debian stretch/main armhf Packages
   hostapd | 2:2.4-1+deb9u4 | http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
   hostapd | 2:2.4-1+deb9u4 | http://mirror.reap.net.nz/raspbian/raspbian stretch/main armhf Packages
   hostapd | 2:2.4-1+deb9u4 | http://raspbian.mirror.digitalpacific.com.au/raspbian stretch/main armhf Packages
[email protected]:/etc/hostapd# apt-get install hostapd=2:2.4-1+deb9u4 -v
apt 1.4.9 (armhf)
Supported modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
 Pkg:  Debian APT solver interface (Priority -1000)
 Pkg:  Debian APT planner interface (Priority -1000)
 S.L: 'deb' Debian binary tree
 S.L: 'deb-src' Debian source tree
 Idx: Debian Source Index
 Idx: Debian Package Index
 Idx: Debian Translation Index
 Idx: Debian dpkg status file
 Idx: Debian deb file
 Idx: Debian dsc file
 Idx: Debian control file
 Idx: EDSP scenario file
 Idx: EIPP scenario file
[email protected]:/etc/hostapd# hostapd -v
hostapd v2.6
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2016, Jouni Malinen <[email protected]> and contributors
I note that the list shows a different sub-version (4 vs 2) used by earlier posters.
The attempt to downgrade to an older version failed.
I am stuck. I can't down grade hostapd. I can't fix hostapd, which is probably the root cause.

Dazz

Return to “Troubleshooting”