Recently moving to a fresh install of OH3 from an old install of OH2. I had mysql persistence setup and running without issue for several years connecting to another machine running mysql on my LAN.
I now have a working OH3 install on the same machine I had OH2 on but using a new disk (fresh install, not upgrade) but cannot get the new JDBC-mysql persistence working.
The new install is the same IP as my old install and I have confirmed that I can still connect to my machine running the mysql server on the command line and everything is still there:
openhabian@opi:/etc/openhab/persistence $ sudo -u openhab mysql -u openhab -p -h 192.168.1.100 -D OpenHAB
[sudo] password for openhabian:
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 7213
Server version: 8.0.27-0ubuntu0.20.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [OpenHAB]> USE OpenHAB
Database changed
MySQL [OpenHAB]> show tables;
+-------------------+
| Tables_in_OpenHAB |
+-------------------+
| Item1 |
| Item10 |
| Item100 |
| Item101 |
| Item102 |
| Item103 |
| Item104 |
| Item105 |
| Item106 |
| Item107 |
| Item108 |
| Item109 |
| Item11 |
| Item110 |
| Item111 |
| Item112 |
| Item113 |
| Item114 |
| Item115 |
| Item116 |
| Item117 |
| Item118 |
| Item119 |
| Item12 |
| Item120 |
| Item121 |
| Item122 |
| Item123 |
| Item124 |
| Item125 |
| Item126 |
| Item127 |
| Item128 |
| Item129 |
| Item13 |
| Item130 |
| Item131 |
| Item132 |
| Item133 |
| Item134 |
| Item135 |
| Item136 |
| Item137 |
| Item138 |
| Item139 |
| Item14 |
| Item140 |
| Item141 |
| Item142 |
| Item15 |
| Item16 |
| Item17 |
| Item18 |
| Item19 |
| Item2 |
| Item20 |
| Item21 |
| Item22 |
| Item23 |
| Item24 |
| Item25 |
| Item26 |
| Item27 |
| Item28 |
| Item29 |
| Item3 |
| Item30 |
| Item31 |
| Item32 |
| Item33 |
| Item34 |
| Item35 |
| Item36 |
| Item37 |
| Item38 |
| Item39 |
| Item4 |
| Item40 |
| Item41 |
| Item42 |
| Item43 |
| Item44 |
| Item45 |
| Item46 |
| Item47 |
| Item48 |
| Item49 |
| Item5 |
| Item50 |
| Item51 |
| Item52 |
| Item53 |
| Item54 |
| Item55 |
| Item56 |
| Item57 |
| Item58 |
| Item59 |
| Item6 |
| Item60 |
| Item61 |
| Item62 |
| Item63 |
| Item64 |
| Item65 |
| Item66 |
| Item67 |
| Item68 |
| Item69 |
| Item7 |
| Item70 |
| Item71 |
| Item72 |
| Item73 |
| Item74 |
| Item75 |
| Item76 |
| Item77 |
| Item78 |
| Item79 |
| Item8 |
| Item80 |
| Item81 |
| Item82 |
| Item83 |
| Item84 |
| Item85 |
| Item86 |
| Item87 |
| Item88 |
| Item89 |
| Item9 |
| Item90 |
| Item91 |
| Item92 |
| Item93 |
| Item94 |
| Item95 |
| Item96 |
| Item97 |
| Item98 |
| Item99 |
| Items |
+-------------------+
143 rows in set (0.058 sec)
I configured the JDBC persistence as follows:
# the database url like 'jdbc:mysql://<host>:<port>/<database>' (without quotes)
url=jdbc:mysql://192.168.1.100:3306/OpenHAB?serverTimezone=America/New_York
# the database user
user=openhab
# the database password
password=redacted
# the reconnection counter
reconnectCnt=3
# the connection timeout (in seconds)
waitTimeout=28800
# Use MySQL Server time to store item values (=false) or use openHAB Server time (=true).
# For new installations, its recommend to set "localtime=true".
# (optional, defaults to false)
#localtime=true
#mysql:sqltype.string=VARCHAR(1024)
# for Migration from MYSQL-Bundle set to 'Item'.
jdbc:tableNamePrefix=Item
#
# for Migration from MYSQL-Bundle do not use real names.
jdbc:tableUseRealItemNames=false
#
# for Migration from MYSQL-Bundle set to 0.
jdbc:tableIdDigitCount=0
I have my same .persistence file from my previous install and renamed it from mysql.persistence to jdbc.persistence, although I’m not sure its required.
I put the binding in debug logging mode and stopped it, then restarted it through the console. Here is an example of what I see:
2022-01-17 19:25:48.243 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : BundleComponentActivator : ComponentHolder created.
2022-01-17 19:25:48.252 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : ConfigurableComponentHolder configuration updated for pid org.openhab.jdbc with change count 5
2022-01-17 19:25:48.253 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Dependency Manager created $000interface=org.openhab.core.items.ItemRegistry, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=null, field-option=null, collection-type=null, parameter=0
2022-01-17 19:25:48.255 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Dependency Manager created $001interface=org.openhab.core.i18n.TimeZoneProvider, filter=null, policy=static, cardinality=1..1, bind=null, unbind=null, updated=null, field=null, field-option=null, collection-type=null, parameter=1
2022-01-17 19:25:48.257 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Component created: DS=DS14, implementation=org.openhab.persistence.jdbc.internal.JdbcPersistenceService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[org.openhab.jdbc]
2022-01-17 19:25:48.259 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Component Services: scope=singleton, services=[org.openhab.core.persistence.PersistenceService, org.openhab.core.persistence.QueryablePersistenceService]
2022-01-17 19:25:48.260 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Component Properties: {service.config.label=JDBC Persistence Service, service.config.category=persistence, service.config.description.uri=persistence:jdbc, service.config.factory=false, service.pid=org.openhab.jdbc}
2022-01-17 19:25:48.262 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Querying state disabled
2022-01-17 19:25:48.263 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Querying state disabled
2022-01-17 19:25:48.264 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Component can not be activated since it is in state disabled
2022-01-17 19:25:48.265 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService] : Querying state disabled
2022-01-17 19:25:48.267 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Updating target filters
2022-01-17 19:25:48.268 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : No change in target property for dependency $000: currently registered: false
2022-01-17 19:25:48.269 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : No existing service listener to unregister for dependency $000
2022-01-17 19:25:48.271 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Setting target property for dependency $000 to null
2022-01-17 19:25:48.272 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : New service tracker for $000, initial active: false, previous references: {}, classFilter: (objectClass=org.openhab.core.items.ItemRegistry), initialReferenceFilter (objectClass=org.openhab.core.items.ItemRegistry)
2022-01-17 19:25:48.273 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $000 tracker reset (closed)
2022-01-17 19:25:48.278 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $000 tracking 1 SingleStatic added {org.openhab.core.items.ItemRegistry}={service.id=190, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.items.ItemRegistryImpl, component.id=21} (enter)
2022-01-17 19:25:48.279 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $000 tracking 1 SingleStatic active: false trackerOpened: false optional: false
2022-01-17 19:25:48.281 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $000 tracking 1 SingleStatic added {org.openhab.core.items.ItemRegistry}={service.id=190, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.items.ItemRegistryImpl, component.id=21} (exit)
2022-01-17 19:25:48.282 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $000 tracker opened
2022-01-17 19:25:48.284 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : registering service listener for dependency $000
2022-01-17 19:25:48.285 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : No change in target property for dependency $001: currently registered: false
2022-01-17 19:25:48.286 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : No existing service listener to unregister for dependency $001
2022-01-17 19:25:48.287 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Setting target property for dependency $001 to null
2022-01-17 19:25:48.288 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : New service tracker for $001, initial active: false, previous references: {}, classFilter: (objectClass=org.openhab.core.i18n.TimeZoneProvider), initialReferenceFilter (objectClass=org.openhab.core.i18n.TimeZoneProvider)
2022-01-17 19:25:48.289 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $001 tracker reset (closed)
2022-01-17 19:25:48.295 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $001 tracking 2 SingleStatic added {org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=42.88602714832883,-78.87814521789552, service.id=177, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=US, component.id=18, timezone=America/New_York, service.config.category=system, region=US, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]} (enter)
2022-01-17 19:25:48.296 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $001 tracking 2 SingleStatic active: false trackerOpened: false optional: false
2022-01-17 19:25:48.298 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $001 tracking 2 SingleStatic added {org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=42.88602714832883,-78.87814521789552, service.id=177, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=US, component.id=18, timezone=America/New_York, service.config.category=system, region=US, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]} (exit)
2022-01-17 19:25:48.299 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : dm $001 tracker opened
2022-01-17 19:25:48.300 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : registering service listener for dependency $001
2022-01-17 19:25:48.301 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Changed state from disabled to unsatisfiedReference
2022-01-17 19:25:48.303 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Component enabled
2022-01-17 19:25:48.303 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : ActivateInternal
2022-01-17 19:25:48.305 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state unsatisfiedReference
2022-01-17 19:25:48.306 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state unsatisfiedReference
2022-01-17 19:25:48.307 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Activating component from state unsatisfiedReference
2022-01-17 19:25:48.308 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state unsatisfiedReference
2022-01-17 19:25:48.310 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state unsatisfiedReference
2022-01-17 19:25:48.311 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Changed state from unsatisfiedReference to satisfied
2022-01-17 19:25:48.313 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : registration change queue [registered]
2022-01-17 19:25:48.317 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Checking constructor public org.openhab.persistence.jdbc.internal.JdbcPersistenceService(org.openhab.core.items.ItemRegistry,org.openhab.core.i18n.TimeZoneProvider)
2022-01-17 19:25:48.318 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getReferenceClass: Looking for interface class org.openhab.core.items.ItemRegistry through loader of org.openhab.persistence.jdbc.internal.JdbcPersistenceService
2022-01-17 19:25:48.319 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getParameterClass: Found class org.openhab.core.items.ItemRegistry
2022-01-17 19:25:48.320 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getReferenceClass: Looking for interface class org.openhab.core.i18n.TimeZoneProvider through loader of org.openhab.persistence.jdbc.internal.JdbcPersistenceService
2022-01-17 19:25:48.322 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getParameterClass: Found class org.openhab.core.i18n.TimeZoneProvider
2022-01-17 19:25:48.323 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Found constructor with 2 arguments : public org.openhab.persistence.jdbc.internal.JdbcPersistenceService(org.openhab.core.items.ItemRegistry,org.openhab.core.i18n.TimeZoneProvider)
2022-01-17 19:25:48.325 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : This thread collected dependencies
2022-01-17 19:25:48.325 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getService (single component manager) dependencies collected.
2022-01-17 19:25:48.327 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state satisfied
2022-01-17 19:25:48.327 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Querying state satisfied
2022-01-17 19:25:48.329 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : For dependency $000, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.items.ItemRegistry}={service.id=190, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.items.ItemRegistryImpl, component.id=21}] service: [null]]]
2022-01-17 19:25:48.330 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : For dependency $001, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.i18n.TranslationProvider, org.openhab.core.i18n.LocaleProvider, org.openhab.core.i18n.LocationProvider, org.openhab.core.i18n.TimeZoneProvider, org.openhab.core.i18n.UnitProvider}={location=42.88602714832883,-78.87814521789552, service.id=177, service.bundleid=151, service.scope=bundle, component.name=org.openhab.core.internal.i18n.I18nProviderImpl, language=en, service.config.label=Regional Settings, measurementSystem=US, component.id=18, timezone=America/New_York, service.config.category=system, region=US, service.config.description.uri=system:i18n, service.pid=[org.openhab.i18n, org.openhab.i18n]}] service: [null]]]
2022-01-17 19:25:48.333 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : getting activate: activate
2022-01-17 19:25:48.334 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Locating method activate in class org.openhab.persistence.jdbc.internal.JdbcPersistenceService
2022-01-17 19:25:48.335 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Declared Method org.openhab.persistence.jdbc.internal.JdbcPersistenceService.activate([interface org.osgi.service.component.ComponentContext]) not found
2022-01-17 19:25:48.336 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Found activate method: public void org.openhab.persistence.jdbc.internal.JdbcPersistenceService.activate(org.osgi.framework.BundleContext,java.util.Map)
2022-01-17 19:25:48.338 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : invoking activate: activate: parameters [org.eclipse.osgi.internal.framework.BundleContextImpl, org.apache.felix.scr.impl.helper.ReadOnlyDictionary]
2022-01-17 19:25:48.339 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::activate: persistence service activated
2022-01-17 19:25:48.340 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::updateConfig
2022-01-17 19:25:48.341 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::JdbcConfiguration
2022-01-17 19:25:48.342 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: configuration size = 15
2022-01-17 19:25:48.343 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: user=openhab
2022-01-17 19:25:48.344 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: password exists? true
2022-01-17 19:25:48.344 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: url=jdbc:mysql://192.168.1.100:3306/OpenHAB?serverTimezone=America/New_York
2022-01-17 19:25:48.345 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: found serviceName = 'mysql'
2022-01-17 19:25:48.346 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: Init Data Access Object Class: 'org.openhab.persistence.jdbc.db.JdbcMysqlDAO'
2022-01-17 19:25:48.347 [DEBUG] [nhab.persistence.jdbc.db.JdbcBaseDAO] - JDBC::initSqlTypes: Initialize the type array
2022-01-17 19:25:48.348 [DEBUG] [nhab.persistence.jdbc.db.JdbcBaseDAO] - JDBC::initSqlQueries: 'JdbcMysqlDAO'
2022-01-17 19:25:48.349 [DEBUG] [hab.persistence.jdbc.db.JdbcMysqlDAO] - JDBC::initSqlTypes: Initialize the type array
2022-01-17 19:25:48.350 [DEBUG] [hab.persistence.jdbc.db.JdbcMysqlDAO] - JDBC::initSqlQueries: 'JdbcMysqlDAO'
2022-01-17 19:25:48.351 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: dBDAO ClassName=org.openhab.persistence.jdbc.db.JdbcMysqlDAO
2022-01-17 19:25:48.353 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: errReconnectThreshold=3
2022-01-17 19:25:48.354 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: tableNamePrefix=Item
2022-01-17 19:25:48.355 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: tableUseRealItemNames=false
2022-01-17 19:25:48.355 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: tableIdDigitCount=0
2022-01-17 19:25:48.356 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: enableLogTime false
2022-01-17 19:25:48.357 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: load JDBC-driverClass was successful: 'com.mysql.jdbc.Driver'
2022-01-17 19:25:48.358 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: configuration complete. service=jdbc
2022-01-17 19:25:48.359 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::pingDB
2022-01-17 19:25:48.360 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection isDriverAvailable: true
2022-01-17 19:25:48.360 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: Driver is available::Yank setupDataSource
2022-01-17 19:25:48.401 [WARN ] [.zaxxer.hikari.util.DriverDataSource] - Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2022-01-17 19:25:48.522 [DEBUG] [ence.jdbc.internal.JdbcConfiguration] - JDBC::setDbConnected true
2022-01-17 19:25:48.523 [DEBUG] [hab.persistence.jdbc.db.JdbcMysqlDAO] - JDBC::initAfterFirstDbConnection: Initializing step, after db is connected.
2022-01-17 19:25:48.677 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbMajorVersion = '8'
2022-01-17 19:25:48.679 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbMinorVersion = '0'
2022-01-17 19:25:48.680 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - driverMajorVersion = '8'
2022-01-17 19:25:48.681 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - driverMinorVersion = '0'
2022-01-17 19:25:48.682 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbProductName = 'MySQL'
2022-01-17 19:25:48.683 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbProductVersion = '8.0.27-0ubuntu0.20.04.1'
2022-01-17 19:25:48.684 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::pingDB asking db for name as absolutely first db action, after connection is established.
2022-01-17 19:25:48.793 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::checkDBAcessability, first try connection: true
2022-01-17 19:25:48.795 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.796 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::updateConfig: configuration complete for service=jdbc.
2022-01-17 19:25:48.797 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : invoked activate: activate
2022-01-17 19:25:48.798 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Set implementation object for component
2022-01-17 19:25:48.799 [DEBUG] [jdbc.internal.JdbcPersistenceService] - bundle org.openhab.persistence.jdbc:3.2.0 (361)[org.openhab.persistence.jdbc.internal.JdbcPersistenceService(384)] : Changed state from satisfied to active
2022-01-17 19:25:48.800 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.802 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.803 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.804 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.805 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:48.808 [DEBUG] [jdbc.internal.JdbcPersistenceService] - JDBC::getName: returning name 'jdbc' for queryable persistence service.
2022-01-17 19:25:53.426 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::pingDB
2022-01-17 19:25:53.428 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection isDriverAvailable: true
2022-01-17 19:25:53.487 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::checkDBAcessability, first try connection: true
2022-01-17 19:25:53.488 [WARN ] [jdbc.internal.JdbcPersistenceService] - JDBC::store: No connection to database. Cannot persist item 'dryerVolts (Type=NumberItem, State=118.29, Label=Dryer Voltage, Category=energy)'! Will retry connecting to database when error count:0 equals errReconnectThreshold:3
==> /var/log/openhab/events.log <==
2022-01-17 19:25:53.423 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'dryerVolts' changed from 118.25 to 118.29
==> /var/log/openhab/openhab.log <==
2022-01-17 19:26:04.675 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::pingDB
2022-01-17 19:26:04.677 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection isDriverAvailable: true
2022-01-17 19:26:04.688 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::checkDBAcessability, first try connection: true
2022-01-17 19:26:04.689 [WARN ] [jdbc.internal.JdbcPersistenceService] - JDBC::store: No connection to database. Cannot persist item 'poeWatts (Type=NumberItem, State=24.17, Label=PoE Power, Category=energy)'! Will retry connecting to database when error count:0 equals errReconnectThreshold:3
2022-01-17 19:26:04.719 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::pingDB
2022-01-17 19:26:04.720 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection isDriverAvailable: true
2022-01-17 19:26:04.725 [DEBUG] [persistence.jdbc.internal.JdbcMapper] - JDBC::checkDBAcessability, first try connection: true
2022-01-17 19:26:04.726 [WARN ] [jdbc.internal.JdbcPersistenceService] - JDBC::store: No connection to database. Cannot persist item 'poeVolts (Type=NumberItem, State=114.15, Label=PoE Voltage, Category=energy)'! Will retry connecting to database when error count:0 equals errReconnectThreshold:3
==> /var/log/openhab/events.log <==
2022-01-17 19:26:04.677 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'poeWatts' changed from 24.15 to 24.17
2022-01-17 19:26:04.720 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'poeVolts' changed from 113.22 to 114.15
I don’t entirely know what I’m looking at here but I only see one line that kind of sticks out:
2022-01-17 19:25:48.401 [WARN ] [.zaxxer.hikari.util.DriverDataSource] - Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
However directly after that the database seems to connect as it correctly pulls info on the version etc from my mysql server:
2022-01-17 19:25:48.677 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbMajorVersion = '8'
2022-01-17 19:25:48.679 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbMinorVersion = '0'
2022-01-17 19:25:48.680 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - driverMajorVersion = '8'
2022-01-17 19:25:48.681 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - driverMinorVersion = '0'
2022-01-17 19:25:48.682 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbProductName = 'MySQL'
2022-01-17 19:25:48.683 [DEBUG] [ab.persistence.jdbc.utils.DbMetaData] - dbProductVersion = '8.0.27-0ubuntu0.20.04.1'
Its not until it actually tried to persist an item that it says there is no connection to the database:
JDBC::store: No connection to database. Cannot persist item 'dryerVolts (Type=NumberItem, State=118.29, Label=Dryer Voltage, Category=energy)'! Will retry connecting to database when error count:0 equals errReconnectThreshold:3
Googling around shows several other people having similar issues but none seem to be migrating with an existing mysql db and just get pointed to the set up instructions for a new DB. Anyone have any idea what is happening here?