[openHABian] Initial setup exiting with an error! gpg: no valid OpenPGP data found

Hello team

I can’t finish setup on new Raspi 4, each time I reboot, it ends up with:

OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
2020-04-02_16:09:56_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK… OK
2020-04-02_16:11:46_CEST [openHABian] Installing or upgrading to latest openHAB release (stable)… Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
FAILED (key)
2020-04-02_16:11:47_CEST [openHABian] Initial setup exiting with an error!

Also, I can’t setup wifi ?

Thank you

Add a “ -x” at the end of the first line of openhab.bash, packages.bash and system.bash in /opt/openhabian/functions/ and post /boot/first-boot.log

1 Like
2020-04-02_18:28:04_CEST [openHABian] Starting the openHABian initial setup.
2020-04-02_18:28:04_CEST [openHABian] Storing configuration... OK
2020-04-02_18:28:04_CEST [openHABian] Starting webserver with installation log... OK
2020-04-02_18:28:11_CEST [openHABian] Changing default username and password... SKIPPED
2020-04-02_18:28:11_CEST [openHABian] Setting up Ethernet connection... OK
2020-04-02_18:28:11_CEST [openHABian] Ensuring network connectivity... OK
2020-04-02_18:28:11_CEST [openHABian] Waiting for dpkg/apt to get ready... OK
2020-04-02_18:28:38_CEST [openHABian] Updating repositories and upgrading installed packages... OK
2020-04-02_18:28:47_CEST [openHABian] Installing git package... OK
2020-04-02_18:28:53_CEST [openHABian] Cloning myself... OK
2020-04-02_18:28:59_CEST [openHABian] Executing 'openhabian-setup.sh unattended'...
2020-04-02_18:28:59_CEST [openHABian] Checking for root privileges... OK
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:3 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:4 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Fetched 6,051 B in 1s (5,656 B/s)
Reading package lists...
2020-04-02_18:29:03_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-04-02_18:29:03_CEST [openHABian] Setting timezone based on IP geolocation... FAILED
2020-04-02_18:29:06_CEST [openHABian] Setting locale based on openhabian.conf... 2020-04-02_18:30:32_CEST [openHABian] Starting the openHABian initial setup.
2020-04-02_18:30:32_CEST [openHABian] Storing configuration... OK
2020-04-02_18:30:33_CEST [openHABian] Starting webserver with installation log... OK
2020-04-02_18:30:38_CEST [openHABian] Changing default username and password... SKIPPED
2020-04-02_18:30:38_CEST [openHABian] Setting up Ethernet connection... OK
2020-04-02_18:30:38_CEST [openHABian] Ensuring network connectivity... OK
2020-04-02_18:30:39_CEST [openHABian] Waiting for dpkg/apt to get ready... OK
2020-04-02_18:31:07_CEST [openHABian] Updating repositories and upgrading installed packages... OK
2020-04-02_18:31:22_CEST [openHABian] Installing git package... OK
2020-04-02_18:31:28_CEST [openHABian] Cloning myself... OK
2020-04-02_18:31:34_CEST [openHABian] Executing 'openhabian-setup.sh unattended'...
2020-04-02_18:31:34_CEST [openHABian] Checking for root privileges... OK
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:3 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:4 https://dl.bintray.com/openhab/apt-repo2 stable Release [6051 B]
Fetched 6051 B in 1s (5630 B/s)
Reading package lists...
2020-04-02_18:31:38_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-04-02_18:31:38_CEST [openHABian] Setting timezone based on IP geolocation... FAILED
2020-04-02_18:31:43_CEST [openHABian] Setting locale based on openhabian.conf... OK
2020-04-02_18:32:37_CEST [openHABian] Setting hostname of the base system... OK
2020-04-02_18:32:38_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2020-04-02_18:32:38_CEST [openHABian] Enabling Audio output... OK
2020-04-02_18:32:38_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2020-04-02_18:32:41_CEST [openHABian] Installing additional needed packages... OK
2020-04-02_18:32:42_CEST [openHABian] Adding slightly tuned bash config files to system... OK
2020-04-02_18:32:42_CEST [openHABian] Adding slightly tuned vim config file to system... OK
2020-04-02_18:32:42_CEST [openHABian] Downloading and setting up FireMotD... OK
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
2020-04-02_18:34:22_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... OK
2020-04-02_18:36:24_CEST [openHABian] Installing or upgrading to latest openHAB release (stable)... Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
FAILED (key)
2020-04-02_18:36:24_CEST [openHABian] Initial setup exiting with an error!


