Firmware aus unserem US-Werk kopiert, Geräte im UK-Werk melden "bad username or password"
Von English mit KI übersetzt ·
Eine etwas seltsame Sache. Wir rollen gerade Vibrationssensoren in unserem UK-Werk aus. Unser Schwesterwerk in den USA betreibt dieselben Sensoren bereits auf Hermetry, daher hat mir deren Steuerungsverantwortlicher sein Firmware-Projekt geschickt, und ich habe nur die Tokens durch die unserer Geräte ersetzt.Jedes einzelne Gerät schlägt fehl:
[mqtt] connecting to mqtt.<their host>:8883 ...
[mqtt] TLS ok, sending CONNECT
[mqtt] CONNACK rc=4 (bad user name or password)
[mqtt] backing off 300 s
Was ich geprüft habe:
- Tokens direkt aus der Schublade Create device kopiert, dreifach überprüft
- Benutzername = Token, Passwort leer, laut Dokumentation
- Der Log-Tab des Geräts in unserer Organisation zeigt gar nichts, keine abgelehnten Anmeldungen
- Port 8883 ausgehend offen, der TLS-Handshake gelingt eindeutig
Unsere Hermetry-Organisation wurde im Januar von unserer IT angelegt. Die ihre ist älter. Gibt es eine organisationsspezifische Sache, die ich übersehe? Ich würde ungern noch einmal bei deren Steuerungsverantwortlichem anrufen, er hat bereits einen Nachmittag damit verbracht.
Bit of a weird one. We’re rolling out vibration sensors at our UK plant. Our sister plant in the US already runs the same sensors on Hermetry, so their controls guy sent me his firmware project and I just changed the tokens to the ones from our devices.
Every single device fails:
[mqtt] connecting to mqtt.<their host>:8883 ...
[mqtt] TLS ok, sending CONNECT
[mqtt] CONNACK rc=4 (bad user name or password)
[mqtt] backing off 300 s
What I’ve checked:
- tokens copied straight from the Create device drawer, triple-checked
- username = token, password empty, as per the docs
- the device Log tab in our org shows nothing at all, no refused logins
- port 8883 open outbound, TLS handshake clearly succeeds
Our Hermetry organisation was created by our IT in January. Theirs is older. Is there some per-organisation thing I’m missing? I’d rather not call their controls guy again, he’s already spent an afternoon on this.
Von English mit KI übersetzt ·
CONNACK 4 bei gleichzeitig leerem Log-Tab in Ihrer eigenen Organisation ist ein deutlicher Hinweis. Ihre Organisation hat diese Anmeldungen nie gesehen.
CONNACK 4 with nothing in your own Log tab is a big hint. Your org never saw those logins.
Von English mit KI übersetzt ·
Vielleicht wurden die Tokens rotiert? Das hatten wir einmal, nachdem jemand versehentlich auf Rotate geklickt hatte.
Maybe the tokens got rotated? We had that once after someone hit Rotate by mistake.
Von English mit KI übersetzt ·
Die Tokens sind brandneu, niemand hat etwas rotiert. Tyler, was meinst du mit „nie gesehen“?
Tokens are brand new, nobody rotated anything. Tyler, what do you mean never saw them?
Von English mit KI übersetzt ·
Schau dir den Host in deiner Logzeile an. Das ist der Broker-Host aus der US-Firmware.Hermetry läuft als getrennte Deployments pro Region (EU, US, TR), und jede Organisation gehört zu genau einer Heimatregion. Geräte müssen sich mit dem Geräte-Host der Region ihrer eigenen Organisation verbinden, dem Host auf der Karte Connection details jedes Geräts. Ich wette, die Organisation des US-Werks liegt in der Region US, und deine, die deine IT aus dem UK angelegt hat, liegt in der Region EU. Deine UK-Geräte klopfen mit Tokens am US-Broker an, die nur in der Region deiner Organisation existieren. Für diesen Broker sind das unbekannte Tokens, daher bekommst du eine 4. Nichts erreicht deinen Log-Tab, weil deine Organisation nie gefragt wurde.Genau das ist mir passiert, als wir ein Projekt zwischen zwei unserer Versorger kopiert haben, einer in jeder Region. Lösung:
- Öffne eines deiner Geräte, Tab Credentials, Connection details. Notiere dir den MQTT-Broker-Host.
- Ersetze den Host in der Firmware (und den HTTPS-Host, falls sie ihn verwenden).
- Verbinde weiterhin über den Hostnamen. SNI ist erforderlich, also keine IP aus einer DNS-Abfrage fest eintragen.
Owner und Admins können die Heimatregion auch unter den Organisationseinstellungen sehen, Residency. Die Seite ist Regions and data residency.Und da du 4er bekommst: Die Firmware wartet 5 Minuten, gut. Behalte das bei. Wiederholt fehlgeschlagene Logins von einer Adresse sperren diese Adresse für eine Weile, und das ganze Werk steht hinter einem NAT.
Look at the host in your log line. That’s the broker host from the US firmware.
Hermetry runs as separate deployments per region (EU, US, TR) and every organisation lives in one home region. Devices have to connect to the device host of their own organisation’s region, the one on each device’s Connection details card. I’d bet the US plant’s organisation is in the US region and yours, created by your IT from the UK, is in the EU. Your UK devices are knocking on the US broker with tokens that only exist in your organisation’s region. To that broker they’re unknown tokens, so you get a 4. Nothing reaches your Log tab because your org was never asked.
I hit exactly this when we cloned a project between two of our utilities, one in each region. Fix:
- Open any of your devices, Credentials tab, Connection details. Note the MQTT broker host.
- Replace the host in the firmware (and the HTTPS host if they use it).
- Keep connecting by host name. SNI is required, so don’t hardcode an IP from a DNS lookup.
Owners and admins can also see the home region under the organisation settings, Residency. The page is Regions and data residency.
And since you’re getting 4s: the firmware backs off 5 minutes, good. Keep that. Repeated failed logins from one address block that address for a while, and the whole plant is behind one NAT.
Von English mit KI übersetzt ·
Guter Fund. Es lohnt sich, den Host in eine Konfigurationsdatei statt in den Build aufzunehmen, damit das nächste Werk keinen fest codierten Host kopiert.
Good catch. Worth putting the host in a config file instead of the build, so the next plant doesn’t copy a hardcoded host.
Von English mit KI übersetzt ·
Prüfen Sie außerdem, welches CA-Bundle die US-Firmware fest hinterlegt (pinning). Falls dort das Zertifikat des regionalen Servers statt eines üblichen CA-Speichers fest hinterlegt wurde, kann es auf dem EU-Host aus einem anderen Grund fehlschlagen.
Also check what CA bundle the US firmware pins. If they pinned their region’s server cert instead of using a normal CA store, it may fail on the EU host for a different reason.
Von English mit KI übersetzt ·
Haha, bei uns war es genauso: zwei Hotels, zwei Organisationen in zwei Regionen, gleiche Firmware.
Ha, we had the same with two hotels, two orgs in two regions, same firmware.
Von English mit KI übersetzt ·
Das war’s. Die Residency-Seite zeigt EU, die Organisation des US-Werks ist aber US. Ich habe den Host auf den Eintrag auf unserer Connection-details-Karte geändert, und alle 23 Sensoren waren innerhalb von zehn Minuten online. Lewis, du hattest auch recht, die Firmware hatte deren Serverzertifikat gepinnt. Ich habe auf das normale CA-Bundle umgestellt, sonst wäre der Handshake der nächste Fehler gewesen. Der Host kommt jetzt aus einer Konfigurationspartition. Danke an alle.
That was it. Residency page says EU, the US plant’s org is US. Changed the host to the one on our Connection details card and all 23 sensors were online within ten minutes. Lewis, you were right as well, the firmware had their server certificate pinned. I switched it to the normal CA bundle, otherwise the handshake would have been the next failure. Host now comes from a config partition. Thanks all.
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.
Mitdiskutieren
Melde dich an, um Fragen zu stellen und zu beantworten, hilfreiche Beiträge mit „Gefällt mir“ zu markieren und die Antwort zu kennzeichnen, die dein Problem gelöst hat. Jeder Beitrag bringt Punkte und Stufen.

