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

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

Thanks, Markus.
Have a nice weekend.

Best regards from Warstein

Hello, can everyone post the Code from the files with the “-x” ?
Can anyone help me ?

File:
/opt/openhabian/functions/openhab.bash
string:

if ! cond_redirect apt-get ${APT_INST_OPTS} install “openhab2=${openhabVersion}”; then echo “FAILED (apt)”; exit 1; fi

What needs to be fixed?

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

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

Now it works!

This ??

Warning: apt-key output should not be parsed (stdout is not a terminal)

Conducted an experiment.
File /opt/openhabian/openhab.bash, string 47.
If wget save to file “-” (stdout):

sudo wget --no-check-certificate -O - ‘Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog’ | apt-key add -
then:

  •              [ <=>                ]       0  --.-KB/s    per 0s      
    

Unable to write to «-» (Channel break).

If wget saves to file “111”:

sudo wget --no-check-certificate -O /home/openhabian/111 ‘Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog’ | apt-key add /home/openhabian/111
then:

/home/openhabian/111 [ <=> ] 3,14K --.-KB/s per 0,001s
2020-04-05 07:45:12 (5,61 MB/s) - «/home/openhabian/111» saved [3219]

New to [openHABian], I had this issue. Executing sudo openhabian-config and using option 03 worked for me. Thanks

Anyone, can you please state if installing straight from image works now.
If no where does it break ? Send /boot/first-boot.log

Note selecting option 03 in openhabian-config will execute the same code that unattended install failed in.

… because you did not prefix the 2nd command (after the pipe) with “sudo”

It’s still broken. I can’t attach the log (new user). Latest lines:

2020-04-06_12:40:22_CEST [openHABian] Adding slightly tuned vim config file to system… OK
2020-04-06_12:40:22_CEST [openHABian] Downloading and setting up FireMotD… OK
2020-04-06_12:41:47_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK… OK
2020-04-06_12:43:10_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-06_12:43:21_CEST [openHABian] Initial setup exiting with an error!

I don’t understand anything!
The third day stops at the same place: FAILED (apt).
Now launched:

cd /opt/openhabian
sudo ./openhabian-setup.sh unattended

and finally saw openhabian-config. Loading …
What was it?

Yes you can run the openhabian-config, but it won’t run the openhab. There is still the /opt/openHABian-install-failed file.

I understand that this is not all.
I sequentially executed the commands from the file /boot/first-boot.bash after the command
if (/bin/bash /opt/openhabian/openhabian-setup.sh unattended); then.
Now I think what to do next.

Ok, I see it from another computer.
Can I restart RPi or need something else?

All to have hit this problem, please try again.

Those who had used openhabian-config to complete their installation, please also reboot (your box should repeat installing unless you have removed /opt/openHABian-install-failed)
While it might have apparently worked, there’s a number of things to miss because of premature termination of the automatic install run.

Thanks, Markus.

Reboot did not finish the broken setup. I had to start over from scratch. The setup finished successfully now.
Thank you!