Looks like the -x is gone after reboot… in both files

Hello Guys,

Is there any update on the topic?

Thanks!

Hello,
I have the same problem with Ethernet and WiFi.

Same :raising_hand_man:t4:

The same problem for me. Someone know how to resolve the problem ?

In the file ‘openhab.bash’ must be the error

if ! cond_redirect wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | apt-key add -; then echo "FAILED (key)"; exit 1; fi

I have change the line to:

if ! cond_redirect wget --no-check-certificate -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | apt-key add -; then echo "FAILED (key)"; exit 1; fi

But while booting the file is overwritten :frowning:

Same here!.. Thinking of downgrading.

Can’t we just modify and run manually ? I assume if all runs fine, there will be something done at the end that will prevent this to run again at next restart ?

why do you think that? the line you quote was recently changed, true.
But it executes fine if entered manually.

Try commenting out the line to read if git clone ... in /opt/openhabian/build-image/first-boot.bash, add those -x again and reboot.

I’m pretty new to this but maybe someone more experienced can get something out of it.

I have the same problem. With a SD card with the exact same image that worked perfectly yesterday. After connecting a screen to the RPI4 I found another few lines below the error:

2020-04-02_23:02:19_BST [openHABian] Script '/boot/first-boot.bash' failed.
[FAILED] Failed to start /etc/rc.local Compability.
See 'systemctl status rc-local.service' for details.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Raspian GNU/Linux 10 openhab tty1

I ran “systemctl status rc-local.service” in PuTTY and got this:

Warning: The unit file, source configuration file or drop-ins of rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
           /etc/systemd/system/rc-local.service.d
           └─ttyoutput.conf
   Active: failed (Result: exit-code) since Thu 2020-04-02 23:02:19 BST; 12min ago
     Docs: man:systemd-rc-local-generator(8)
  Process: 520 ExecStart=/etc/rc.local start (code=exited, status=1/FAILURE)

Apr 02 22:58:44 openhab systemd[1]: Starting /etc/rc.local Compatibility...
Apr 02 23:02:19 openhab systemd[1]: rc-local.service: Control process exited, code=exited, status=1/FAILURE
Apr 02 23:02:19 openhab systemd[1]: rc-local.service: Failed with result 'exit-code'.
Apr 02 23:02:19 openhab systemd[1]: Failed to start /etc/rc.local Compatibility.

I tried “systemctl daemon-reload” but it doesn’t help.

Any ideas? Thanks.

@mstormi sorry for my ignorance but could you explain exactly how and where to add the “-x”. It seems that every time I reboot the files get overwritten with the default ones and my changes are gone.

Ok, line 150 commented, -x added back in the 3 files, reboot started

But it fails all the same:

OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178)
OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)
2020-04-03_07:39:11_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... OK
2020-04-03_07:40:46_CEST [openHABian] Installing or upgrading to latest openHAB release (stable)... Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
FAILED (key)
2020-04-03_07:40:47_CEST [openHABian] Initial setup exiting with an error!

Aren’t those file overwritten at boot time before the first run ? I mean I edit those files via ssh, so if there is something that overwrites at boot, this won’t help

Same :raising_hand_man:t4:

Same error again :woman_facepalming:

I’ve checked back some older topics and found that one solution was related to the APT / repo key.
I’m just not sure if we are facing the same problem now, but seems many people are affected.

Is it something we can do ourselves to fix?

Anyone, please retry (= reboot) and let me know if there’s a change.