I have recently upgraded from openHAB 3 to openHab 4.2.1 and had some minor trouble but most things worked. Today I wanted to solve the things like percentage views and ended up with a non-working system. I cannot exactly describe what cause the problem, but right now no items, things, transformations - basically everything that is defined in files - is visible in the MainUI.
Is there any way to find out why openhab doesn’t load my files in /etc/openhab anymore?
Also when saving the files I don’t get the info about its reload.
The openhab.log is rather boring, the first real issue pops up when loading a page in MainUI which should show one of the items.
2024-09-29 21:55:04.296 [INFO ] [org.openhab.core.Activator ] - Starting openHAB 4.2.1 (Release Build)
2024-09-29 21:55:05.605 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2024-09-29 21:55:05.628 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '48.941853846052034,9.115353785595142'.
2024-09-29 21:55:05.632 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2024-09-29 21:55:09.938 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab:8080/rest/events's Observer
2024-09-29 21:55:10.009 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab:8080/rest/services/org.openhab.i18n/config's Observer
2024-09-29 21:55:10.022 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab:8080/rest/addons/suggestions's Observer
2024-09-29 21:55:10.039 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab:8080/rest/addons/services's Observer
2024-09-29 21:55:33.196 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2024-09-29 21:55:42.363 [WARN ] [ty.util.ssl.SslContextFactory.config] - Trusting all certificates configured for Client@1c7aac3[provider=null,keyStore=null,trustStore=null]
2024-09-29 21:55:42.368 [WARN ] [ty.util.ssl.SslContextFactory.config] - No Client EndPointIdentificationAlgorithm configured for Client@1c7aac3[provider=null,keyStore=null,trustStore=null]
2024-09-29 21:55:43.858 [INFO ] [nternal.manager.ShellyManagerServlet] - Shelly Manager gestartet und erreichbar unter http(s)://192.168.0.6:8080/shelly/manager
2024-09-29 21:55:44.423 [WARN ] [ty.util.ssl.SslContextFactory.config] - Trusting all certificates configured for Client@298fdb[provider=null,keyStore=null,trustStore=null]
2024-09-29 21:55:44.426 [WARN ] [ty.util.ssl.SslContextFactory.config] - No Client EndPointIdentificationAlgorithm configured for Client@298fdb[provider=null,keyStore=null,trustStore=null]
2024-09-29 21:55:47.266 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource
2024-09-29 21:56:17.302 [WARN ] [core.karaf.internal.FeatureInstaller] - The transformation add-on 'javascript' does not exist - ignoring it.
2024-09-29 22:25:39.058 [ERROR] [jdbc.internal.JdbcPersistenceService] - JDBC::query: unable to get item for itemName: 'Greenrock_BAT_Level'. Ignore and give up!
It sounds like openHAB either doesn’t know the location of your files or has lost the ability to access them.
If you’re using openHABian, you can try fixing the file permissions in openhabian-config. It’s option 14.
If you’re not using openHABian, you’ll need to provide more information about your system for someone (other than me) to help you fix it. I only know openHABian.
I don’t use openHABian, instead it is a plain debian installation on a RPi4 and OH installed with apt.
The files have been loaded nicely since years and obviously I just broke it. I tried to undo all those tries but cannot identify the cause or even trigger an error message in the logs by bringing in syntax errors into the files I changed yesterday.
It really feels as there is a configuration on where the config files are searched and this would have changed. File permissions I already checked and reassinged to user openhab:openhab but this was the owner/group also before.
now I tried, yes, but without success. The behavior is still the same. Openhab starts up “very fast” and has a long commandline with -Dopenhab.conf=/etc/openhab
in it. Will try further, any idea to find out why openHAB is not reading the etc file is warmly welcome!
no, I mean etc/default/openhab file it is the file used to alter the startup if user has made any changes to the behaviors in the openhab.sh script the recommended place to make those changes is etc/default/openhab so they are picked up and parsed correctly.
I assumed that since he was running a pure Debian apt based install he would have access to those files.
if you open the openhab.sh file located etc/profile.d the first 3 lines discuss where to make
changes environmental variables to the start up behavior.
Since we do not know what all he changed we start with what could have been altered and then if nothing stands out he can also enable startup debug from this file as well on line 62 to get more verbose logging during startup.
This is my /etc/defaults/openhab - will probably try to set OPENHAB_STARTMODE=debug later…
# openHAB service options
#########################
## PORTS
## The ports openHAB will bind its HTTP/HTTPS web server to.
#OPENHAB_HTTP_PORT=8080
#OPENHAB_HTTPS_PORT=8443
#########################
## HTTP(S) LISTEN ADDRESS
## The listen address used by the HTTP(S) server.
## 0.0.0.0 (default) allows a connection from any location
## 127.0.0.1 only allows the local machine to connect
#OPENHAB_HTTP_ADDRESS=0.0.0.0
#########################
## BACKUP DIRECTORY
## Set the following variable to specify the backup location.
## runtime/bin/backup and runtime/bin/restore will use this path for the zip files.
#OPENHAB_BACKUPS=/var/lib/openhab/backups
#########################
## JAVA OPTIONS
## Additional options for the JAVA_OPTS environment variable.
## These will be appended to the execution of the openHAB Java runtime in front of all other options.
##
## A couple of independent examples:
## EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyZWAVE:/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
## EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyZWave"
EXTRA_JAVA_OPTS=""
#########################
## OPENHAB DEFAULTS PATHS
## The following settings override the default apt/rpm locations and should be used with caution.
## openHAB will fail to update itself if you're using different paths.
## Only set these if you are testing and are confident in debugging.
#OPENHAB_HOME=/usr/share/openhab
#OPENHAB_CONF=/etc/openhab
#OPENHAB_RUNTIME=/usr/share/openhab/runtime
#OPENHAB_USERDATA=/var/lib/openhab
#OPENHAB_LOGDIR=/var/log/openhab
#########################
## OPENHAB USER AND GROUP
## The user and group that takes ownership of openHAB. Only available for init.d systems.
## To edit user and group for systemd, see the service file at /usr/lib/systemd/system/openhab.service.
#OPENHAB_USER=openhab
#OPENHAB_GROUP=openhab
#########################
## SYSTEMD START MODE
## The Karaf startmode for the openHAB runtime. Only available for systemctl/systemd systems.
## Defaults to daemon when unset here. Multiple options can be used without quotes.
## debug increases log output. daemon launches the Karaf/openHAB processes.
#OPENHAB_STARTMODE=debug
Did you try to move all files and add one by one back? I remember some odd behaviour with empty rules preventing the runtime to conti ue.
I ask this because it remains ar startlevel 10?! Something g seems to prevent it from proceeding.
00 - OSGi framework has been started.
10 - OSGi application start level has been reached, i.e. bundles are activated.
20 - Model entities (items, things, links, persist config) have been loaded, both from db as well as files.
30 - Item states have been restored from persistence service, where applicable.
40 - Rules are loaded and parsed, both from db as well as dsl and script files.
50 - Rule engine has executed all "system started" rules and is active.
70 - User interface is up and running. (planned, not included yet)
80 - All things have been initialized. (planned, not included yet)
100 - Startup is fully complete.
not systematically yet. I hoped to be able to see some “debug output” and what I tried was only modifying the files that I have changed yesterday evening while the problem popped up. - Will try it.
there are a few items visible - which I obviously created in the UI. I did that from time to time when I wanted to try something and normally deleted the UI-items again when making it permanent in the items files. But seemingly I have missed a few…