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

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.

What do you mean by retry ? Just reboot ?

I have started a new installation and it seems to be working now.
I still get the gpg-error, but as you described in the #821-thread on github, it does not terminate the installation.
I will let you know if I find any problems.
Thanks a lot for fast help.

UPDATE:
The first SD card which I have tried the different solutions (add - x etc.) worked fine when I did a reboot. But when I tried the new card with the same original image on, it failed with error FAILED(apt) instead of FAILED(key).

Ok, it seems to go a step urther, will wait until it’s done

2020-04-03_12:37:41_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... OK
2020-04-03_12:39:31_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.
OK
2020-04-03_12:40:22_CEST [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... Replacing... OK

YES !!! it worked

Unfortunatelly, it is the same for me… :frowning_face:

does your box have proper internet access?

I’m not sure how I confirm internet access? I see it on the network, responds to the local ping request.
However, I can not reach it from the browser with the domain name, only with the local IP.
SSH works (that’s the way I get the error log)

2020-04-03_16:28:26_CEST [openHABian] Downloading and setting up FireMotD… OK <

Does this mean it has internet access?

Now I have got it to work on a new install.

  1. Installed with fresh card and image -> FAILED(apt)
  2. Did all the changes @mstormi suggested above, i.e. comment the line “if git …” and putting -x in some files (see above)
  3. Rebooted and waited for the installation to finish.

Now it works!

Probably but not necessarily.
But when you can login using SSH, you can diagnose that (ping, wget)
Or try executing sudo openhabian-config. Not guaranteed it works at that half-baked stage but worth a try. Try option 03 or 41 to install openhab2, that’s probably where @pacjo and you were stuck.
(and add that -x to openhab.bash before, see above, to get debug output)

2 Likes

Sorry to throw in a stupid question from a guy that only has very little Linux knowledge: where to find openhab.bash?

I have still problems with the installation :frowning:

Now:

2019-07-10_01:21:34_BST [openHABian] Starting the openHABian initial setup.
2019-07-10_01:21:34_BST [openHABian] Storing configuration... OK
2019-07-10_01:21:34_BST [openHABian] Starting webserver with installation log... OK
2019-07-10_01:21:40_BST [openHABian] Changing default username and password... OK
2019-07-10_01:21:47_BST [openHABian] Setting up Wi-Fi connection... OK, rebooting... 
2019-07-10_01:22:01_BST [openHABian] Starting the openHABian initial setup.
2019-07-10_01:22:01_BST [openHABian] Storing configuration... OK
2019-07-10_01:22:01_BST [openHABian] Starting webserver with installation log... OK
2019-07-10_01:22:06_BST [openHABian] Changing default username and password... SKIPPED
2019-07-10_01:22:06_BST [openHABian] Setting up Wi-Fi connection... OK
2019-07-10_01:22:10_BST [openHABian] Ensuring network connectivity... OK
2019-07-10_01:22:10_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2020-04-03_15:17:27_BST [openHABian] Updating repositories and upgrading installed packages... OK
2020-04-03_15:21:41_BST [openHABian] Installing git package... OK
2020-04-03_15:21:59_BST [openHABian] Cloning myself... OK
2020-04-03_15:22:01_BST [openHABian] Executing 'openhabian-setup.sh unattended'... 
2020-04-03_15:22:01_BST [openHABian] Checking for root privileges... OK
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists...
2020-04-03_15:22:05_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-04-03_15:22:05_BST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
2020-04-03_16:22:05_CEST [openHABian] Setting locale based on openhabian.conf... OK
2020-04-03_16:22:43_CEST [openHABian] Setting hostname of the base system... OK
2020-04-03_16:22:43_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2020-04-03_16:22:43_CEST [openHABian] Enabling Audio output... OK
2020-04-03_16:22:44_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2020-04-03_16:23:52_CEST [openHABian] Installing additional needed packages... OK
2020-04-03_16:24:37_CEST [openHABian] Adding slightly tuned bash config files to system... OK
2020-04-03_16:24:37_CEST [openHABian] Adding slightly tuned vim config file to system... OK
2020-04-03_16:24:37_CEST [openHABian] Downloading and setting up FireMotD... OK 
2020-04-03_16:25:38_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... OK
2020-04-03_16:26:29_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 (apt)
2020-04-03_16:26:37_CEST [openHABian] Initial setup exiting with an error!


2020-04-03_16:24:40_CEST [openHABian] Starting the openHABian initial setup.
2020-04-03_16:24:40_CEST [openHABian] Storing configuration... OK
2020-04-03_16:24:40_CEST [openHABian] Starting webserver with installation log... OK
2020-04-03_16:24:45_CEST [openHABian] Changing default username and password... SKIPPED
2020-04-03_16:24:45_CEST [openHABian] Setting up Wi-Fi connection... OK
2020-04-03_16:24:49_CEST [openHABian] Ensuring network connectivity... OK
2020-04-03_16:24:49_CEST [openHABian] Waiting for dpkg/apt to get ready... 2020-04-03_17:02:05_CEST [openHABian] Starting the openHABian initial setup.
2020-04-03_17:02:05_CEST [openHABian] Storing configuration... OK
2020-04-03_17:02:05_CEST [openHABian] Starting webserver with installation log... OK
2020-04-03_17:02:10_CEST [openHABian] Changing default username and password... SKIPPED
2020-04-03_17:02:10_CEST [openHABian] Setting up Wi-Fi connection... OK
2020-04-03_17:02:14_CEST [openHABian] Ensuring network connectivity... OK
2020-04-03_17:02:14_CEST [openHABian] Waiting for dpkg/apt to get ready... 

With a new SD-Card the first boot up Failed, after a restart it hangs up on Step

[openHABian] Waiting for dpkg/apt to get ready...

after ‘Cleanup of Temporary Directories’

I waited one hour but nothing changed.

Has anybody a working solution?

This one works!
I run sudo openhabian-config, then option 3 and it’s up and running.
Even after a shutdown the system is coming back, and is accessible.

Thank you! :clap:

2 Likes

Thanks Markus!

That did the trick :slight_smile:

Have a beautiful weekend!

2 posts were split to a new topic: openHABian install problems