Migrating of Windows node to Docker node

Hi,

I am trying to migrate node from Win to Docker, I use same identity and blobs location and I did all settings and node starting fine. Only one strange thing - Win node have data:


Docker node started from zero:

What is wrong?

Regards,
Alexander

Show your docker run parameters and folder structure of your node.

Did you run setup step on docker? (note: you shouldn’t)

i think because docker may be have DBs in little bit other location and generated new, if you give time to filewalker it will fix it

Commands are:

Yes, I run this first:
docker run --rm -e SETUP=“true” --mount type=bind,source=“G:\Identity\storagenodeD1.4”,destination=/app/identity --mount type=bind,source=“G:\Storj D1.4”,destination=/app/config --name storagenodeD1.4 storjlabs/storagenode:latest

And this:
docker run -d --restart unless-stopped --stop-timeout 300 -p 192.168.1.66:28972:28967/tcp -p 192.168.1.66:28972:28967/udp -p 127.0.0.1:14005:14002 -e WALLET=“0x8675290882f594227d9b69d1fc434bf54b2b5e6f” -e EMAIL="7437493@gmail.com" -e ADDRESS=“xxx.xxx.xxx.181:28972” -e STORAGE=“16.3TB” --mount type=bind,source=“G:\Identity\storagenode D1.4”,destination=/app/identity --mount type=bind,source=“G:\Storj D1.4”,destination=/app/config --name storagenodeD1.4 storjlabs/storagenode:latest

Folders are:
image

If I souldn’t run first command, how can I go back?

Regards,
Alexander

Did it run without error? I don’t see duplicated structure, so either it did fail or what we see is what it has created. But you mentioned that you’ve used the same location, and the structure looks fine, so… I don’ know :confused:

Just trying to make sure you didn’t run node with old identity, but new (empty) data :thinking:

This is wrong if you migrate a node. Use this only if you create a new node.

Shall I use -e SETUP=“false”? Or remove at all?

Regards,
Alexander

Well, I tryed both:
image

No changes

