Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to create a new token during install of OpenHorzion #16

Closed
oshadmon opened this issue Apr 17, 2024 · 3 comments
Closed

Failure to create a new token during install of OpenHorzion #16

oshadmon opened this issue Apr 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@oshadmon
Copy link
Collaborator

I attempted to deploy a second EdgeLake instance on a different machine, however, learned the hard way that when the HZN_DEVICE_ID name on the second node is the same as the first, the the first EdgeLake instances goes down.

When trying to us a different HZN_DEVICE_ID, I get invalid-input error (directions shown below).

Steps:

  1. Update hzn related information in profile (Ubuntu bashrc)
export HZN_ORG_ID=alog
# export HZN_DEVICE_TOKEN= # specify a string value for a token
export HZN_DEVICE_ID=edgelake-demo
...
  1. Attempt to install using hello world
curl -sSL https://raw.githubusercontent.com/open-horizon/anax/v2.30/agent-install/agent-install.sh | bash -s -- -i anax: -c css: -p IBM/pattern-ibm.helloworld -w '*' -T 120 

Expect: Success
Actual: failed to create node with new Device ID

Node alog/edgelake-demo does not exist in the Exchange with the specified token, creating/updating it...
Error: bad HTTP code 400 from PUT http://132.177.125.232:3090/v1/orgs/alog/nodes/edgelake-demo?noheartbeat=true: invalid-input, Unrecognized field "isNamespaceScoped" (class com.horizon.exchangeapi.PutNodesRequest), not marked as ignorable (12 known properties: "pattern", "softwareVersions", "jsonFormats", "msgEndPoint", "token", "name", "nodeType", "userInput", "registeredServices", "heartbeatIntervals", "publicKey", "arch"])
 at [Source: (String)"{"token":"goYck5og-VccN7uRhIqPTLb18lVtGFN0_UaAYT9I2AfQhsb4OI1in7vk8aTeFhcsGqHj0XKEwrh75TYUKGV05yJ0","name":"edgex-demo","nodeType":"device","isNamespaceScoped":false,"pattern":"","registeredServices":null,"msgEndPoint":"","softwareVersions":{},"publicKey":"","arch":"amd64","userInput":null}"; line: 1, column: 292] (through reference chain: com.horizon.exchangeapi.PutNodesRequest["isNamespaceScoped"])
@oshadmon oshadmon added the bug Something isn't working label Apr 17, 2024
@oshadmon
Copy link
Collaborator Author

When installing OpenHorizon with code by @playground (Jeff from IBM) then I'm able to deploy a second EdgeLake operator using a different HZN_DEVICE_ID

curl -sSL https://raw.githubusercontent.com/playground/hzn-cli/main/install.sh --output install.sh && bash ./install.sh

@joewxboy
Copy link
Member

joewxboy commented Mar 3, 2025

OK, the ultimate error message above is that the property isNamespaceScoped is a field not supported by the exchange. This happens when you are using a newer Agent with an older Exchange. If the version of the Agent matched the Exchange, that error would go away.

@oshadmon and @t-fine please confirm. Let's either close this issue or address the root cause (version mismatch).

@joewxboy
Copy link
Member

joewxboy commented Mar 3, 2025

Invalid at this time, closing

@joewxboy joewxboy closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants