Closed rksharma95 closed 1 year ago
I ran into the same problem too trying to create a new all-in-one instance from scratch. It may be due to missing vault keys.
From what I can figure out from vaultUnseal()
in deploy-mgmt-hub.sh
, the key needed to unseal the vault is missing; $VAULT_UNSEAL_KEY
is where it should be but the variable is never set.
The key is supposed to come from another file, /tmp/horizon-all-in-1/vaultkeys.json
, which was never created. We might need to add a routine to generate the vaultkeys.json
file. I'm personally not sure about the format for vaultkeys.json
besides that it needs two values:
{
"root_token": "???",
"keys_base64": [ "???", ...]
}
At this point, I am trying to find out the correct lengths of the root token and the keys.
I also ran into this problem upon an unsuccessful run of deploy-mgmt-hub.sh
although I do have the key files (and values) /tmp/horizon-all-in-1/vaultkeys.json
The vault errors may be a side effect of MongoDB not starting up properly. By ensuring that you install the same version of Mongo that was used in our test suite, you may avoid this error entirely. Here's what I use:
export MONGO_IMAGE_TAG=4.0.6
export HZN_LISTEN_IP=<put your public IP address here>
curl -sSL https://raw.githubusercontent.com/open-horizon/devops/master/mgmt-hub/deploy-mgmt-hub.sh -A -R | bash
If someone can purge their existing installation and follow the steps above, we can mark this as fixed, update the documentation accordingly, and then close the issue.
@johnwalicki FYI ^^^
I tried it and it works now. OS VERSION="22.04.1 LTS (Jammy Jellyfish)"
bash deploy-mgmt-hub.sh -PS
...
export MONGO_IMAGE_TAG=4.0.6
export HZN_LISTEN_IP=<put your public IP address here>
curl -sSL https://raw.githubusercontent.com/open-horizon/devops/master/mgmt-hub/deploy-mgmt-hub.sh -A -R | bash
...
bash test-mgmt-hub.sh
testMgmtHubServices
testDefaultsFile
testAgent
testEdgeService
testExchangeHubAdmin
testExchangeSystemOrg
testExchangeUserOrg
testMms
Ran 8 tests.
OK
Thanks. I'll see where we need to update the docs and then close this issue as fixed.
Updated the default image tag for mongo. Should no longer be an issue.
I was trying to install management hub services on my local system with Ubuntu 20.04.4 and getting this error
the
docker ps
result is as: