VSC Code Error-Message in Panel -> Output (Ausgabe) -> openHABlanguageServer

When using VSC with OH-Extension, I get amongst other things the following error-message in the panel:

Error: getaddrinfo ENOTFOUND openhabianpi
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'openhabianpi'
}

Can anyone give me a hint where to look, to get rid of this error or what to do ?

thx in advance
Cheers - Peter

No idea, no hint for me ??? I have no Host named “openhabianpi” !!!

There are some threads that deal with the same topic.
Most answers talk about to check the settings file(s).
I do not use VSC Code so far. My suggestion would be to use the OS search mechanism to search for files that contain the string openhabianpi.

1 Like

Hi Wolfgang,
thx for your reply. You are right. I found some threads here and here.
But the hints I found were not target-oriented for me (or I didn’t understand it :crazy_face: as I’m a little fool :wink:). Hope that file-search will give an answer.

But first I have to search what tools to use for search :joy: :joy: :joy:

Cheers,
Peter

Are the files stored in a filesystem that is accessible from linux or are they stored on a file system that is accessible from windows ?

For linux you can use following command to search a complete directory for files containing the string openhabianpi

grep -R -l -i openhabianpi DirectoryNameHere

On a windows system you should be able to use the windows file explorer.

1 Like

thx again, but no success. No “openhabianpi”, neither on linux nor on windows. But I’m confident to solve the puzzle :wink: …some day

1 Like

Have you setup user settings to configure your OH host ?
I downloaded the code from GitHub - openhab/openhab-vscode: VS Code extension for openHAB configuration files. There is a package.json file. That one contains openhabianpi. It is the default/fallback.

“Visual Studio Code User and Workspace Settings” describes where your user settings that overwrite the default should be located:

  • Windows %APPDATA%\Code\User\settings.json
  • Linux $HOME/.config/Code/User/settings.json

The settings file ( settings.json ) that is provided by github contains:

// Place your settings in this file to overwrite default and user settings.
{
    "files.exclude": {
        "out": false // set this to true to hide the "out" folder with the compiled JS files
    },
    "search.exclude": {
        "out": true // set this to false to include "out" folder in search results
    }
}

So does VSC Code work in your environment ? In case it does not work at all and you get the error as you described I would conclude that settings are not done and defaults are used.

1 Like

Hi Wolfgang,
thx very much for your efforts to help me. But I think my “normal” settings.json" are not the reason for that “error message”. I discussed some problems (Authentication in OH3) and changes with Jerome ( Confectrician) in another thread here in the forum.
and as I understand my settings are ok. I have three settings.json. One (user/default) on my Windows-Machine, one on my OH2-Pi and another one on my OH3-Pi.
I have to say that I have no problems with VSC. Everythings works fine. But some messages are “boring” and “annoying”, but not really important. There are more important ones (May be in another thread :wink:)

Cheers,
Peter

Hi,

I think this is coming from the language server somewhere, but i didn’t found it where the host is coming from myself yet, to be honest. (Maybe because i didn’t search yet in depth.)
Maybe it is in some default configuration or even hardcoded in the lsp part of the openHAB distribution.

Anyway, this message shouldn’t be that important if everything is running fine besides this.

Edit after a quick search in the extension:

At least the old openhab.host configuration had a default parameter openhabianpi.
So it is possible that some older part of the extension still tries to find and use that.

2 Likes