If it gives more info, first command give some mstakes:
2023-03-26 09:02:28,753 INFO Set uid to user 0 succeeded
2023-03-26 09:02:28,789 INFO RPC interface ‘supervisor’ initialized
2023-03-26 09:02:28,790 INFO supervisord started with pid 1
2023-03-26 09:02:29,797 INFO spawned: ‘processes-exit-eventlistener’ with pid 46
2023-03-26 09:02:29,818 INFO spawned: ‘storagenode’ with pid 47
2023-03-26 09:02:29,854 INFO spawned: ‘storagenode-updater’ with pid 48
2023-03-26T09:02:29.984Z INFO Configuration loaded {“Process”: “storagenode-updater”, “Location”: “/app/config/config.yaml”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “storage.allocated-disk-space”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “storage.allocated-bandwidth”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “server.private-address”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “console.address”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “server.address”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “operator.wallet-features”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “operator.wallet”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “contact.external-address”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “healthcheck.details”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “healthcheck.enabled”}
2023-03-26T09:02:29.984Z INFO Invalid configuration file key {“Process”: “storagenode-updater”, “Key”: “operator.email”}
2023-03-26T09:02:30.020Z INFO Anonymized tracing enabled {“Process”: “storagenode-updater”}
2023-03-26T09:02:30.114Z INFO Running on version {“Process”: “storagenode-updater”, “Service”: “storagenode-updater”, “Version”: “v1.74.1”}
2023-03-26T09:02:30.115Z INFO Downloading versions. {“Process”: “storagenode-updater”, “Server Address”: “https://version.storj.io”}
2023-03-26T09:02:30.275Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2023-03-26T09:02:30.312Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2023-03-26T09:02:30.436Z WARN Operator email address isn’t specified. {“Process”: “storagenode”}
2023-03-26T09:02:30.437Z ERROR Invalid configuration. {“Process”: “storagenode”, “error”: “operator wallet address isn’t specified”}
Error: operator wallet address isn’t specified
2023-03-26 09:02:30,453 INFO exited: storagenode (exit status 1; not expected)
2023-03-26T09:02:30.929Z INFO Current binary version {“Process”: “storagenode-updater”, “Service”: “storagenode”, “Version”: “v1.74.1”}
2023-03-26T09:02:30.929Z INFO New version is being rolled out but hasn’t made it to this node yet {“Process”: “storagenode-updater”, “Service”: “storagenode”}
2023-03-26 09:02:30,930 INFO success: processes-exit-eventlistener entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-26 09:02:30,931 INFO success: storagenode-updater entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-03-26T09:02:30.970Z INFO Current binary version {“Process”: “storagenode-updater”, “Service”: “storagenode-updater”, “Version”: “v1.74.1”}
2023-03-26T09:02:30.971Z INFO New version is being rolled out but hasn’t made it to this node yet {“Process”: “storagenode-updater”, “Service”: “storagenode-updater”}
2023-03-26 09:02:31,980 INFO spawned: ‘storagenode’ with pid 75
2023-03-26T09:02:32.161Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2023-03-26T09:02:32.184Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2023-03-26T09:02:32.314Z WARN Operator email address isn’t specified. {“Process”: “storagenode”}
2023-03-26T09:02:32.316Z ERROR Invalid configuration. {“Process”: “storagenode”, “error”: “operator wallet address isn’t specified”}
Error: operator wallet address isn’t specified
2023-03-26 09:02:32,321 INFO exited: storagenode (exit status 1; not expected)
2023-03-26 09:02:34,342 INFO spawned: ‘storagenode’ with pid 84
2023-03-26T09:02:34.485Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2023-03-26T09:02:34.519Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2023-03-26T09:02:34.592Z WARN Operator email address isn’t specified. {“Process”: “storagenode”}
2023-03-26T09:02:34.593Z ERROR Invalid configuration. {“Process”: “storagenode”, “error”: “operator wallet address isn’t specified”}
Error: operator wallet address isn’t specified
2023-03-26 09:02:34,597 INFO exited: storagenode (exit status 1; not expected)
2023-03-26 09:02:37,609 INFO spawned: ‘storagenode’ with pid 93
2023-03-26T09:02:37.803Z INFO Configuration loaded {“Process”: “storagenode”, “Location”: “/app/config/config.yaml”}
2023-03-26T09:02:37.814Z INFO Anonymized tracing enabled {“Process”: “storagenode”}
2023-03-26T09:02:37.878Z WARN Operator email address isn’t specified. {“Process”: “storagenode”}
2023-03-26T09:02:37.878Z ERROR Invalid configuration. {“Process”: “storagenode”, “error”: “operator wallet address isn’t specified”}
Error: operator wallet address isn’t specified
2023-03-26 09:02:37,882 INFO exited: storagenode (exit status 1; not expected)
2023-03-26 09:02:37,884 INFO gave up: storagenode entered FATAL state, too many start retries too quickly
2023-03-26 09:02:38,900 WARN received SIGQUIT indicating exit request
2023-03-26 09:02:38,903 INFO waiting for processes-exit-eventlistener, storagenode-updater to die
2023-03-26T09:02:38.902Z INFO Got a signal from the OS: “terminated” {“Process”: “storagenode-updater”}
2023-03-26 09:02:38,907 INFO stopped: storagenode-updater (exit status 0)
2023-03-26 09:02:39,910 INFO stopped: processes-exit-eventlistener (terminated by SIGTERM)

What could be wrong?

Regards,
Alexander

You must never use the setup command for the worked node, otherwise you may destroy it especially with a wrong directories.
So, please remove it from the batch script if you use it.

So, how to turn it back? Delete config?

Regards,
Alexander

No, if you specified a wrong directory, then damage is done.
Now we will hope that you correctly moved data to the storage subfolder as expected by docker. Right now the folders structure looks correct.

What I meant: Windows GUI node stores data inside the provided path, so if it was D:\StorjD1.4, then all data (blobs, trash, etc.) were under D:\StorjD1.4. The docker version stores data inside the storage subfolder, i.e. inside D:\StorjD1.4\storage, but you will provide a path without storage subfolder in your docker run command.

In your config.yaml file the paths to the identity and data locations should look like

# path to the certificate chain for this identity
identity.cert-path: identity/identity.cert

# path to the private key for this identity
identity.key-path: identity/identity.key

# path to store data in
storage.path: config/storage

This is a differense between folder structures Win/Docker I found. During transfer I combined both in same folder, becouse of setup command. Shall I remove all new docker folders? Or shall I move Win folders to location of Docker folders?

So seems you correctly moved Windows GUI node’s data to the right folders, if you did not - you must do it now.

All Windows GUI files should be inside the storage subfolder.

If I look Docker config, I see it like you said:
image
image
image

Yes, but you must stop your node as soon as possible and move files before it will be disqualified for losing data.

This is exactly why the setup command is so dangerous. Without it your node will not start, because of wrong folders structure and missing of important protection file. If data is placed correctly, your docker node just will start without any issues.
But when you executed the setup command with wrong folders structure - you just did override all safety checks.

So, I shall move folders and files in red clouds to folder “storage” with exeption of 3 files marked blue?

Yes, exactly. Since storage already have the same structure and new files, you will need to overwrite them with your old data. Do not delete content of storage subfolder, just overwrite. This way you will not lose newly received data and your node should not be disqualified.

And all folders and files in “storage” folder I shall remove first?

Ok, clear. DO NOT DELETE.

1 Like

NO, do not delete content of storage subfolder, just overwrite. This way you will not lose newly received data and your node should not be disqualified.
Make sure that it will merge folders, not rename them.