Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenHAB 4.1.2 - Karaf cannot start #4231

Open
EnziinSystem opened this issue May 15, 2024 · 2 comments
Open

OpenHAB 4.1.2 - Karaf cannot start #4231

EnziinSystem opened this issue May 15, 2024 · 2 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@EnziinSystem
Copy link

My environment:

  • Raspberry Pi-5 with OS 64-bit
  • Java 17 Zulu
  • OpenHAB 4.1.2
$ uname -a
Linux smarthome 6.6.30-v8+ #1763 SMP PREEMPT Mon May 13 17:50:31 BST 2024 aarch64 GNU/Linux

$ java --version
openjdk 17.0.11 2024-04-16 LTS
OpenJDK Runtime Environment Zulu17.50+19-CA (build 17.0.11+9-LTS)
OpenJDK 64-Bit Server VM Zulu17.50+19-CA (build 17.0.11+9-LTS, mixed mode, sharing)

Install OpenHAB 4.1.2

Create a Linux system user for openHAB.

sudo adduser --system --no-create-home --group --disabled-login openhab

wget -O openhab-download.zip https://github.com/openhab/openhab-distro/releases/download/4.1.2/openhab-4.1.2.zip

sudo unzip openhab-download.zip -d /opt/openhab

Grant permission

sudo chown -hR openhab:openhab /opt/openhab

Privileges for Common Peripherals

sudo adduser openhab dialout
sudo adduser openhab tty
sudo adduser openhab audio

sudo adduser $USER dialout
sudo adduser $USER tty

sudo usermod -a -G dialout openhab
sudo usermod -a -G dialout $USER

Execute as restricted user openhab:

$ sudo su -s /bin/bash -c "/opt/openhab/start.sh" openhab
Launching the openHAB runtime...
/opt/openhab/runtime/bin/karaf: 54: cd: can't cd to /home/developer
/opt/openhab/runtime/bin/karaf: 67: .: cannot open ./inc: Permission denied

I think I do very basic, things and nothing special. Everything is there, permissions have been granted, but a permissions error occurs.

@EnziinSystem EnziinSystem added the bug An unexpected problem or unintended behavior of the Core label May 15, 2024
@rkoshak
Copy link

rkoshak commented May 15, 2024

Shouldn't the command to start OH be the following?

sudo -u openhab /opt/openhab/start.sh

Is there a reason you are not installing from the package manager?

@EnziinSystem
Copy link
Author

Shouldn't the command to start OH be the following?

sudo -u openhab /opt/openhab/start.sh

Is there a reason you are not installing from the package manager?

I choose the manual installation method so that I always have the version I want and it is only located in the /opt/openhab directory.

What's wrong with installing it manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

2 participants