0

We have been testing "PiSignage", an opensource digital signage solution, on a Raspberry Pi 3 running Buster. We have a webserver that is hosting a webpage we intended on using as an "asset" for PiSignage. Access to the URL is restricted to whitelisted IP addresses only.

The pi accesses the URL as expected with a freshly configured instance of PiSignage, but after performing a "factory reset" in PiSignage, the pi is no longer able to access the URL unless I whitelist our firewalls IP. The pi and firewall are on the same subnet . . . The pi is hardwired.

Anyway, I was able to reproduce this 3 times. Every time I "factory reset" a fresh install of the PiSignage software on a pi . . . the whitelist doesn't work unless the firewall IP is also whitelisted. I don't know what changes PiSignage makes when performing its "factory reset", but I did notice after each reboot the message Failed to start dhcpcd.service on all interfaces during boot.

I'm not sure how to troubleshoot this.

The dhcpcd.service status after a "factory reset":

pi@testing:/var/lib/dhcpcd5$ systemctl status dhcpcd.service
Warning: The unit file, source configuration file or drop-ins of dhcpcd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
* dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/dhcpcd.service.d
           `-wait.conf
   Active: failed (Result: exit-code) since Wed 2023-07-26 19:49:57 IST; 29min ago
  Process: 437 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

Jul 26 19:49:57 testing systemd[1]: Starting dhcpcd on all interfaces...
Jul 26 19:49:57 testing dhcpcd[437]: Not running dhcpcd because /etc/network/interfaces
Jul 26 19:49:57 testing dhcpcd[437]: defines some interfaces that will use a
Jul 26 19:49:57 testing dhcpcd[437]: DHCP client or static address
Jul 26 19:49:57 testing systemd[1]: dhcpcd.service: Control process exited, code=exited, status=6/NOTCONFIGURED
Jul 26 19:49:57 testing systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
Jul 26 19:49:57 testing systemd[1]: Failed to start dhcpcd on all interfaces.

The /etc/network/interfaces:

auto eth0
auto lo
allow-hotplug eth0
allow-hotplug usb0
allow-hotplug usb1

iface lo inet loopback

iface eth0 inet dhcp

iface usb0 inet static
      address 192.168.42.10
      netmask 255.255.255.0
      gateway 192.168.42.129
iface usb1 inet static
      address 192.168.42.10
      netmask 255.255.255.0
      gateway 192.168.42.129

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp

Pre "factory reset" on a fresh instance of PiSignage - dhcpcd.service:

pi@raspberrypi:/var/lib/dhcpcd5$ systemctl status dhcpcd.service
* dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/dhcpcd.service.d
           `-wait.conf
   Active: active (running) since Wed 2023-07-26 20:32:16 IST; 3min 47s ago
  Process: 379 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=0/SUCCESS)
 Main PID: 686 (dhcpcd)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/dhcpcd.service
           |-494 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
           `-686 /sbin/dhcpcd -q -w

Jul 26 20:32:16 raspberrypi dhcpcd[379]: forked to background, child pid 686
Jul 26 20:32:16 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Jul 26 20:32:16 raspberrypi dhcpcd[686]: wlan0: carrier acquired
Jul 26 20:32:16 raspberrypi dhcpcd[686]: wlan0: IAID dd:15:63:00
Jul 26 20:32:16 raspberrypi dhcpcd[686]: wlan0: adding address fe80::baac:d769:ad01:d538
Jul 26 20:32:16 raspberrypi dhcpcd[686]: wlan0: probing address 192.168.100.1/24
Jul 26 20:32:16 raspberrypi dhcpcd[686]: wlan0: soliciting an IPv6 router
Jul 26 20:32:21 raspberrypi dhcpcd[686]: wlan0: using static address 192.168.100.1/24
Jul 26 20:32:21 raspberrypi dhcpcd[686]: wlan0: adding route to 192.168.100.0/24
Jul 26 20:32:45 raspberrypi dhcpcd[686]: wlan0: no IPv6 Routers available
pi@raspberrypi:/var/lib/dhcpcd5$

Pre "factory reset" on a fresh instance of PiSignage - /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

Update: After messing around quite a bit I think I know what is happening. PiSignage is writing to /etc/network/interfaces after a "factory reset" is performed. I think that file is used by dhclient (network.services) . . . and that is where the conflict is?

I don't forecast using the factory reset option at all, especially with this issue, but it would still be nice to know how to reverse the changes in the event it was used...instead of reinstalling the OS.

I've noticed that dhcpcd and dhclient are both running on this PiSignage Raspberry OS img after a fresh install. I don't know if that's typical, but I'm assuming that it's not.

I've tried deleting the /etc/network/interfaces file and disabling dhclient with no luck . . . still have the strange issue with the web server seeing the pi present itself with the firewalls IP.

Should have mentioned this earlier, but the Pi is still accessible via its initial dhcp assigned IP after a PiSignage "factory reset".

1 Answer 1

0

The reason dhcpcd does not start is because you or the software you have installed is nobbling it.

Specifically /etc/interfaces calls dhcp and as you can only have one dhcp client this causes dhcpcd to disable itself (as noted in the first log you posted).

It is unclear why whoever created this is using the ancient Debian networking or if they have some reason why they haven't disabled dhcpcd. (The way interfaces is configured would never have been correct.) You should ask the authors of the software.

1
  • Thank you for your answer! From what I've read throughout the day, this is what I figured. Unfortunately, the developers have been slow to respond to anything I ask...if they even respond at all. Jul 27, 2023 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.