Disable Influxdb dependency during startup

Is it possible to disable Influxdb dependency during startup?
Scenario, I have Influxdb running on a vm, my openHAB runs on a raspberry pi, in power outage the raspberry pi will power on once the power returns but my proxmox server will not boot up until openHAB kicks off a rule to start the proxmox server via wakeonlan, openHAB monitors NUT server to confirm there is enough battery charged and line power. The issue is that openHAB will not complete the startup process until Influxdb is online.

2025-04-27 09:20:04.143 [WARN ] [rnal.influx2.InfluxDB2RepositoryImpl] - database not ready
2025-04-27 09:20:07.210 [WARN ] [b.client.internal.InfluxDBClientImpl] - The exception occurs during check instance readiness
com.influxdb.exceptions.InfluxException: No route to host

I’ve searched in the forums and in the configs a way to disable this dependency with no luck.

Thanks in advance.

OH shouldn’t stop there. It should warn but it will continue to start up and run everything else. The only way I can think this could cause problems in OH startup would be if you are trying to use restoreOnStartup from InfluxDB. In that case OH is stuck becuase it can’t initialize the Items with the last state stored in InfluxDB becuase it’s not available. But even then that should prevent the rest of OH from starting.

If you are using restoreOnStartup with InfluxDB, that’s a bad idea in this scenario anyway. You should use MapDB for that instead and remove that job from InfluxDB.

Are those the last logs you see? What runlevel does OH make it to? Are your Things comming online?

I indeed had the default restoreOnStartup but I had disabled and tried again with the same results. Those where a few lines of logs when OH was stuck trying to startup. As far as I can tell it did not make it far, none of my things were loaded.
I’ve uploaded a snipped of the original log file, the whole file is about 8.5MB of influxdb failures.

failed_openhab.log (58.9 KB)

The snipped below is when I brought Influxdb back online.

2025-04-27 09:51:30.381 [WARN ] [influxdb.internal.AbstractRestClient] - Ping request wasn't successful
java.net.ConnectException: Failed to connect to /10.2.2.67:8086
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) ~[bundleFile:?]
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207) ~[bundleFile:?]
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) ~[bundleFile:?]
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[bundleFile:?]
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[bundleFile:?]
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[bundleFile:?]
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at com.influxdb.client.internal.GzipInterceptor.intercept(GzipInterceptor.java:91) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:154) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at com.influxdb.client.internal.AuthenticateInterceptor.intercept(AuthenticateInterceptor.java:103) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at com.influxdb.internal.UserAgentInterceptor.intercept(UserAgentInterceptor.java:60) ~[bundleFile:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[bundleFile:?]
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[bundleFile:?]
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[bundleFile:?]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:207) ~[bundleFile:?]
	at com.influxdb.internal.AbstractRestClient.ping(AbstractRestClient.java:194) [bundleFile:?]
	at com.influxdb.client.internal.InfluxDBClientImpl.ping(InfluxDBClientImpl.java:277) [bundleFile:?]
	at org.openhab.persistence.influxdb.internal.influx2.InfluxDB2RepositoryImpl.checkConnectionStatus(InfluxDB2RepositoryImpl.java:127) [bundleFile:?]
	at org.openhab.persistence.influxdb.internal.influx2.InfluxDB2RepositoryImpl.connect(InfluxDB2RepositoryImpl.java:104) [bundleFile:?]
	at org.openhab.persistence.influxdb.InfluxDBPersistenceService.checkConnection(InfluxDBPersistenceService.java:275) [bundleFile:?]
	at org.openhab.persistence.influxdb.InfluxDBPersistenceService.query(InfluxDBPersistenceService.java:236) [bundleFile:?]
	at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.net.ConnectException: Connection refused
	at sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
	at sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[?:?]
	at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:554) ~[?:?]
	at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
	at java.net.Socket.connect(Socket.java:633) ~[?:?]
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) ~[bundleFile:?]
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ~[bundleFile:?]
	... 39 more
2025-04-27 09:51:30.384 [WARN ] [rnal.influx2.InfluxDB2RepositoryImpl] - database not ready
2025-04-27 09:51:36.127 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2025-04-27 09:51:41.658 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2025-04-27 09:51:43.242 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.2.2.66' with clientid 83f5bbdc-29b1-49f1-8921-c1e92e887218
2025-04-27 09:51:46.952 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

As far as I can tell OH was really hung up on just trying to connect to Influxdb.

I suspect that’s a symptom and not the root cause because OH starts up various parts of itself in parallel. The failure of a persistence add-on to connect has no influence over the part of OH that loads the bindings or the Items or the Things.

I recommend upgrading to 4.3.5 (the latest release) just in case there was a bug that is related to this problem that got fixed and back ported. As part ofthat upgrade, the cache will get cleared which is the second setp to try anyway so you get two steps in one by upgrading.

If it still has problems, set the logger org.openhab.StartLevelEvent to INFO which will add a log statement to events.log every time OH progresses from one start level to the next. That will tell us where OH is getting stuck.

Rich,
I think the restoreOnStartUp was the culprit. I ended up removing influxdb persistence, re-added reconfigured and tested again and OH was able to start up and load up all my things.

Resolution: do not enable restoreOnStartUp for a remote influxdb.

Thank you