Unauthorized API request: User not found: openhabian

Hi

I have recently sat up a 3.1.1 instance of OH. To keep things simple, I just copied over all text-config files from my 2.5 installation, both are installed on Openhabian.

Now, as nearly everthing is running only the log tells me something is not quite right and I have no clue which process that might be. Maybe someone can point me in the right direction ?

2021-12-17 19:01:38.251 [WARN ] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request: User not found: openhabian

OH 2.5 does not know about different users so I doubt that the configuration files of 2.5 would be the reason. Nevertheless you could give it a trial to see if such a file can be found:

find /etc/openhab -type f -exec grep -i -l openhabian {} \;

How often does that warning message appear ? Does it happen to specific times ? Have you setup any scripts outside of OH that try to access items via the API ?

Thanks for your reply Wolfgang.
The error occurs every couple of seconds, no specific trigger. A reboot changes nothing, still occurs every couple of seconds.

Not sure what you mean by “scripts outside of OH access the items via API”? OH is the main system that connects knx, hue, shelly and the other stuff. Afaik there is no system that tries to log in on its own. But I might have gotten that last question wrong?

This is the output of find

openhabian@Openhab:~$ find /etc/openhab -type f -exec grep -i -l openhabian {} \;
/etc/openhab/services/mqtt.cfg.old
/etc/openhab/services/dashboard.cfg
openhabian@Openhab:~$

Deleting dashboard.cfg seems to solve the problem while I do not see any negative impacts on the OH3 instance (at least none I have noticed as of yet)

1 Like

You shouldn’t be doing that. If you properly read the docs you should have seen that being mentioned.
You might have solved this one but be prepared to meet more issues like this one to rise.
Instead, you should upgrade 2.5 to OH3 in place e.g. by using openhabian menu 03.
This will properly migrate your OH config. Once migrated you can import in on your new box.

Thanks Markus for mentioning that. I read about several people that are using the textfiles for configuraton in OH3 as well, so this seemed a valid way for me. Indeed I obviously missed the important parts in the docu here.

My first attempt with the upgrade was exactly the way you proposed, but ended up with a completely wrecked system. So I decided to set up a fresh system to avoid any update-related quirks.

Seems I need to take a different approach to the migration then. I am going to install OH3 from scratch again and then migrate the configurations manually, step by step. This time without the textfiles, although I prefer to maintain them instead of the click-fest it will be with app. 80 devices to move over.

Depending on where you configured your items (UI or text or both), you might get away when you copy *.items and *.things only to a new install.
But you must not copy any other *.cfg like you did.

Got it, thanks. Although it was only dashboard.cfg and addons.cfg, the rest was out of service anyways (renamed the extension long ago on the old machine).

Is it possible to copy the rules-files tough? Seems they do not work at all after copy. Guess I need to dig deeper into the new syntax as I obviously haven’t understood the way they work now.

Depends on the individual rules’ content. E.g. executeCommandLine uses a changed syntax.
You should see error messages in openhab.log file for rules with wrong syntax.