always show this
nem2-cli monitor status
Monitoring SDNFUE-RCWKNB-5UO6JV-Q6C3C4-RFCR6E-O4ZMH3-4QU3 using
Error Error: Invalid URL: /ws
at WebSocket.initAsClient (/usr/local/lib/node_modules/nem2-cli/node_modules/ws/lib/websocket.js:455:11)
at new WebSocket (/usr/local/lib/node_modules/nem2-cli/node_modules/ws/lib/websocket.js:62:20)
at Promise (/usr/local/lib/node_modules/nem2-cli/node_modules/nem2-sdk/dist/src/infrastructure/Listener.js:77:38)
at new Promise ()
at Listener.open (/usr/local/lib/node_modules/nem2-cli/node_modules/nem2-sdk/dist/src/infrastructure/Listener.js:71:16)
at default_1.execute (/usr/local/lib/node_modules/nem2-cli/build/src/commands/monitor/status.js:43:18)
at CLI.executeCommand (/usr/local/lib/node_modules/nem2-cli/node_modules/clime/bld/core/cli.js:226:24)
at CLI. (/usr/local/lib/node_modules/nem2-cli/node_modules/clime/bld/core/cli.js:80:33)
at Generator.next ()
at fulfilled (/usr/local/lib/node_modules/nem2-cli/node_modules/clime/bld/core/cli.js:4:58)
nem2-cli transaction namespace --name company --rootnamespace --duration 1000
Error {“code”:“ServiceUnavailable”,“message”:“connection failed”}
It seems that your profile doesn’t have a node URL stored, or the node is not responding.
- List your profiles and copy your private key.
$> nem2-cli profile list
- Load the profile again. Replace localhost and your_private_key with your parameters.
$> nem2-cli profile create --privatekey your_private_key --network MIJIN_TEST --url http://localhost:3000
- Make sure the node is working by opening this URL in your browser.
http://localhost:3000/block/1
If it’s still not working, check this step-by-step guide: https://nemtech.github.io/getting-started/setup-workstation.html