Node icon indicating copy to clipboard operation
Node copied to clipboard

Command line flags are not working

Open LordMerlin opened this issue 1 year ago • 5 comments

When you try to run a node with a command-line key, it is ignored.

Usage: denode [flags] denode [command]

Available Commands: account account is a command for managing wallets completion Generate the autocompletion script for the specified shell config help Help about any command

Flags: -c, --config string config path (default "C:\Users\Администратор\AppData\Roaming\denet-node\config.json") -d, --debug debug output -h, --help help for denode

Use "denode [command] --help" for more information about a command.

The denode file itself is located along the path D:\Denode\denode.exe I tried the following combinations denode -d -c D:\Denode\config.json denode -d -c D:\Denode\config.json denode -d -c "D:\Denode\config.json" None worked

LordMerlin avatar Mar 16 '23 14:03 LordMerlin

Hey! How did you know that the config did not apply? and what is your shell, cmd or PowerShell?

OxFEE1DEAD avatar Mar 23 '23 04:03 OxFEE1DEAD

Good afternoon, thanks for your reply. Perhaps I did not understand the mechanism of the config a little. I tell you the steps in order. I started the node on behalf of the Administrator from the DeNode folder on drive D. I specified all the settings, address, port. After the configuration, I checked, by restarting, that everything was applied, the configs were created and the node starts up normally. I go to the user's folder Administrator there I find the denet-node folder, which contains the config file and another file. I transfer these files to the DeNet folder on disk D, where the node executable file is located. I'm trying to run it by specifying the path to the config file on the command line. According to my understanding, the node should have started normally, asking only for the password. And it starts as if from scratch. Requires settings again.

I need this to run it as a service not on behalf of the Administrator, but on behalf of the system. If you tell me where to put the denet-node folder so that it is seen by the node when launched on behalf of the system, then the question will disappear by itself. This is necessary because the application for creating a system service, nsmm, when launched on behalf of the System, normally restarts as a service and does not hang. If you run it as an administrator, then the nsmm denode binary itself kills, but the service does not restart.

LordMerlin avatar Mar 29 '23 07:03 LordMerlin

There may be a problem if you move your denet-node folder somewhere else, because denode always looking at your user's configs directory at path ' C:\Users\<USER_WHO_STARTED_A_PROCCESS>\AppData\Roaming\denet-node' and take ethreum-keystore file and config.json file (by default) from there. For now you have 3 options to customize your configuration:

  1. Edit C:\Users\Администратор\AppData\Roaming\denet-node\config.json manually
  2. Create another config file and specify cmd flag with absolute path to new config.json (i.e --config "C:\some\abs\path")
  3. Delete C:\Users\Администратор\AppData\Roaming\denet-node\config.json and restart denode, and input new values

In all of these cases, there should be a folder containing your encrypted private key C:\Users\<USER_WHO_STARTED_A_PROCCESS>\AppData\Roaming\denet-node\

OxFEE1DEAD avatar Mar 31 '23 07:03 OxFEE1DEAD

Again. I want to run a process from a SYSTEM service. In the first message, i indicated that i ran with different keys, -c and --config with different path spellings. None of this works. denode -c D:\Denode\config.json denode --config D:\Denode\config.json denode -c D:\Denode
denode --config "D:\Denode" The file D:\Denode\config.json is present. Moved from C:\Users\Administrator\AppData\Roaming\denet-node\config.json

LordMerlin avatar Apr 28 '23 09:04 LordMerlin

Can you list files in "C:\Users\Administrator\AppData\Roaming\denet-node" ? It seems like ethereum-keystore file is lost. Also, you may attach output from command line, that would be great

OxFEE1DEAD avatar May 02 '23 04:05 OxFEE1DEAD