mysteriumnetwork / node

Mysterium Network Node - official implementation of distributed VPN network (dVPN) protocol
https://mysterium.network
GNU General Public License v3.0
1.11k stars 311 forks source link

NodeUI - API key update results in validation error #4821

Closed HashZero81 closed 2 years ago

HashZero81 commented 2 years ago

Describe the bug Validation error is returned on the node dashboard when updating/changing the API key

To Reproduce Steps to reproduce the behavior:

  1. Log into "My Nodes" of newly created account to get the new API key.
  2. Head over to the Node dashboard and log in (node needs to have already been claimed in some mystnodes account)
  3. Go to "Settings," enter the new API key and click "Save"
  4. Error returned: "Error - Validation Error." In addition the node is not showing on the "My Nodes" page.

Expected behavior The API key should be updated and the node displayed on the "My Nodes" page.

Screenshots Error

Environment (please complete the following information):

Additional context Error log show the message below

MMN registration: server response invalid: 500 Internal Server Error (https://mystnodes.com/api/v1/node){"errorCode":"databaseError","message":"Database error"}

etherunit commented 2 years ago

Solution: restart node, refresh mystnodes.com page, re-enter the API key and click Save. Please let us know if that helps.

HashZero81 commented 2 years ago

Sadly it did not worked. Still getting the same error.

I tested with a second node, which resulted in the same error. On the second node, I went one step further to completely uninstall the node with apt purge, removed any additional folders I could found for myst nodes and do a re-installation. This also resulted in the same error.

ozzono commented 2 years ago

So I've just got to know that I am not the only one facing this problem. I also opened an issue but got no response.

etherunit commented 2 years ago

@HashZero81 @ozzono Before our QA will step in and make a round of testing, could this be tried in Incognito mode? Before doing that, make sure that node is running the latest available public version: https://github.com/mysteriumnetwork/node/releases/tag/1.4.1

HashZero81 commented 2 years ago

Hi

I am able to replicate the issue in Incognito mode as well. I am still getting the validation error. Nodes are on the latest version.

etherunit commented 2 years ago

Getting the same problem. Screenshot 2022-03-09 at 09 30 20

2022-03-09T07:29:10.062 ERR ../../tequilapi/endpoints/mmn.go:119 > MMN registration error: server response invalid: 500 Internal Server Error (https://mystnodes.com/api/v1/node){"errorCode":"databaseError","message":"Database error"}

Robin-Sch commented 2 years ago

If you try to change the API key using the CLI, it doesn't work either. However, it says it successfully configured it.

Reproduced on 2 nodes + a friend of mine's all running the latest version.

» mmn <NewKey>
[SUCCESS] MMN API key configured.

/etc/mysterium-node/config-mainnet.toml:

[access-policy]
  list = "mysterium"

[mmn]
  api-key = "<NewKey>"

[terms]
  consumer-agreed = true
  provider-agreed = true
  version = "0.0.40"

the error when changing the key in the UI (Validation error)

mmn/client.go:56 Registering node to MMN: {LocalIP:<Public IP> Identity:<Identity> APIKey:<NewKey> VendorID: OS:Ubuntu 20.04.3 LTS Arch:linux/amd64 NodeVersion:1.4.11}
tequilapi/endpoints/mmn.go:119 MMN registration error: server response invalid: 500 Internal Server Error (https://mystnodes.com/api/v1/node){"errorCode":"databaseError","message":"Database error"}

But the node doesn't show under my nodes.

Robin-Sch commented 2 years ago

https://github.com/mysteriumnetwork/node/issues/4693#issuecomment-1026250310 This fixed it, make sure to settle and withdraw everything because else you lose it