ioBroker.js-controller icon indicating copy to clipboard operation
ioBroker.js-controller copied to clipboard

Command "plugin disable sentry" doesn't work immediately after installation

Open UncleSamSwiss opened this issue 4 years ago • 8 comments

When installing ioBroker without starting it, I get the following error when calling:

user@my-host-name:/opt/iobroker$ iob plugin disable sentry
The host "my-host-name" does not exist!

Even if I do a iob host this before the above command, I still get the same error.

UncleSamSwiss avatar Feb 23 '21 16:02 UncleSamSwiss

why dont we just create raw host object at iob setup @Apollon77 ?

foxriver76 avatar Feb 24 '21 19:02 foxriver76

Till now on install and first start there could be different hostnames. If we create a host and then the name has changed on first start there could be weird cases where system thinks it is multihost. If we do we need to make sure this can not happen.

Apollon77 avatar Feb 24 '21 19:02 Apollon77

Is the hostname pinned in iobroker.json?? Then we could think about it for this case.

Apollon77 avatar Feb 24 '21 19:02 Apollon77

in both my installations system.hostname is just an empty string in iobroker.json

foxriver76 avatar Feb 24 '21 20:02 foxriver76

But the same issues would happen if someone renames host later, or not? maybe you can give some details regarding the mentioned case..

foxriver76 avatar Feb 24 '21 20:02 foxriver76

it seems that iobroker.json system.hostname is only set when iob host is used

foxriver76 avatar Feb 24 '21 20:02 foxriver76

When system.hostname is empty then the real hostname is requested and used. When yu set syste.hostname (and yes this is done when using ´iob host` you overwrite the hostname to define that the configured one is used over the "real" one.

Apollon77 avatar Feb 24 '21 22:02 Apollon77

The problem about the changing hostname is exactly as @foxriver76 said: in the Docker image we actually have to change the hostname at first start-up: It is stored during the build process of the temporary build container here and then changed to the hostname of the running container here. So, it seems that part of the host configuration is already done during installation, but the part needed for "plugin disable sentry" is missing.

In my case, the hostname is defined in the config file, so this would would also be enough.

Now, this issue is no longer pressing for me as @Apollon77 pointed out that setting diag to "none" also disables Sentry.

UncleSamSwiss avatar Feb 25 '21 08:02 UncleSamSwiss