Stream errors

Hi, I was running 3.1.0.M4 and the Terminal startup was always ‘clean as a whistle’… no cranky messages… :roll_eyes:
When I upgraded to 3.2.0.M5 I get a load of complaining log messages and I don’t know if they matter or how to stop them appearing if they don’t matter. Can anyone please advise me on this?
I should add that the terminal complain stream also happened when I went from 3.1.0.M4 to 3.1.0 Stable.
I attach the Terminal screen shots and also a sample extract of the openhab log when all this was happening. Thanks in advance
Clean as a whistle

Log Extract:

<< 2021-12-12 14:42:53.217 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘home.sitemap’

2021-12-12 14:42:54.035 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘mapdb.persist’

2021-12-12 14:42:56.356 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘ShelbyPause.rules’

2021-12-12 14:43:01.325 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007

2021-12-12 14:43:03.148 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.

2021-12-12 14:44:00.849 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Automower_ErrorCode’ with pattern ‘MAP(shelbyfaults.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:00.906 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode020ST812FloodSensorWashmachine_Alarmflood’ with pattern ‘MAP(washmachine.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.071 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode037FibaroFGK101DoorWindowSensor_DoorSensor’ with pattern ‘MAP(rain.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.076 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode019ST812FloodSensorAttic_Alarmflood’ with pattern ‘MAP(atticleak.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.125 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘WashStatus’ with pattern ‘MAP(washing.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.194 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘IceDetectedBadge’ with pattern ‘MAP(icewarn.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.280 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode024StripsMultisensorComfortDrip_Alarmflood’ with pattern ‘MAP(leaksensorsensative.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.379 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘CPUTempAlert’ with pattern ‘MAP(cputempalert.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:01.415 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Localweatherandforecast_WindDirection’ with pattern ‘SCALE(windvane.scale):%s’: Couldn’t transform value because transformation service of type ‘SCALE’ is not available.

2021-12-12 14:44:01.423 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Localweatherandforecast_WindSpeed’ with pattern ‘SCALE(beaufort.scale):%s’: Couldn’t transform value because transformation service of type ‘SCALE’ is not available.

2021-12-12 14:44:01.466 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘FreezerDefrostAlarm’ with pattern ‘MAP(freezer.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.068 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Automower_ErrorCode’ with pattern ‘MAP(shelbyfaults.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.090 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode020ST812FloodSensorWashmachine_Alarmflood’ with pattern ‘MAP(washmachine.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.230 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode037FibaroFGK101DoorWindowSensor_DoorSensor’ with pattern ‘MAP(rain.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.248 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode019ST812FloodSensorAttic_Alarmflood’ with pattern ‘MAP(atticleak.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.255 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘WashStatus’ with pattern ‘MAP(washing.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.265 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘IceDetectedBadge’ with pattern ‘MAP(icewarn.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.273 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘ZWaveNode024StripsMultisensorComfortDrip_Alarmflood’ with pattern ‘MAP(leaksensorsensative.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.366 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘CPUTempAlert’ with pattern ‘MAP(cputempalert.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:08.375 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Localweatherandforecast_WindDirection’ with pattern ‘SCALE(windvane.scale):%s’: Couldn’t transform value because transformation service of type ‘SCALE’ is not available.

2021-12-12 14:44:08.409 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘Localweatherandforecast_WindSpeed’ with pattern ‘SCALE(beaufort.scale):%s’: Couldn’t transform value because transformation service of type ‘SCALE’ is not available.

2021-12-12 14:44:08.424 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘FreezerDefrostAlarm’ with pattern ‘MAP(freezer.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

2021-12-12 14:44:26.696 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/events’s Observer

2021-12-12 14:44:31.284 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]

2021-12-12 14:44:32.734 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel

2021-12-12 14:44:33.480 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘6b00d61698’ failed: if (ZWaveNode024StripsMultisensorComfortDrip_Alarmflood.state == ON) {

This error message is the key:

You need to install the “Map” Transformation. It can be found under Settings/Other Add-ons/Transformation Add-ons. Click on install on “Map Transformation”

Hi Kai, ah no, it’s not that… I do and always have had, the MAP transformation installed.
Ok as an update though, I logged out and re-started OH and all those OH log messages about Transformations missing are gone away and the system is working BUT… the complaining stream still came back in the Terminal window.
So the system is complaining about something (which I don’t understand) BUT the OH log is clean now and system is working.
Thus the question remains, what are all those Terminal launch complaints about?? :thinking:

Ok, I seem to have solved it myself… :nerd_face:
It seems to me that OH3.1 (stable) and onwards is ‘cranky’ about persistence mapdb values… there are always going to be NULL values for Group items but it won’t ignore them routinely… also I saw org.eclipse.lsp4j in the stream error list (I’ve no idea what lsp4j does :face_with_monocle:).
Anyway, I did a list -s in the Karaf terminal window to get the exact names of the packages which seemed to be upsetting the launch process. I then set the logging levels for those to OFF.… using log:set OFF org.openhab.persistence.mapdb and log:set OFF org.eclipse.lsp4j
Then logged out and rebooted OH and now a squeaky clean Terminal Launch window with no complaints and a clean openhab.log
I hope this may help others and maybe the developers might know why earlier OH 3 milestones tolerated these (minor?) errors/inconsistencies

Upgrade (or downgrade) clears a system cache, which has a big impact on load times.
If something tries to use MAP service before its ready, it’ll complain.
When cache is populated, load sequence is more controlled.

Guess this refers to

which is certainly Mapdb, but what leads you to think it is about NULL states? Those aren’t persisted at all, so there’s nothing to restore either. It’s only a WARN but just hiding it doesn’t seem like a good plan.
Do you mean you have selected to persist Items that never get a valid state in normal service (and so a restore will always fail)?

Hi Ross, I saw a lot of mentions of NULL values in the openhab log list for example "Failed transforming the state ‘NULL’ on item ‘ZWaveNode020ST812FloodSensorWashmachine_Alarmflood’ " so I naively thought that they must be involved somehow… Also I didn’t know that NULL values aren’t persisted so it’s all very confusing to me…
I absolutely take your point about ‘hiding stuff’, I don’t like that approach either, but if we could ascertain whether these ‘errors’ are significant and what is causing them, then that would be a better approach. Solving OH problems is like chasing rainbows sometimes… :roll_eyes:

In the future it really helps to post logs with code fences.

```
code goes here
```

You had two warnings from two different sources. It’s just unfortunate coincidence that both have “Map” in the name.

The bulk of the messages say something like:

2021-12-12 14:44:01.379 [WARN ] [rest.core.item.EnrichedItemDTOMapper] - Failed transforming the state ‘NULL’ on item ‘CPUTempAlert’ with pattern ‘MAP(cputempalert.map):%s’: Couldn’t transform value because transformation service of type ‘MAP’ is not available.

The key part is “Couldn’t transform value because transformation service of type ‘MAP’ is not available.” As both @crazypenguin and @rossko57, that warning means, at the time that the log statement occurred, the Map transformation was not installed and ready. As @rossko57 points out, on an upgrade or clearing of the cache (which happens as part of an upgrade) all your add-ons get reinstalled which can take some time.

2021-12-12 14:44:26.696 [WARN ] [.transport.servlet.ServletController] - Can’t find the request for http://localhost:8080/rest/events’s Observer

I couldn’t venture a guess for this warning. But a warning typically isn’t an error. It just means something unexpected happened. If this warning persists, an issue should probably be filed.

2021-12-12 14:44:31.284 [WARN ] [pdb.internal.MapDbPersistenceService] - Deserialized invalid item: [FAILED toString()]

This is coming from the MapDB Persistence add-on (which has nothing to do with the Map Transformation add-on. Unfortunately this message is a little ambiguous. Is the Item invalid? The state pulled from the DB?

Looking at the code it appears that what is in fact happening is that MapDB is attempting to restoreOnStartup using a corrupted entry. I would guess that at some point OH crashed while writing to the MapDB and one of the entries was corrupted. Unfortunately the [FAILED toString()] doesn’t make a whole lot of sense given the code but I’m not expert on MapDB.

In any case, the solution is going to be the same no matter what. You either need to find the Item whose entry is invalid through trial and error and update or change that Item so that the corrupted database entry is overwritten, or you can just delete the whole MapDB in it’s entirely ($OH_USERDATA/persistence/mapdb) and repopulate it by updating/changing the Items that get saved to it.

As @rossko57 indicates, NULL does not get saved to the database so it has nothing to do with a NULL value.

This is the only actual error in the above log.

2021-12-12 14:44:33.480 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘6b00d61698’ failed: if (ZWaveNode024StripsMultisensorComfortDrip_Alarmflood.state == ON) {

Unfortunately the error isn’t very clear what the problem could be. Maybe this is the one Item that has the corrupted entry in MapDB. Maybe it’s something else entirely.

I wonder what happens if there is a Mapdb record and restore instruction for a since-deleted Item.

That was my first thought too but looking at the actual code, the problem is coming from attempting to parse the JSON that is actually stored in MapDB itself. The entry itself is unparsable at all or the entry is missing the Item’s name, state and/or timestamp. I don’t think it’s getting far enough along the process to run into a problem that the Item itself doesn’t exist.